UNPKG

@wise-old-man/utils

Version:

A JavaScript/TypeScript client that interfaces and consumes the Wise Old Man API, an API that tracks and measures players' progress in Old School Runescape.

1,713 lines (1,631 loc) 107 kB
declare class BaseAPIClient { private headers; private baseUrl; constructor(headers: object, baseUrl: string); private buildParams; private fetch; private request; private requestText; postRequest<T>(path: string, body?: unknown): Promise<T>; putRequest<T>(path: string, body?: unknown): Promise<T>; deleteRequest<T>(path: string, body?: unknown): Promise<T>; getRequest<T>(path: string, params?: unknown): Promise<T>; getText(path: string, params?: unknown): Promise<string>; } declare const Skill: { readonly OVERALL: "overall"; readonly ATTACK: "attack"; readonly DEFENCE: "defence"; readonly STRENGTH: "strength"; readonly HITPOINTS: "hitpoints"; readonly RANGED: "ranged"; readonly PRAYER: "prayer"; readonly MAGIC: "magic"; readonly COOKING: "cooking"; readonly WOODCUTTING: "woodcutting"; readonly FLETCHING: "fletching"; readonly FISHING: "fishing"; readonly FIREMAKING: "firemaking"; readonly CRAFTING: "crafting"; readonly SMITHING: "smithing"; readonly MINING: "mining"; readonly HERBLORE: "herblore"; readonly AGILITY: "agility"; readonly THIEVING: "thieving"; readonly SLAYER: "slayer"; readonly FARMING: "farming"; readonly RUNECRAFTING: "runecrafting"; readonly HUNTER: "hunter"; readonly CONSTRUCTION: "construction"; readonly SAILING: "sailing"; }; type Skill = (typeof Skill)[keyof typeof Skill]; declare const Activity: { readonly BOUNTY_HUNTER_HUNTER: "bounty_hunter_hunter"; readonly BOUNTY_HUNTER_ROGUE: "bounty_hunter_rogue"; readonly CLUE_SCROLLS_ALL: "clue_scrolls_all"; readonly CLUE_SCROLLS_BEGINNER: "clue_scrolls_beginner"; readonly CLUE_SCROLLS_EASY: "clue_scrolls_easy"; readonly CLUE_SCROLLS_MEDIUM: "clue_scrolls_medium"; readonly CLUE_SCROLLS_HARD: "clue_scrolls_hard"; readonly CLUE_SCROLLS_ELITE: "clue_scrolls_elite"; readonly CLUE_SCROLLS_MASTER: "clue_scrolls_master"; readonly LAST_MAN_STANDING: "last_man_standing"; readonly PVP_ARENA: "pvp_arena"; readonly SOUL_WARS_ZEAL: "soul_wars_zeal"; readonly GUARDIANS_OF_THE_RIFT: "guardians_of_the_rift"; readonly COLOSSEUM_GLORY: "colosseum_glory"; readonly COLLECTIONS_LOGGED: "collections_logged"; }; type Activity = (typeof Activity)[keyof typeof Activity]; declare const Boss: { readonly ABYSSAL_SIRE: "abyssal_sire"; readonly ALCHEMICAL_HYDRA: "alchemical_hydra"; readonly AMOXLIATL: "amoxliatl"; readonly ARAXXOR: "araxxor"; readonly ARTIO: "artio"; readonly BARROWS_CHESTS: "barrows_chests"; readonly BRUTUS: "brutus"; readonly BRYOPHYTA: "bryophyta"; readonly CALLISTO: "callisto"; readonly CALVARION: "calvarion"; readonly CERBERUS: "cerberus"; readonly CHAMBERS_OF_XERIC: "chambers_of_xeric"; readonly CHAMBERS_OF_XERIC_CM: "chambers_of_xeric_challenge_mode"; readonly CHAOS_ELEMENTAL: "chaos_elemental"; readonly CHAOS_FANATIC: "chaos_fanatic"; readonly COMMANDER_ZILYANA: "commander_zilyana"; readonly CORPOREAL_BEAST: "corporeal_beast"; readonly CRAZY_ARCHAEOLOGIST: "crazy_archaeologist"; readonly DAGANNOTH_PRIME: "dagannoth_prime"; readonly DAGANNOTH_REX: "dagannoth_rex"; readonly DAGANNOTH_SUPREME: "dagannoth_supreme"; readonly DERANGED_ARCHAEOLOGIST: "deranged_archaeologist"; readonly DOOM_OF_MOKHAIOTL: "doom_of_mokhaiotl"; readonly DUKE_SUCELLUS: "duke_sucellus"; readonly GENERAL_GRAARDOR: "general_graardor"; readonly GIANT_MOLE: "giant_mole"; readonly GROTESQUE_GUARDIANS: "grotesque_guardians"; readonly HESPORI: "hespori"; readonly KALPHITE_QUEEN: "kalphite_queen"; readonly KING_BLACK_DRAGON: "king_black_dragon"; readonly KRAKEN: "kraken"; readonly KREEARRA: "kreearra"; readonly KRIL_TSUTSAROTH: "kril_tsutsaroth"; readonly LUNAR_CHESTS: "lunar_chests"; readonly MAGGOT_KING: "maggot_king"; readonly MIMIC: "mimic"; readonly NEX: "nex"; readonly NIGHTMARE: "nightmare"; readonly PHOSANIS_NIGHTMARE: "phosanis_nightmare"; readonly OBOR: "obor"; readonly PHANTOM_MUSPAH: "phantom_muspah"; readonly SARACHNIS: "sarachnis"; readonly SCORPIA: "scorpia"; readonly SCURRIUS: "scurrius"; readonly SHELLBANE_GRYPHON: "shellbane_gryphon"; readonly SKOTIZO: "skotizo"; readonly SOL_HEREDIT: "sol_heredit"; readonly SPINDEL: "spindel"; readonly TEMPOROSS: "tempoross"; readonly THE_GAUNTLET: "the_gauntlet"; readonly THE_CORRUPTED_GAUNTLET: "the_corrupted_gauntlet"; readonly THE_HUEYCOATL: "the_hueycoatl"; readonly THE_LEVIATHAN: "the_leviathan"; readonly THE_ROYAL_TITANS: "the_royal_titans"; readonly THE_WHISPERER: "the_whisperer"; readonly THEATRE_OF_BLOOD: "theatre_of_blood"; readonly THEATRE_OF_BLOOD_HARD_MODE: "theatre_of_blood_hard_mode"; readonly THERMONUCLEAR_SMOKE_DEVIL: "thermonuclear_smoke_devil"; readonly TOMBS_OF_AMASCUT: "tombs_of_amascut"; readonly TOMBS_OF_AMASCUT_EXPERT: "tombs_of_amascut_expert"; readonly TZKAL_ZUK: "tzkal_zuk"; readonly TZTOK_JAD: "tztok_jad"; readonly VARDORVIS: "vardorvis"; readonly VENENATIS: "venenatis"; readonly VETION: "vetion"; readonly VORKATH: "vorkath"; readonly WINTERTODT: "wintertodt"; readonly YAMA: "yama"; readonly ZALCANO: "zalcano"; readonly ZULRAH: "zulrah"; }; type Boss = (typeof Boss)[keyof typeof Boss]; declare const ComputedMetric: { readonly EHP: "ehp"; readonly EHB: "ehb"; }; type ComputedMetric = (typeof ComputedMetric)[keyof typeof ComputedMetric]; declare const Metric: { readonly EHP: "ehp"; readonly EHB: "ehb"; readonly ABYSSAL_SIRE: "abyssal_sire"; readonly ALCHEMICAL_HYDRA: "alchemical_hydra"; readonly AMOXLIATL: "amoxliatl"; readonly ARAXXOR: "araxxor"; readonly ARTIO: "artio"; readonly BARROWS_CHESTS: "barrows_chests"; readonly BRUTUS: "brutus"; readonly BRYOPHYTA: "bryophyta"; readonly CALLISTO: "callisto"; readonly CALVARION: "calvarion"; readonly CERBERUS: "cerberus"; readonly CHAMBERS_OF_XERIC: "chambers_of_xeric"; readonly CHAMBERS_OF_XERIC_CM: "chambers_of_xeric_challenge_mode"; readonly CHAOS_ELEMENTAL: "chaos_elemental"; readonly CHAOS_FANATIC: "chaos_fanatic"; readonly COMMANDER_ZILYANA: "commander_zilyana"; readonly CORPOREAL_BEAST: "corporeal_beast"; readonly CRAZY_ARCHAEOLOGIST: "crazy_archaeologist"; readonly DAGANNOTH_PRIME: "dagannoth_prime"; readonly DAGANNOTH_REX: "dagannoth_rex"; readonly DAGANNOTH_SUPREME: "dagannoth_supreme"; readonly DERANGED_ARCHAEOLOGIST: "deranged_archaeologist"; readonly DOOM_OF_MOKHAIOTL: "doom_of_mokhaiotl"; readonly DUKE_SUCELLUS: "duke_sucellus"; readonly GENERAL_GRAARDOR: "general_graardor"; readonly GIANT_MOLE: "giant_mole"; readonly GROTESQUE_GUARDIANS: "grotesque_guardians"; readonly HESPORI: "hespori"; readonly KALPHITE_QUEEN: "kalphite_queen"; readonly KING_BLACK_DRAGON: "king_black_dragon"; readonly KRAKEN: "kraken"; readonly KREEARRA: "kreearra"; readonly KRIL_TSUTSAROTH: "kril_tsutsaroth"; readonly LUNAR_CHESTS: "lunar_chests"; readonly MAGGOT_KING: "maggot_king"; readonly MIMIC: "mimic"; readonly NEX: "nex"; readonly NIGHTMARE: "nightmare"; readonly PHOSANIS_NIGHTMARE: "phosanis_nightmare"; readonly OBOR: "obor"; readonly PHANTOM_MUSPAH: "phantom_muspah"; readonly SARACHNIS: "sarachnis"; readonly SCORPIA: "scorpia"; readonly SCURRIUS: "scurrius"; readonly SHELLBANE_GRYPHON: "shellbane_gryphon"; readonly SKOTIZO: "skotizo"; readonly SOL_HEREDIT: "sol_heredit"; readonly SPINDEL: "spindel"; readonly TEMPOROSS: "tempoross"; readonly THE_GAUNTLET: "the_gauntlet"; readonly THE_CORRUPTED_GAUNTLET: "the_corrupted_gauntlet"; readonly THE_HUEYCOATL: "the_hueycoatl"; readonly THE_LEVIATHAN: "the_leviathan"; readonly THE_ROYAL_TITANS: "the_royal_titans"; readonly THE_WHISPERER: "the_whisperer"; readonly THEATRE_OF_BLOOD: "theatre_of_blood"; readonly THEATRE_OF_BLOOD_HARD_MODE: "theatre_of_blood_hard_mode"; readonly THERMONUCLEAR_SMOKE_DEVIL: "thermonuclear_smoke_devil"; readonly TOMBS_OF_AMASCUT: "tombs_of_amascut"; readonly TOMBS_OF_AMASCUT_EXPERT: "tombs_of_amascut_expert"; readonly TZKAL_ZUK: "tzkal_zuk"; readonly TZTOK_JAD: "tztok_jad"; readonly VARDORVIS: "vardorvis"; readonly VENENATIS: "venenatis"; readonly VETION: "vetion"; readonly VORKATH: "vorkath"; readonly WINTERTODT: "wintertodt"; readonly YAMA: "yama"; readonly ZALCANO: "zalcano"; readonly ZULRAH: "zulrah"; readonly BOUNTY_HUNTER_HUNTER: "bounty_hunter_hunter"; readonly BOUNTY_HUNTER_ROGUE: "bounty_hunter_rogue"; readonly CLUE_SCROLLS_ALL: "clue_scrolls_all"; readonly CLUE_SCROLLS_BEGINNER: "clue_scrolls_beginner"; readonly CLUE_SCROLLS_EASY: "clue_scrolls_easy"; readonly CLUE_SCROLLS_MEDIUM: "clue_scrolls_medium"; readonly CLUE_SCROLLS_HARD: "clue_scrolls_hard"; readonly CLUE_SCROLLS_ELITE: "clue_scrolls_elite"; readonly CLUE_SCROLLS_MASTER: "clue_scrolls_master"; readonly LAST_MAN_STANDING: "last_man_standing"; readonly PVP_ARENA: "pvp_arena"; readonly SOUL_WARS_ZEAL: "soul_wars_zeal"; readonly GUARDIANS_OF_THE_RIFT: "guardians_of_the_rift"; readonly COLOSSEUM_GLORY: "colosseum_glory"; readonly COLLECTIONS_LOGGED: "collections_logged"; readonly OVERALL: "overall"; readonly ATTACK: "attack"; readonly DEFENCE: "defence"; readonly STRENGTH: "strength"; readonly HITPOINTS: "hitpoints"; readonly RANGED: "ranged"; readonly PRAYER: "prayer"; readonly MAGIC: "magic"; readonly COOKING: "cooking"; readonly WOODCUTTING: "woodcutting"; readonly FLETCHING: "fletching"; readonly FISHING: "fishing"; readonly FIREMAKING: "firemaking"; readonly CRAFTING: "crafting"; readonly SMITHING: "smithing"; readonly MINING: "mining"; readonly HERBLORE: "herblore"; readonly AGILITY: "agility"; readonly THIEVING: "thieving"; readonly SLAYER: "slayer"; readonly FARMING: "farming"; readonly RUNECRAFTING: "runecrafting"; readonly HUNTER: "hunter"; readonly CONSTRUCTION: "construction"; readonly SAILING: "sailing"; }; type Metric = (typeof Metric)[keyof typeof Metric]; declare const METRICS: Metric[]; declare const SKILLS: Skill[]; declare const BOSSES: Boss[]; declare const ACTIVITIES: Activity[]; declare const COMPUTED_METRICS: ComputedMetric[]; interface Snapshot { playerId: number; importedAt: Date | null; createdAt: Date; overallRank: number; overallExperience: number; overallLevel: number; attackRank: number; attackExperience: number; defenceRank: number; defenceExperience: number; strengthRank: number; strengthExperience: number; hitpointsRank: number; hitpointsExperience: number; rangedRank: number; rangedExperience: number; prayerRank: number; prayerExperience: number; magicRank: number; magicExperience: number; cookingRank: number; cookingExperience: number; woodcuttingRank: number; woodcuttingExperience: number; fletchingRank: number; fletchingExperience: number; fishingRank: number; fishingExperience: number; firemakingRank: number; firemakingExperience: number; craftingRank: number; craftingExperience: number; smithingRank: number; smithingExperience: number; miningRank: number; miningExperience: number; herbloreRank: number; herbloreExperience: number; agilityRank: number; agilityExperience: number; thievingRank: number; thievingExperience: number; slayerRank: number; slayerExperience: number; farmingRank: number; farmingExperience: number; runecraftingRank: number; runecraftingExperience: number; hunterRank: number; hunterExperience: number; constructionRank: number; constructionExperience: number; sailingRank: number; sailingExperience: number; bounty_hunter_hunterRank: number; bounty_hunter_hunterScore: number; bounty_hunter_rogueRank: number; bounty_hunter_rogueScore: number; clue_scrolls_allRank: number; clue_scrolls_allScore: number; clue_scrolls_beginnerRank: number; clue_scrolls_beginnerScore: number; clue_scrolls_easyRank: number; clue_scrolls_easyScore: number; clue_scrolls_mediumRank: number; clue_scrolls_mediumScore: number; clue_scrolls_hardRank: number; clue_scrolls_hardScore: number; clue_scrolls_eliteRank: number; clue_scrolls_eliteScore: number; clue_scrolls_masterRank: number; clue_scrolls_masterScore: number; last_man_standingRank: number; last_man_standingScore: number; pvp_arenaRank: number; pvp_arenaScore: number; soul_wars_zealRank: number; soul_wars_zealScore: number; guardians_of_the_riftRank: number; guardians_of_the_riftScore: number; colosseum_gloryRank: number; colosseum_gloryScore: number; collections_loggedRank: number; collections_loggedScore: number; abyssal_sireRank: number; abyssal_sireKills: number; alchemical_hydraRank: number; alchemical_hydraKills: number; amoxliatlRank: number; amoxliatlKills: number; araxxorRank: number; araxxorKills: number; artioRank: number; artioKills: number; barrows_chestsRank: number; barrows_chestsKills: number; brutusRank: number; brutusKills: number; bryophytaRank: number; bryophytaKills: number; cerberusRank: number; cerberusKills: number; callistoRank: number; callistoKills: number; calvarionRank: number; calvarionKills: number; chambers_of_xericRank: number; chambers_of_xericKills: number; chambers_of_xeric_challenge_modeRank: number; chambers_of_xeric_challenge_modeKills: number; chaos_elementalRank: number; chaos_elementalKills: number; chaos_fanaticRank: number; chaos_fanaticKills: number; commander_zilyanaRank: number; commander_zilyanaKills: number; corporeal_beastRank: number; corporeal_beastKills: number; crazy_archaeologistRank: number; crazy_archaeologistKills: number; dagannoth_primeRank: number; dagannoth_primeKills: number; dagannoth_rexRank: number; dagannoth_rexKills: number; dagannoth_supremeRank: number; dagannoth_supremeKills: number; deranged_archaeologistRank: number; deranged_archaeologistKills: number; doom_of_mokhaiotlRank: number; doom_of_mokhaiotlKills: number; duke_sucellusRank: number; duke_sucellusKills: number; general_graardorRank: number; general_graardorKills: number; giant_moleRank: number; giant_moleKills: number; grotesque_guardiansRank: number; grotesque_guardiansKills: number; hesporiRank: number; hesporiKills: number; kalphite_queenRank: number; kalphite_queenKills: number; king_black_dragonRank: number; king_black_dragonKills: number; krakenRank: number; krakenKills: number; kreearraRank: number; kreearraKills: number; kril_tsutsarothRank: number; kril_tsutsarothKills: number; lunar_chestsRank: number; lunar_chestsKills: number; maggot_kingRank: number; maggot_kingKills: number; mimicRank: number; mimicKills: number; nexRank: number; nexKills: number; nightmareRank: number; nightmareKills: number; phosanis_nightmareRank: number; phosanis_nightmareKills: number; oborRank: number; oborKills: number; phantom_muspahRank: number; phantom_muspahKills: number; sarachnisRank: number; sarachnisKills: number; scorpiaRank: number; scorpiaKills: number; scurriusRank: number; scurriusKills: number; shellbane_gryphonRank: number; shellbane_gryphonKills: number; skotizoRank: number; skotizoKills: number; sol_hereditRank: number; sol_hereditKills: number; spindelRank: number; spindelKills: number; temporossRank: number; temporossKills: number; the_gauntletRank: number; the_gauntletKills: number; the_corrupted_gauntletRank: number; the_corrupted_gauntletKills: number; the_hueycoatlRank: number; the_hueycoatlKills: number; the_leviathanRank: number; the_leviathanKills: number; the_royal_titansRank: number; the_royal_titansKills: number; the_whispererRank: number; the_whispererKills: number; theatre_of_bloodRank: number; theatre_of_bloodKills: number; theatre_of_blood_hard_modeRank: number; theatre_of_blood_hard_modeKills: number; thermonuclear_smoke_devilRank: number; thermonuclear_smoke_devilKills: number; tombs_of_amascutRank: number; tombs_of_amascutKills: number; tombs_of_amascut_expertRank: number; tombs_of_amascut_expertKills: number; tzkal_zukRank: number; tzkal_zukKills: number; tztok_jadRank: number; tztok_jadKills: number; vardorvisRank: number; vardorvisKills: number; venenatisRank: number; venenatisKills: number; vetionRank: number; vetionKills: number; vorkathRank: number; vorkathKills: number; wintertodtRank: number; wintertodtKills: number; yamaRank: number; yamaKills: number; zalcanoRank: number; zalcanoKills: number; zulrahRank: number; zulrahKills: number; ehpRank: number; ehpValue: number; ehbRank: number; ehbValue: number; } interface AchievementDefinition { name: string; metric: Metric; measure: string; threshold: number; validate: (snapshot: Snapshot) => boolean; getCurrentValue: (snapshot: Snapshot) => number; } declare enum MetricMeasure { EXPERIENCE = "experience", KILLS = "kills", SCORE = "score", VALUE = "value" } type AchievementMeasure = MetricMeasure | 'levels'; interface Achievement { playerId: number; name: string; metric: Metric; threshold: number; accuracy: number | null; createdAt: Date; } interface BossMetaConfig { boss: Boss; rate: number; } declare const Period: { readonly FIVE_MIN: "five_min"; readonly DAY: "day"; readonly WEEK: "week"; readonly MONTH: "month"; readonly YEAR: "year"; }; type Period = (typeof Period)[keyof typeof Period]; declare const PERIODS: ("five_min" | "day" | "week" | "month" | "year")[]; interface CachedDelta { playerId: number; period: Period; metric: Metric; value: number; startedAt: Date; endedAt: Date; updatedAt: Date; } declare enum CompetitionCSVTableType { TEAM = "team", TEAMS = "teams", PARTICIPANTS = "participants" } interface CompetitionMetric { competitionId: number; metric: Metric; createdAt: Date; deletedAt: Date | null; } declare enum CompetitionStatus { UPCOMING = "upcoming", ONGOING = "ongoing", FINISHED = "finished" } declare const COMPETITION_STATUSES: CompetitionStatus[]; interface CompetitionTeam { name: string; participants: string[]; } declare const CompetitionTimeEventStatus: { readonly WAITING: "waiting"; readonly EXECUTING: "executing"; readonly COMPLETED: "completed"; readonly FAILED: "failed"; readonly CANCELED: "canceled"; }; type CompetitionTimeEventStatus = (typeof CompetitionTimeEventStatus)[keyof typeof CompetitionTimeEventStatus]; declare const CompetitionTimeEventType: { readonly AFTER_START: "after_start"; readonly BEFORE_START: "before_start"; readonly BEFORE_END: "before_end"; readonly DURING: "during"; }; type CompetitionTimeEventType = (typeof CompetitionTimeEventType)[keyof typeof CompetitionTimeEventType]; interface CompetitionTimeEvent { id: number; competitionId: number; type: CompetitionTimeEventType; offsetMinutes: number; executeAt: Date; status: CompetitionTimeEventStatus; attempts: number; executingAt: Date | null; completedAt: Date | null; failedAt: Date | null; canceledAt: Date | null; createdAt: Date; } declare const CompetitionType: { readonly CLASSIC: "classic"; readonly TEAM: "team"; }; type CompetitionType = (typeof CompetitionType)[keyof typeof CompetitionType]; declare const COMPETITION_TYPES: CompetitionType[]; interface Competition { id: number; title: string; type: CompetitionType; startsAt: Date; endsAt: Date; groupId: number | null; score: number; visible: boolean; verificationHash: string; createdAt: Date | null; updatedAt: Date | null; creatorIpHash: string | null; } declare const Country: { readonly AD: "AD"; readonly AE: "AE"; readonly AF: "AF"; readonly AG: "AG"; readonly AI: "AI"; readonly AL: "AL"; readonly AM: "AM"; readonly AO: "AO"; readonly AQ: "AQ"; readonly AR: "AR"; readonly AS: "AS"; readonly AT: "AT"; readonly AU: "AU"; readonly AW: "AW"; readonly AX: "AX"; readonly AZ: "AZ"; readonly BA: "BA"; readonly BB: "BB"; readonly BD: "BD"; readonly BE: "BE"; readonly BF: "BF"; readonly BG: "BG"; readonly BH: "BH"; readonly BI: "BI"; readonly BJ: "BJ"; readonly BL: "BL"; readonly BM: "BM"; readonly BN: "BN"; readonly BO: "BO"; readonly BQ: "BQ"; readonly BR: "BR"; readonly BS: "BS"; readonly BT: "BT"; readonly BV: "BV"; readonly BW: "BW"; readonly BY: "BY"; readonly BZ: "BZ"; readonly CA: "CA"; readonly CC: "CC"; readonly CD: "CD"; readonly CF: "CF"; readonly CG: "CG"; readonly CH: "CH"; readonly CI: "CI"; readonly CK: "CK"; readonly CL: "CL"; readonly CM: "CM"; readonly CN: "CN"; readonly CO: "CO"; readonly CR: "CR"; readonly CU: "CU"; readonly CV: "CV"; readonly CW: "CW"; readonly CX: "CX"; readonly CY: "CY"; readonly CZ: "CZ"; readonly DE: "DE"; readonly DJ: "DJ"; readonly DK: "DK"; readonly DM: "DM"; readonly DO: "DO"; readonly DZ: "DZ"; readonly EC: "EC"; readonly EE: "EE"; readonly EG: "EG"; readonly EH: "EH"; readonly ER: "ER"; readonly ES: "ES"; readonly ET: "ET"; readonly FI: "FI"; readonly FJ: "FJ"; readonly FK: "FK"; readonly FM: "FM"; readonly FO: "FO"; readonly FR: "FR"; readonly GA: "GA"; readonly GB: "GB"; readonly GB_ENG: "GB_ENG"; readonly GB_NIR: "GB_NIR"; readonly GB_SCT: "GB_SCT"; readonly GB_WLS: "GB_WLS"; readonly GD: "GD"; readonly GE: "GE"; readonly GF: "GF"; readonly GG: "GG"; readonly GH: "GH"; readonly GI: "GI"; readonly GL: "GL"; readonly GM: "GM"; readonly GN: "GN"; readonly GP: "GP"; readonly GQ: "GQ"; readonly GR: "GR"; readonly GS: "GS"; readonly GT: "GT"; readonly GU: "GU"; readonly GW: "GW"; readonly GY: "GY"; readonly HK: "HK"; readonly HM: "HM"; readonly HN: "HN"; readonly HR: "HR"; readonly HT: "HT"; readonly HU: "HU"; readonly ID: "ID"; readonly IE: "IE"; readonly IL: "IL"; readonly IM: "IM"; readonly IN: "IN"; readonly IO: "IO"; readonly IQ: "IQ"; readonly IR: "IR"; readonly IS: "IS"; readonly IT: "IT"; readonly JE: "JE"; readonly JM: "JM"; readonly JO: "JO"; readonly JP: "JP"; readonly KE: "KE"; readonly KG: "KG"; readonly KH: "KH"; readonly KI: "KI"; readonly KM: "KM"; readonly KN: "KN"; readonly KP: "KP"; readonly KR: "KR"; readonly KW: "KW"; readonly KY: "KY"; readonly KZ: "KZ"; readonly LA: "LA"; readonly LB: "LB"; readonly LC: "LC"; readonly LI: "LI"; readonly LK: "LK"; readonly LR: "LR"; readonly LS: "LS"; readonly LT: "LT"; readonly LU: "LU"; readonly LV: "LV"; readonly LY: "LY"; readonly MA: "MA"; readonly MC: "MC"; readonly MD: "MD"; readonly ME: "ME"; readonly MF: "MF"; readonly MG: "MG"; readonly MH: "MH"; readonly MK: "MK"; readonly ML: "ML"; readonly MM: "MM"; readonly MN: "MN"; readonly MO: "MO"; readonly MP: "MP"; readonly MQ: "MQ"; readonly MR: "MR"; readonly MS: "MS"; readonly MT: "MT"; readonly MU: "MU"; readonly MV: "MV"; readonly MW: "MW"; readonly MX: "MX"; readonly MY: "MY"; readonly MZ: "MZ"; readonly NA: "NA"; readonly NC: "NC"; readonly NE: "NE"; readonly NF: "NF"; readonly NG: "NG"; readonly NI: "NI"; readonly NL: "NL"; readonly NO: "NO"; readonly NP: "NP"; readonly NR: "NR"; readonly NU: "NU"; readonly NZ: "NZ"; readonly OM: "OM"; readonly PA: "PA"; readonly PE: "PE"; readonly PF: "PF"; readonly PG: "PG"; readonly PH: "PH"; readonly PK: "PK"; readonly PL: "PL"; readonly PM: "PM"; readonly PN: "PN"; readonly PR: "PR"; readonly PS: "PS"; readonly PT: "PT"; readonly PW: "PW"; readonly PY: "PY"; readonly QA: "QA"; readonly RE: "RE"; readonly RO: "RO"; readonly RS: "RS"; readonly RU: "RU"; readonly RW: "RW"; readonly SA: "SA"; readonly SB: "SB"; readonly SC: "SC"; readonly SD: "SD"; readonly SE: "SE"; readonly SG: "SG"; readonly SH: "SH"; readonly SI: "SI"; readonly SJ: "SJ"; readonly SK: "SK"; readonly SL: "SL"; readonly SM: "SM"; readonly SN: "SN"; readonly SO: "SO"; readonly SR: "SR"; readonly SS: "SS"; readonly ST: "ST"; readonly SV: "SV"; readonly SX: "SX"; readonly SY: "SY"; readonly SZ: "SZ"; readonly TC: "TC"; readonly TD: "TD"; readonly TF: "TF"; readonly TG: "TG"; readonly TH: "TH"; readonly TJ: "TJ"; readonly TK: "TK"; readonly TL: "TL"; readonly TM: "TM"; readonly TN: "TN"; readonly TO: "TO"; readonly TR: "TR"; readonly TT: "TT"; readonly TV: "TV"; readonly TW: "TW"; readonly TZ: "TZ"; readonly UA: "UA"; readonly UG: "UG"; readonly UM: "UM"; readonly US: "US"; readonly UY: "UY"; readonly UZ: "UZ"; readonly VA: "VA"; readonly VC: "VC"; readonly VE: "VE"; readonly VG: "VG"; readonly VI: "VI"; readonly VN: "VN"; readonly VU: "VU"; readonly WF: "WF"; readonly WS: "WS"; readonly YE: "YE"; readonly YT: "YT"; readonly ZA: "ZA"; readonly ZM: "ZM"; readonly ZW: "ZW"; }; type Country = (typeof Country)[keyof typeof Country]; declare const COUNTRY_CODES: Country[]; declare enum EfficiencyAlgorithmType { MAIN = "main", IRONMAN = "ironman", ULTIMATE = "ultimate", LVL3 = "lvl3", F2P = "f2p", F2P_LVL3 = "f2p_lvl3", F2P_IRONMAN = "f2p_ironman", F2P_LVL3_IRONMAN = "f2p_lvl3_ironman", DEF1 = "def1" } declare const GroupRole: { readonly ACHIEVER: "achiever"; readonly ADAMANT: "adamant"; readonly ADEPT: "adept"; readonly ADMINISTRATOR: "administrator"; readonly ADMIRAL: "admiral"; readonly ADVENTURER: "adventurer"; readonly AIR: "air"; readonly ANCHOR: "anchor"; readonly APOTHECARY: "apothecary"; readonly ARCHER: "archer"; readonly ARMADYLEAN: "armadylean"; readonly ARTILLERY: "artillery"; readonly ARTISAN: "artisan"; readonly ASGARNIAN: "asgarnian"; readonly ASSASSIN: "assassin"; readonly ASSISTANT: "assistant"; readonly ASTRAL: "astral"; readonly ATHLETE: "athlete"; readonly ATTACKER: "attacker"; readonly BANDIT: "bandit"; readonly BANDOSIAN: "bandosian"; readonly BARBARIAN: "barbarian"; readonly BATTLEMAGE: "battlemage"; readonly BEAST: "beast"; readonly BERSERKER: "berserker"; readonly BLISTERWOOD: "blisterwood"; readonly BLOOD: "blood"; readonly BLUE: "blue"; readonly BOB: "bob"; readonly BODY: "body"; readonly BRASSICAN: "brassican"; readonly BRAWLER: "brawler"; readonly BRIGADIER: "brigadier"; readonly BRIGAND: "brigand"; readonly BRONZE: "bronze"; readonly BRUISER: "bruiser"; readonly BULWARK: "bulwark"; readonly BURGLAR: "burglar"; readonly BURNT: "burnt"; readonly CADET: "cadet"; readonly CAPTAIN: "captain"; readonly CARRY: "carry"; readonly CHAMPION: "champion"; readonly CHAOS: "chaos"; readonly CLERIC: "cleric"; readonly COLLECTOR: "collector"; readonly COLONEL: "colonel"; readonly COMMANDER: "commander"; readonly COMPETITOR: "competitor"; readonly COMPLETIONIST: "completionist"; readonly CONSTRUCTOR: "constructor"; readonly COOK: "cook"; readonly COORDINATOR: "coordinator"; readonly CORPORAL: "corporal"; readonly COSMIC: "cosmic"; readonly COUNCILLOR: "councillor"; readonly CRAFTER: "crafter"; readonly CREW: "crew"; readonly CRUSADER: "crusader"; readonly CUTPURSE: "cutpurse"; readonly DEATH: "death"; readonly DEFENDER: "defender"; readonly DEFILER: "defiler"; readonly DEPUTY_OWNER: "deputy_owner"; readonly DESTROYER: "destroyer"; readonly DIAMOND: "diamond"; readonly DISEASED: "diseased"; readonly DOCTOR: "doctor"; readonly DOGSBODY: "dogsbody"; readonly DRAGON: "dragon"; readonly DRAGONSTONE: "dragonstone"; readonly DRUID: "druid"; readonly DUELLIST: "duellist"; readonly EARTH: "earth"; readonly ELITE: "elite"; readonly EMERALD: "emerald"; readonly ENFORCER: "enforcer"; readonly EPIC: "epic"; readonly EXECUTIVE: "executive"; readonly EXPERT: "expert"; readonly EXPLORER: "explorer"; readonly FARMER: "farmer"; readonly FEEDER: "feeder"; readonly FIGHTER: "fighter"; readonly FIRE: "fire"; readonly FIREMAKER: "firemaker"; readonly FIRESTARTER: "firestarter"; readonly FISHER: "fisher"; readonly FLETCHER: "fletcher"; readonly FORAGER: "forager"; readonly FREMENNIK: "fremennik"; readonly GAMER: "gamer"; readonly GATHERER: "gatherer"; readonly GENERAL: "general"; readonly GNOME_CHILD: "gnome_child"; readonly GNOME_ELDER: "gnome_elder"; readonly GOBLIN: "goblin"; readonly GOLD: "gold"; readonly GOON: "goon"; readonly GREEN: "green"; readonly GREY: "grey"; readonly GUARDIAN: "guardian"; readonly GUTHIXIAN: "guthixian"; readonly HARPOON: "harpoon"; readonly HEALER: "healer"; readonly HELLCAT: "hellcat"; readonly HELPER: "helper"; readonly HERBOLOGIST: "herbologist"; readonly HERO: "hero"; readonly HOLY: "holy"; readonly HOARDER: "hoarder"; readonly HUNTER: "hunter"; readonly IGNITOR: "ignitor"; readonly ILLUSIONIST: "illusionist"; readonly IMP: "imp"; readonly INFANTRY: "infantry"; readonly INQUISITOR: "inquisitor"; readonly IRON: "iron"; readonly JADE: "jade"; readonly JUSTICIAR: "justiciar"; readonly KANDARIN: "kandarin"; readonly KARAMJAN: "karamjan"; readonly KHARIDIAN: "kharidian"; readonly KITTEN: "kitten"; readonly KNIGHT: "knight"; readonly LABOURER: "labourer"; readonly LAW: "law"; readonly LEADER: "leader"; readonly LEARNER: "learner"; readonly LEGACY: "legacy"; readonly LEGEND: "legend"; readonly LEGIONNAIRE: "legionnaire"; readonly LIEUTENANT: "lieutenant"; readonly LOOTER: "looter"; readonly LUMBERJACK: "lumberjack"; readonly MAGIC: "magic"; readonly MAGICIAN: "magician"; readonly MAJOR: "major"; readonly MAPLE: "maple"; readonly MARSHAL: "marshal"; readonly MASTER: "master"; readonly MAXED: "maxed"; readonly MEDIATOR: "mediator"; readonly MEDIC: "medic"; readonly MENTOR: "mentor"; readonly MEMBER: "member"; readonly MERCHANT: "merchant"; readonly MIND: "mind"; readonly MINER: "miner"; readonly MINION: "minion"; readonly MISTHALINIAN: "misthalinian"; readonly MITHRIL: "mithril"; readonly MODERATOR: "moderator"; readonly MONARCH: "monarch"; readonly MORYTANIAN: "morytanian"; readonly MYSTIC: "mystic"; readonly MYTH: "myth"; readonly NATURAL: "natural"; readonly NATURE: "nature"; readonly NECROMANCER: "necromancer"; readonly NINJA: "ninja"; readonly NOBLE: "noble"; readonly NOVICE: "novice"; readonly NURSE: "nurse"; readonly OAK: "oak"; readonly OFFICER: "officer"; readonly ONYX: "onyx"; readonly OPAL: "opal"; readonly ORACLE: "oracle"; readonly ORANGE: "orange"; readonly OWNER: "owner"; readonly PAGE: "page"; readonly PALADIN: "paladin"; readonly PAWN: "pawn"; readonly PILGRIM: "pilgrim"; readonly PINE: "pine"; readonly PINK: "pink"; readonly PREFECT: "prefect"; readonly PRIEST: "priest"; readonly PRIVATE: "private"; readonly PRODIGY: "prodigy"; readonly PROSELYTE: "proselyte"; readonly PROSPECTOR: "prospector"; readonly PROTECTOR: "protector"; readonly PURE: "pure"; readonly PURPLE: "purple"; readonly PYROMANCER: "pyromancer"; readonly QUESTER: "quester"; readonly RACER: "racer"; readonly RAIDER: "raider"; readonly RANGER: "ranger"; readonly RECORD_CHASER: "record_chaser"; readonly RECRUIT: "recruit"; readonly RECRUITER: "recruiter"; readonly RED_TOPAZ: "red_topaz"; readonly RED: "red"; readonly ROGUE: "rogue"; readonly RUBY: "ruby"; readonly RUNE: "rune"; readonly RUNECRAFTER: "runecrafter"; readonly SAGE: "sage"; readonly SAPPHIRE: "sapphire"; readonly SARADOMINIST: "saradominist"; readonly SAVIOUR: "saviour"; readonly SCAVENGER: "scavenger"; readonly SCHOLAR: "scholar"; readonly SCOURGE: "scourge"; readonly SCOUT: "scout"; readonly SCRIBE: "scribe"; readonly SEER: "seer"; readonly SENATOR: "senator"; readonly SENTRY: "sentry"; readonly SERENIST: "serenist"; readonly SERGEANT: "sergeant"; readonly SHAMAN: "shaman"; readonly SHERIFF: "sheriff"; readonly SHORT_GREEN_GUY: "short_green_guy"; readonly SKILLER: "skiller"; readonly SKULLED: "skulled"; readonly SLAYER: "slayer"; readonly SMITER: "smiter"; readonly SMITH: "smith"; readonly SMUGGLER: "smuggler"; readonly SNIPER: "sniper"; readonly SOUL: "soul"; readonly SPECIALIST: "specialist"; readonly SPEED_RUNNER: "speed_runner"; readonly SPELLCASTER: "spellcaster"; readonly SQUIRE: "squire"; readonly STAFF: "staff"; readonly STEEL: "steel"; readonly STRIDER: "strider"; readonly STRIKER: "striker"; readonly SUMMONER: "summoner"; readonly SUPERIOR: "superior"; readonly SUPERVISOR: "supervisor"; readonly TEACHER: "teacher"; readonly TEMPLAR: "templar"; readonly THERAPIST: "therapist"; readonly THIEF: "thief"; readonly TIRANNIAN: "tirannian"; readonly TRIALIST: "trialist"; readonly TRICKSTER: "trickster"; readonly TZKAL: "tzkal"; readonly TZTOK: "tztok"; readonly UNHOLY: "unholy"; readonly VAGRANT: "vagrant"; readonly VANGUARD: "vanguard"; readonly WALKER: "walker"; readonly WANDERER: "wanderer"; readonly WARDEN: "warden"; readonly WARLOCK: "warlock"; readonly WARRIOR: "warrior"; readonly WATER: "water"; readonly WILD: "wild"; readonly WILLOW: "willow"; readonly WILY: "wily"; readonly WINTUMBER: "wintumber"; readonly WITCH: "witch"; readonly WIZARD: "wizard"; readonly WORKER: "worker"; readonly WRATH: "wrath"; readonly XERICIAN: "xerician"; readonly YELLOW: "yellow"; readonly YEW: "yew"; readonly ZAMORAKIAN: "zamorakian"; readonly ZAROSIAN: "zarosian"; readonly ZEALOT: "zealot"; readonly ZENYTE: "zenyte"; }; type GroupRole = (typeof GroupRole)[keyof typeof GroupRole]; declare const GROUP_ROLES: GroupRole[]; interface GroupRoleOrder { groupId: number; role: GroupRole; index: number; } interface GroupSocialLinks { groupId: number; website: string | null; discord: string | null; twitter: string | null; youtube: string | null; twitch: string | null; createdAt: Date; updatedAt: Date; } interface Group { id: number; name: string; clanChat: string | null; description: string | null; homeworld: number | null; verified: boolean; patron: boolean; visible: boolean; profileImage: string | null; bannerImage: string | null; score: number; verificationHash: string; createdAt: Date; updatedAt: Date; creatorIpHash: string | null; } declare const MemberActivityType: { readonly JOINED: "joined"; readonly LEFT: "left"; readonly CHANGED_ROLE: "changed_role"; }; type MemberActivityType = (typeof MemberActivityType)[keyof typeof MemberActivityType]; interface MemberActivity { groupId: number; playerId: number; type: MemberActivityType; role: GroupRole | null; previousRole: GroupRole | null; createdAt: Date; } interface Membership { playerId: number; groupId: number; role: GroupRole; createdAt: Date; updatedAt: Date; clientSyncJoinedAt: Date | null; } interface MetricDelta { start: number; end: number; gained: number; } declare enum MetricType { SKILL = "skill", BOSS = "boss", ACTIVITY = "activity", COMPUTED = "computed" } type NameChangeDenyContext = { reason: 'manual_review'; } | { reason: 'old_stats_cannot_be_found'; } | { reason: 'new_name_not_on_the_hiscores'; } | { reason: 'negative_gains'; negativeGains: Record<Metric, number>; }; type NameChangeSkipContext = { reason: 'transition_period_too_long'; maxHoursDiff: number; hoursDiff: number; } | { reason: 'excessive_gains'; ehpDiff: number; ehbDiff: number; hoursDiff: number; } | { reason: 'total_level_too_low'; minTotalLevel: number; totalLevel: number; }; type NameChangeReviewContext = NameChangeSkipContext | NameChangeDenyContext; declare const NameChangeStatus: { readonly PENDING: "pending"; readonly DENIED: "denied"; readonly APPROVED: "approved"; }; type NameChangeStatus = (typeof NameChangeStatus)[keyof typeof NameChangeStatus]; interface NameChange { id: number; playerId: number; oldName: string; newName: string; status: NameChangeStatus; reviewContext: NameChangeReviewContext | null; resolvedAt: Date | null; createdAt: Date; updatedAt: Date; } interface Participation { playerId: number; competitionId: number; startSnapshotDate: Date | null; endSnapshotDate: Date | null; teamName: string | null; createdAt: Date; updatedAt: Date; } interface Patron { id: string; name: string; email: string | null; discordId: string | null; groupId: number | null; playerId: number | null; tier: number; createdAt: Date; } declare const PlayerAnnotationType: { readonly OPT_OUT: "opt_out"; readonly OPT_OUT_GROUPS: "opt_out_groups"; readonly OPT_OUT_COMPETITIONS: "opt_out_competitions"; readonly BLOCKED: "blocked"; readonly FAKE_F2P: "fake_f2p"; }; type PlayerAnnotationType = (typeof PlayerAnnotationType)[keyof typeof PlayerAnnotationType]; interface PlayerAnnotation { playerId: number; type: PlayerAnnotationType; createdAt: Date; } interface PlayerArchive { playerId: number; previousUsername: string; archiveUsername: string; restoredUsername: string | null; createdAt: Date; restoredAt: Date | null; } declare const PlayerBuild: { readonly MAIN: "main"; readonly F2P: "f2p"; readonly F2P_LVL3: "f2p_lvl3"; readonly LVL3: "lvl3"; readonly ZERKER: "zerker"; readonly DEF1: "def1"; readonly HP10: "hp10"; }; type PlayerBuild = (typeof PlayerBuild)[keyof typeof PlayerBuild]; declare const PLAYER_BUILDS: PlayerBuild[]; declare const PlayerStatus: { readonly ACTIVE: "active"; readonly UNRANKED: "unranked"; readonly FLAGGED: "flagged"; readonly ARCHIVED: "archived"; readonly BANNED: "banned"; }; type PlayerStatus = (typeof PlayerStatus)[keyof typeof PlayerStatus]; declare const PLAYER_STATUSES: PlayerStatus[]; declare const PlayerType: { readonly UNKNOWN: "unknown"; readonly REGULAR: "regular"; readonly IRONMAN: "ironman"; readonly HARDCORE: "hardcore"; readonly ULTIMATE: "ultimate"; }; type PlayerType = (typeof PlayerType)[keyof typeof PlayerType]; declare const PLAYER_TYPES: PlayerType[]; interface Player { id: number; username: string; displayName: string; type: PlayerType; build: PlayerBuild; status: PlayerStatus; country: Country | null; patron: boolean; exp: number; ehp: number; ehb: number; ttm: number; tt200m: number; registeredAt: Date; updatedAt: Date | null; lastChangedAt: Date | null; lastImportedAt: Date | null; latestSnapshotDate: Date | null; } interface Record$1 { playerId: number; period: Period; metric: Metric; value: number; updatedAt: Date; } interface SkillMetaBonus { originSkill: Skill; bonusSkill: Skill; startExp: number; endExp: number; maxBonus?: number; end: boolean; ratio: number; } interface SkillMetaMethod { rate: number; realRate?: number; startExp: number; description: string; } interface SkillMetaConfig { skill: Skill; methods: Array<SkillMetaMethod>; bonuses: SkillMetaBonus[]; } interface TrendDatapoint { date: Date; metric: Metric; sum: number; maxValue: number; minValue: number; maxRank: number; } type GroupMemberInput = { username: string; role: GroupRole; clientSyncJoinedAt?: Date; }; /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface AchievementResponse extends Achievement { measure: AchievementMeasure; legacy: boolean; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface AchievementProgressResponse extends Omit<AchievementResponse, 'createdAt'> { createdAt: Date | null; currentValue: number; absoluteProgress: number; relativeProgress: number; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface GroupResponse extends Omit<Group, 'verificationHash' | 'creatorIpHash'> { memberCount: number; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface CompetitionResponse extends Omit<Competition, 'verificationHash' | 'creatorIpHash'> { metric: Metric; metrics: Array<{ weight: number; metric: Metric; createdAt: Date; }>; participantCount: number; group?: GroupResponse; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ type ParticipationResponse = Omit<Participation, 'startSnapshotDate' | 'endSnapshotDate'>; /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ type PlayerResponse = Omit<Player, 'latestSnapshotDate'>; /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface CompetitionDetailsResponse extends CompetitionResponse { participations: Array<ParticipationResponse & { player: PlayerResponse; deltas: Array<{ metric: Metric | 'total'; values: MetricDelta; levels: MetricDelta; }>; progress: MetricDelta; levels: MetricDelta; }>; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface SkillData { metric: Skill; rank: number; level: number; experience: number; ehp: number; } interface BossData { metric: Boss; rank: number; kills: number; ehb: number; } interface ActivityData { metric: Activity; rank: number; score: number; } interface ComputeMetricData { metric: ComputedMetric; rank: number; value: number; } interface SnapshotResponse { playerId: number; createdAt: Date; importedAt: Date | null; data: { skills: Record<Skill, SkillData>; bosses: Record<Boss, BossData>; activities: Record<Activity, ActivityData>; computed: Record<ComputedMetric, ComputeMetricData>; }; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ type GroupRoleOrderResponse = GroupRoleOrder; /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ type GroupSocialLinksResponse = Pick<GroupSocialLinks, 'website' | 'discord' | 'twitter' | 'youtube' | 'twitch'>; /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ type MembershipResponse = Membership; /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface GroupDetailsResponse extends GroupResponse { socialLinks: GroupSocialLinksResponse; roleOrders: Array<GroupRoleOrderResponse>; memberships: Array<MembershipResponse & { player: PlayerResponse; }>; } interface GroupHiscoresEntryResponse { player: PlayerResponse; data: GroupHiscoresSkillData | GroupHiscoresBossData | GroupHiscoresActivityData | GroupHiscoresComputedMetricData; } interface GroupHiscoresSkillData { type: 'skill'; rank: number; level: number; experience: number; } interface GroupHiscoresBossData { type: 'boss'; rank: number; kills: number; } interface GroupHiscoresActivityData { type: 'activity'; rank: number; score: number; } interface GroupHiscoresComputedMetricData { type: 'computed'; rank: number; value: number; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface GroupMetricLeadersResponse { skills: Record<Skill, { player: PlayerResponse | null; metric: Skill; rank: number; level: number; experience: number; }>; bosses: Record<Boss, { player: PlayerResponse | null; metric: Boss; rank: number; kills: number; }>; activities: Record<Activity, { player: PlayerResponse | null; metric: Activity; rank: number; score: number; }>; computed: Record<ComputedMetric, { player: PlayerResponse | null; metric: ComputedMetric; rank: number; value: number; }>; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface GroupStatisticsResponse { maxedCombatCount: number; maxedTotalCount: number; maxed200msCount: number; averageStats: SnapshotResponse; metricLeaders: GroupMetricLeadersResponse; } /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ type MemberActivityResponse = MemberActivity; /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ type NameChangeResponse = NameChange; /** * Response types are used to format the data returned by the API. * * Although sometimes very similar to our database models, * they often include transformations, additional properties or sensitive field omissions. */ interface NameChangeDetailsResponse { nameChange: NameChangeResponse; data?: { isNewOnHiscores: boolean; isOldOnHiscores: boolean; isNewTracked: boolean; hasNegativeG