@wise-old-man/utils 3.3.14 → 4.0.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/dist/index.d.ts CHANGED
@@ -1,392 +1,18 @@
1
- /**
2
- * Hardcode Prisma Types into this file, to avoid having to import the whole Prisma Client
3
- */
4
-
5
- type Prisma_Base_Achievement = {
6
- playerId: number;
7
- name: string;
8
- metric: Metric;
9
- threshold: bigint;
10
- accuracy: bigint | null;
11
- createdAt: Date;
12
- };
13
-
14
- export type MemberActivity = {
15
- groupId: number;
16
- playerId: number;
17
- type: ActivityType;
18
- role: GroupRole | null;
19
- previousRole: GroupRole | null;
20
- createdAt: Date;
21
- };
22
-
23
- export type PlayerAnnotation = {
24
- playerId: number;
25
- type: PlayerAnnotationType;
26
- createdAt: Date;
27
- };
28
-
29
- export type PlayerArchive = {
30
- playerId: number;
31
- previousUsername: string;
32
- archiveUsername: string;
33
- restoredUsername: string | null;
34
- createdAt: Date;
35
- restoredAt: Date | null;
36
- };
37
-
38
- type Prisma_Base_GroupSocialLinks = {
39
- id: number;
40
- groupId: number;
41
- website: string | null;
42
- discord: string | null;
43
- twitter: string | null;
44
- youtube: string | null;
45
- twitch: string | null;
46
- updatedAt: Date;
47
- createdAt: Date;
48
- };
49
-
50
- export type Membership = {
51
- playerId: number;
52
- groupId: number;
53
- role: GroupRole;
54
- createdAt: Date;
55
- updatedAt: Date;
56
- };
57
-
58
- export type Prisma_Base_Group = {
59
- id: number;
60
- name: string;
61
- clanChat: string | null;
62
- description: string | null;
63
- homeworld: number | null;
64
- verified: boolean;
65
- patron: boolean;
66
- visible: boolean;
67
- profileImage: string | null;
68
- bannerImage: string | null;
69
- score: number;
70
- verificationHash: string;
71
- createdAt: Date;
72
- updatedAt: Date;
73
- creatorIpHash: string | null;
74
- };
75
-
76
- export type GroupRoleOrder = {
77
- role: GroupRole;
78
- index: number;
79
- };
80
-
81
- type Participation = {
82
- playerId: number;
83
- competitionId: number;
84
- startSnapshotId: number | null;
85
- endSnapshotId: number | null;
86
- teamName: string | null;
87
- createdAt: Date;
88
- updatedAt: Date;
89
- };
90
-
91
- type Prisma_Base_Competition = {
92
- id: number;
93
- title: string;
94
- metric: Metric;
95
- type: CompetitionType;
96
- startsAt: Date;
97
- endsAt: Date;
98
- groupId: number | null;
99
- score: number;
100
- visible: boolean;
101
- verificationHash: string;
102
- createdAt: Date | null;
103
- updatedAt: Date | null;
104
- creatorIpHash: string | null;
105
- };
106
-
107
- type Prisma_Base_NameChange = {
108
- id: number;
109
- playerId: number;
110
- oldName: string;
111
- newName: string;
112
- status: NameChangeStatus;
113
- reviewContext: unknown | null;
114
- resolvedAt: Date | null;
115
- updatedAt: Date;
116
- createdAt: Date;
117
- };
118
-
119
- type Prisma_Base_Player = {
120
- id: number;
121
- username: string;
122
- displayName: string;
123
- type: PlayerType;
124
- build: PlayerBuild;
125
- status: PlayerStatus;
126
- country: Country | null;
127
- patron: boolean;
128
- exp: bigint;
129
- ehp: number;
130
- ehb: number;
131
- ttm: number;
132
- tt200m: number;
133
- registeredAt: Date;
134
- updatedAt: Date | null;
135
- lastChangedAt: Date | null;
136
- lastImportedAt: Date | null;
137
- latestSnapshotId: number | null;
138
- };
139
-
140
- type Prisma_Base_Record = {
141
- id: number;
142
- playerId: number;
143
- period: Period;
144
- metric: Metric;
145
- value: bigint;
146
- updatedAt: Date;
147
- };
148
-
149
- type Prisma_Base_Snapshot = {
150
- id: number;
151
- playerId: number;
152
- importedAt: Date | null;
153
- createdAt: Date;
154
- overallRank: number;
155
- overallExperience: bigint;
156
- attackRank: number;
157
- attackExperience: number;
158
- defenceRank: number;
159
- defenceExperience: number;
160
- strengthRank: number;
161
- strengthExperience: number;
162
- hitpointsRank: number;
163
- hitpointsExperience: number;
164
- rangedRank: number;
165
- rangedExperience: number;
166
- prayerRank: number;
167
- prayerExperience: number;
168
- magicRank: number;
169
- magicExperience: number;
170
- cookingRank: number;
171
- cookingExperience: number;
172
- woodcuttingRank: number;
173
- woodcuttingExperience: number;
174
- fletchingRank: number;
175
- fletchingExperience: number;
176
- fishingRank: number;
177
- fishingExperience: number;
178
- firemakingRank: number;
179
- firemakingExperience: number;
180
- craftingRank: number;
181
- craftingExperience: number;
182
- smithingRank: number;
183
- smithingExperience: number;
184
- miningRank: number;
185
- miningExperience: number;
186
- herbloreRank: number;
187
- herbloreExperience: number;
188
- agilityRank: number;
189
- agilityExperience: number;
190
- thievingRank: number;
191
- thievingExperience: number;
192
- slayerRank: number;
193
- slayerExperience: number;
194
- farmingRank: number;
195
- farmingExperience: number;
196
- runecraftingRank: number;
197
- runecraftingExperience: number;
198
- hunterRank: number;
199
- hunterExperience: number;
200
- constructionRank: number;
201
- constructionExperience: number;
202
- league_pointsRank: number;
203
- league_pointsScore: number;
204
- bounty_hunter_hunterRank: number;
205
- bounty_hunter_hunterScore: number;
206
- bounty_hunter_rogueScore: number;
207
- clue_scrolls_allRank: number;
208
- bounty_hunter_rogueRank: number;
209
- clue_scrolls_allScore: number;
210
- clue_scrolls_beginnerRank: number;
211
- clue_scrolls_easyRank: number;
212
- clue_scrolls_beginnerScore: number;
213
- clue_scrolls_easyScore: number;
214
- clue_scrolls_mediumRank: number;
215
- clue_scrolls_mediumScore: number;
216
- clue_scrolls_hardRank: number;
217
- clue_scrolls_hardScore: number;
218
- clue_scrolls_eliteRank: number;
219
- clue_scrolls_eliteScore: number;
220
- clue_scrolls_masterRank: number;
221
- clue_scrolls_masterScore: number;
222
- last_man_standingRank: number;
223
- last_man_standingScore: number;
224
- pvp_arenaRank: number;
225
- pvp_arenaScore: number;
226
- abyssal_sireRank: number;
227
- abyssal_sireKills: number;
228
- alchemical_hydraRank: number;
229
- alchemical_hydraKills: number;
230
- amoxliatlRank: number;
231
- amoxliatlKills: number;
232
- artioRank: number;
233
- artioKills: number;
234
- barrows_chestsRank: number;
235
- barrows_chestsKills: number;
236
- bryophytaKills: number;
237
- bryophytaRank: number;
238
- cerberusKills: number;
239
- chambers_of_xericRank: number;
240
- cerberusRank: number;
241
- callistoRank: number;
242
- callistoKills: number;
243
- calvarionRank: number;
244
- calvarionKills: number;
245
- chambers_of_xericKills: number;
246
- chambers_of_xeric_challenge_modeRank: number;
247
- chambers_of_xeric_challenge_modeKills: number;
248
- chaos_elementalKills: number;
249
- chaos_fanaticKills: number;
250
- chaos_fanaticRank: number;
251
- commander_zilyanaRank: number;
252
- chaos_elementalRank: number;
253
- commander_zilyanaKills: number;
254
- corporeal_beastRank: number;
255
- corporeal_beastKills: number;
256
- crazy_archaeologistRank: number;
257
- crazy_archaeologistKills: number;
258
- dagannoth_primeRank: number;
259
- dagannoth_primeKills: number;
260
- dagannoth_rexRank: number;
261
- dagannoth_rexKills: number;
262
- dagannoth_supremeRank: number;
263
- dagannoth_supremeKills: number;
264
- deranged_archaeologistRank: number;
265
- deranged_archaeologistKills: number;
266
- general_graardorRank: number;
267
- general_graardorKills: number;
268
- giant_moleRank: number;
269
- giant_moleKills: number;
270
- grotesque_guardiansRank: number;
271
- grotesque_guardiansKills: number;
272
- hesporiRank: number;
273
- hesporiKills: number;
274
- kalphite_queenKills: number;
275
- kalphite_queenRank: number;
276
- king_black_dragonRank: number;
277
- king_black_dragonKills: number;
278
- krakenRank: number;
279
- krakenKills: number;
280
- kreearraRank: number;
281
- kreearraKills: number;
282
- kril_tsutsarothRank: number;
283
- kril_tsutsarothKills: number;
284
- mimicRank: number;
285
- mimicKills: number;
286
- nightmareRank: number;
287
- nightmareKills: number;
288
- oborRank: number;
289
- oborKills: number;
290
- phantom_muspahRank: number;
291
- phantom_muspahKills: number;
292
- sarachnisRank: number;
293
- sarachnisKills: number;
294
- scorpiaRank: number;
295
- scorpiaKills: number;
296
- skotizoRank: number;
297
- skotizoKills: number;
298
- spindelRank: number;
299
- spindelKills: number;
300
- the_gauntletRank: number;
301
- the_gauntletKills: number;
302
- the_corrupted_gauntletKills: number;
303
- the_corrupted_gauntletRank: number;
304
- the_hueycoatlRank: number;
305
- the_hueycoatlKills: number;
306
- theatre_of_bloodRank: number;
307
- theatre_of_bloodKills: number;
308
- thermonuclear_smoke_devilRank: number;
309
- thermonuclear_smoke_devilKills: number;
310
- tombs_of_amascutRank: number;
311
- tombs_of_amascutKills: number;
312
- tombs_of_amascut_expertRank: number;
313
- tombs_of_amascut_expertKills: number;
314
- tzkal_zukRank: number;
315
- tzkal_zukKills: number;
316
- tztok_jadRank: number;
317
- tztok_jadKills: number;
318
- venenatisRank: number;
319
- venenatisKills: number;
320
- vetionRank: number;
321
- vetionKills: number;
322
- vorkathRank: number;
323
- vorkathKills: number;
324
- wintertodtRank: number;
325
- zalcanoRank: number;
326
- wintertodtKills: number;
327
- zalcanoKills: number;
328
- zulrahRank: number;
329
- zulrahKills: number;
330
- ehpValue: number;
331
- ehbValue: number;
332
- ehbRank: number;
333
- ehpRank: number;
334
- soul_wars_zealScore: number;
335
- soul_wars_zealRank: number;
336
- temporossKills: number;
337
- temporossRank: number;
338
- theatre_of_blood_hard_modeKills: number;
339
- theatre_of_blood_hard_modeRank: number;
340
- phosanis_nightmareKills: number;
341
- phosanis_nightmareRank: number;
342
- nexKills: number;
343
- nexRank: number;
344
- guardians_of_the_riftScore: number;
345
- guardians_of_the_riftRank: number;
346
- };
347
-
1
+ declare class BaseAPIClient {
2
+ private headers;
3
+ private baseUrl;
4
+ constructor(headers: object, baseUrl: string);
5
+ private buildParams;
6
+ private fetch;
7
+ private request;
8
+ private requestText;
9
+ postRequest<T>(path: string, body?: unknown): Promise<T>;
10
+ putRequest<T>(path: string, body?: unknown): Promise<T>;
11
+ deleteRequest<T>(path: string, body?: unknown): Promise<T>;
12
+ getRequest<T>(path: string, params?: unknown): Promise<T>;
13
+ getText(path: string, params?: unknown): Promise<string>;
14
+ }
348
15
 
349
- /**
350
- * Prisma currently seems to ignore the @map() in enum declarations.
351
- *
352
- * So by declaring this enum in the schema file:
353
- *
354
- * enum NameChangeStatus {
355
- * PENDING @map('pending')
356
- * DENIED @map('denied')
357
- * APPROVED @map('approved')
358
- * }
359
- *
360
- * you would expect the prisma client to then generate the following object:
361
- *
362
- * const NameChangeStatus = {
363
- * PENDING: 'pending',
364
- * DENIED: 'denied',
365
- * APPROVED: 'approved',
366
- * }
367
- *
368
- * but unfortunately, the mapping is only used for queries, and the actual esulting object is this:
369
- *
370
- * const NameChangeStatus = {
371
- * PENDING: 'PENDING',
372
- * DENIED: 'DENIED',
373
- * APPROVED: 'APPROVED',
374
- * }
375
- *
376
- * And because I'd hate having to call enum values in lowercase, like:
377
- * NameChangeStatus.pending
378
- * Metric.king_black_dragon
379
- * Period.day
380
- *
381
- * I'd rather do some mapping to ensure I have the best of both worlds,
382
- * lowercase database values, but with uppercase in code.
383
- * With the mappings below, we can now use prisma enums by calling them with uppercase, like:
384
- *
385
- * NameChangeStatus.PENDING
386
- * Metric.KING_BLACK_DRAGON
387
- * Period.DAY
388
- *
389
- */
390
16
  declare const Skill: {
391
17
  readonly OVERALL: "overall";
392
18
  readonly ATTACK: "attack";
@@ -455,6 +81,7 @@ declare const Boss: {
455
81
  readonly DAGANNOTH_REX: "dagannoth_rex";
456
82
  readonly DAGANNOTH_SUPREME: "dagannoth_supreme";
457
83
  readonly DERANGED_ARCHAEOLOGIST: "deranged_archaeologist";
84
+ readonly DOOM_OF_MOKHAIOTL: "doom_of_mokhaiotl";
458
85
  readonly DUKE_SUCELLUS: "duke_sucellus";
459
86
  readonly GENERAL_GRAARDOR: "general_graardor";
460
87
  readonly GIANT_MOLE: "giant_mole";
@@ -531,6 +158,7 @@ declare const Metric: {
531
158
  readonly DAGANNOTH_REX: "dagannoth_rex";
532
159
  readonly DAGANNOTH_SUPREME: "dagannoth_supreme";
533
160
  readonly DERANGED_ARCHAEOLOGIST: "deranged_archaeologist";
161
+ readonly DOOM_OF_MOKHAIOTL: "doom_of_mokhaiotl";
534
162
  readonly DUKE_SUCELLUS: "duke_sucellus";
535
163
  readonly GENERAL_GRAARDOR: "general_graardor";
536
164
  readonly GIANT_MOLE: "giant_mole";
@@ -618,331 +246,69 @@ declare const Metric: {
618
246
  readonly CONSTRUCTION: "construction";
619
247
  };
620
248
  type Metric = (typeof Metric)[keyof typeof Metric];
621
- declare const NameChangeStatus: {
622
- readonly PENDING: "pending";
623
- readonly DENIED: "denied";
624
- readonly APPROVED: "approved";
625
- };
626
- type NameChangeStatus = (typeof NameChangeStatus)[keyof typeof NameChangeStatus];
627
- declare const Period: {
628
- readonly FIVE_MIN: "five_min";
629
- readonly DAY: "day";
630
- readonly WEEK: "week";
631
- readonly MONTH: "month";
632
- readonly YEAR: "year";
633
- };
634
- type Period = (typeof Period)[keyof typeof Period];
635
- declare const PlayerType: {
636
- readonly UNKNOWN: "unknown";
637
- readonly REGULAR: "regular";
638
- readonly IRONMAN: "ironman";
639
- readonly HARDCORE: "hardcore";
640
- readonly ULTIMATE: "ultimate";
641
- };
642
- type PlayerType = (typeof PlayerType)[keyof typeof PlayerType];
643
- declare const PlayerAnnotationType: {
644
- readonly OPT_OUT: "opt_out";
645
- readonly OPT_OUT_GROUPS: "opt_out_groups";
646
- readonly OPT_OUT_COMPETITIONS: "opt_out_competitions";
647
- readonly BLOCKED: "blocked";
648
- readonly FAKE_F2P: "fake_f2p";
649
- };
650
- type PlayerAnnotationType = (typeof PlayerAnnotationType)[keyof typeof PlayerAnnotationType];
651
- declare const PlayerBuild: {
652
- readonly MAIN: "main";
653
- readonly F2P: "f2p";
654
- readonly F2P_LVL3: "f2p_lvl3";
655
- readonly LVL3: "lvl3";
656
- readonly ZERKER: "zerker";
657
- readonly DEF1: "def1";
658
- readonly HP10: "hp10";
659
- };
660
- type PlayerBuild = (typeof PlayerBuild)[keyof typeof PlayerBuild];
661
- declare const PlayerStatus: {
662
- readonly ACTIVE: "active";
663
- readonly UNRANKED: "unranked";
664
- readonly FLAGGED: "flagged";
665
- readonly ARCHIVED: "archived";
666
- readonly BANNED: "banned";
667
- };
668
- type PlayerStatus = (typeof PlayerStatus)[keyof typeof PlayerStatus];
249
+
250
+ declare enum MetricMeasure {
251
+ EXPERIENCE = "experience",
252
+ KILLS = "kills",
253
+ SCORE = "score",
254
+ VALUE = "value"
255
+ }
256
+
257
+ type AchievementMeasure = MetricMeasure | 'levels';
258
+
259
+ interface Achievement {
260
+ playerId: number;
261
+ name: string;
262
+ metric: Metric;
263
+ threshold: number;
264
+ accuracy: number | null;
265
+ createdAt: Date;
266
+ }
267
+
268
+ interface BossMetaConfig {
269
+ boss: Boss;
270
+ rate: number;
271
+ }
272
+
273
+ declare enum CompetitionCSVTableType {
274
+ TEAM = "team",
275
+ TEAMS = "teams",
276
+ PARTICIPANTS = "participants"
277
+ }
278
+
279
+ declare enum CompetitionStatus {
280
+ UPCOMING = "upcoming",
281
+ ONGOING = "ongoing",
282
+ FINISHED = "finished"
283
+ }
284
+
285
+ interface CompetitionTeam {
286
+ name: string;
287
+ participants: string[];
288
+ }
289
+
669
290
  declare const CompetitionType: {
670
291
  readonly CLASSIC: "classic";
671
292
  readonly TEAM: "team";
672
293
  };
673
294
  type CompetitionType = (typeof CompetitionType)[keyof typeof CompetitionType];
674
- declare const GroupRole: {
675
- readonly ACHIEVER: "achiever";
676
- readonly ADAMANT: "adamant";
677
- readonly ADEPT: "adept";
678
- readonly ADMINISTRATOR: "administrator";
679
- readonly ADMIRAL: "admiral";
680
- readonly ADVENTURER: "adventurer";
681
- readonly AIR: "air";
682
- readonly ANCHOR: "anchor";
683
- readonly APOTHECARY: "apothecary";
684
- readonly ARCHER: "archer";
685
- readonly ARMADYLEAN: "armadylean";
686
- readonly ARTILLERY: "artillery";
687
- readonly ARTISAN: "artisan";
688
- readonly ASGARNIAN: "asgarnian";
689
- readonly ASSASSIN: "assassin";
690
- readonly ASSISTANT: "assistant";
691
- readonly ASTRAL: "astral";
692
- readonly ATHLETE: "athlete";
693
- readonly ATTACKER: "attacker";
694
- readonly BANDIT: "bandit";
695
- readonly BANDOSIAN: "bandosian";
696
- readonly BARBARIAN: "barbarian";
697
- readonly BATTLEMAGE: "battlemage";
698
- readonly BEAST: "beast";
699
- readonly BERSERKER: "berserker";
700
- readonly BLISTERWOOD: "blisterwood";
701
- readonly BLOOD: "blood";
702
- readonly BLUE: "blue";
703
- readonly BOB: "bob";
704
- readonly BODY: "body";
705
- readonly BRASSICAN: "brassican";
706
- readonly BRAWLER: "brawler";
707
- readonly BRIGADIER: "brigadier";
708
- readonly BRIGAND: "brigand";
709
- readonly BRONZE: "bronze";
710
- readonly BRUISER: "bruiser";
711
- readonly BULWARK: "bulwark";
712
- readonly BURGLAR: "burglar";
713
- readonly BURNT: "burnt";
714
- readonly CADET: "cadet";
715
- readonly CAPTAIN: "captain";
716
- readonly CARRY: "carry";
717
- readonly CHAMPION: "champion";
718
- readonly CHAOS: "chaos";
719
- readonly CLERIC: "cleric";
720
- readonly COLLECTOR: "collector";
721
- readonly COLONEL: "colonel";
722
- readonly COMMANDER: "commander";
723
- readonly COMPETITOR: "competitor";
724
- readonly COMPLETIONIST: "completionist";
725
- readonly CONSTRUCTOR: "constructor";
726
- readonly COOK: "cook";
727
- readonly COORDINATOR: "coordinator";
728
- readonly CORPORAL: "corporal";
729
- readonly COSMIC: "cosmic";
730
- readonly COUNCILLOR: "councillor";
731
- readonly CRAFTER: "crafter";
732
- readonly CREW: "crew";
733
- readonly CRUSADER: "crusader";
734
- readonly CUTPURSE: "cutpurse";
735
- readonly DEATH: "death";
736
- readonly DEFENDER: "defender";
737
- readonly DEFILER: "defiler";
738
- readonly DEPUTY_OWNER: "deputy_owner";
739
- readonly DESTROYER: "destroyer";
740
- readonly DIAMOND: "diamond";
741
- readonly DISEASED: "diseased";
742
- readonly DOCTOR: "doctor";
743
- readonly DOGSBODY: "dogsbody";
744
- readonly DRAGON: "dragon";
745
- readonly DRAGONSTONE: "dragonstone";
746
- readonly DRUID: "druid";
747
- readonly DUELLIST: "duellist";
748
- readonly EARTH: "earth";
749
- readonly ELITE: "elite";
750
- readonly EMERALD: "emerald";
751
- readonly ENFORCER: "enforcer";
752
- readonly EPIC: "epic";
753
- readonly EXECUTIVE: "executive";
754
- readonly EXPERT: "expert";
755
- readonly EXPLORER: "explorer";
756
- readonly FARMER: "farmer";
757
- readonly FEEDER: "feeder";
758
- readonly FIGHTER: "fighter";
759
- readonly FIRE: "fire";
760
- readonly FIREMAKER: "firemaker";
761
- readonly FIRESTARTER: "firestarter";
762
- readonly FISHER: "fisher";
763
- readonly FLETCHER: "fletcher";
764
- readonly FORAGER: "forager";
765
- readonly FREMENNIK: "fremennik";
766
- readonly GAMER: "gamer";
767
- readonly GATHERER: "gatherer";
768
- readonly GENERAL: "general";
769
- readonly GNOME_CHILD: "gnome_child";
770
- readonly GNOME_ELDER: "gnome_elder";
771
- readonly GOBLIN: "goblin";
772
- readonly GOLD: "gold";
773
- readonly GOON: "goon";
774
- readonly GREEN: "green";
775
- readonly GREY: "grey";
776
- readonly GUARDIAN: "guardian";
777
- readonly GUTHIXIAN: "guthixian";
778
- readonly HARPOON: "harpoon";
779
- readonly HEALER: "healer";
780
- readonly HELLCAT: "hellcat";
781
- readonly HELPER: "helper";
782
- readonly HERBOLOGIST: "herbologist";
783
- readonly HERO: "hero";
784
- readonly HOLY: "holy";
785
- readonly HOARDER: "hoarder";
786
- readonly HUNTER: "hunter";
787
- readonly IGNITOR: "ignitor";
788
- readonly ILLUSIONIST: "illusionist";
789
- readonly IMP: "imp";
790
- readonly INFANTRY: "infantry";
791
- readonly INQUISITOR: "inquisitor";
792
- readonly IRON: "iron";
793
- readonly JADE: "jade";
794
- readonly JUSTICIAR: "justiciar";
795
- readonly KANDARIN: "kandarin";
796
- readonly KARAMJAN: "karamjan";
797
- readonly KHARIDIAN: "kharidian";
798
- readonly KITTEN: "kitten";
799
- readonly KNIGHT: "knight";
800
- readonly LABOURER: "labourer";
801
- readonly LAW: "law";
802
- readonly LEADER: "leader";
803
- readonly LEARNER: "learner";
804
- readonly LEGACY: "legacy";
805
- readonly LEGEND: "legend";
806
- readonly LEGIONNAIRE: "legionnaire";
807
- readonly LIEUTENANT: "lieutenant";
808
- readonly LOOTER: "looter";
809
- readonly LUMBERJACK: "lumberjack";
810
- readonly MAGIC: "magic";
811
- readonly MAGICIAN: "magician";
812
- readonly MAJOR: "major";
813
- readonly MAPLE: "maple";
814
- readonly MARSHAL: "marshal";
815
- readonly MASTER: "master";
816
- readonly MAXED: "maxed";
817
- readonly MEDIATOR: "mediator";
818
- readonly MEDIC: "medic";
819
- readonly MENTOR: "mentor";
820
- readonly MEMBER: "member";
821
- readonly MERCHANT: "merchant";
822
- readonly MIND: "mind";
823
- readonly MINER: "miner";
824
- readonly MINION: "minion";
825
- readonly MISTHALINIAN: "misthalinian";
826
- readonly MITHRIL: "mithril";
827
- readonly MODERATOR: "moderator";
828
- readonly MONARCH: "monarch";
829
- readonly MORYTANIAN: "morytanian";
830
- readonly MYSTIC: "mystic";
831
- readonly MYTH: "myth";
832
- readonly NATURAL: "natural";
833
- readonly NATURE: "nature";
834
- readonly NECROMANCER: "necromancer";
835
- readonly NINJA: "ninja";
836
- readonly NOBLE: "noble";
837
- readonly NOVICE: "novice";
838
- readonly NURSE: "nurse";
839
- readonly OAK: "oak";
840
- readonly OFFICER: "officer";
841
- readonly ONYX: "onyx";
842
- readonly OPAL: "opal";
843
- readonly ORACLE: "oracle";
844
- readonly ORANGE: "orange";
845
- readonly OWNER: "owner";
846
- readonly PAGE: "page";
847
- readonly PALADIN: "paladin";
848
- readonly PAWN: "pawn";
849
- readonly PILGRIM: "pilgrim";
850
- readonly PINE: "pine";
851
- readonly PINK: "pink";
852
- readonly PREFECT: "prefect";
853
- readonly PRIEST: "priest";
854
- readonly PRIVATE: "private";
855
- readonly PRODIGY: "prodigy";
856
- readonly PROSELYTE: "proselyte";
857
- readonly PROSPECTOR: "prospector";
858
- readonly PROTECTOR: "protector";
859
- readonly PURE: "pure";
860
- readonly PURPLE: "purple";
861
- readonly PYROMANCER: "pyromancer";
862
- readonly QUESTER: "quester";
863
- readonly RACER: "racer";
864
- readonly RAIDER: "raider";
865
- readonly RANGER: "ranger";
866
- readonly RECORD_CHASER: "record_chaser";
867
- readonly RECRUIT: "recruit";
868
- readonly RECRUITER: "recruiter";
869
- readonly RED_TOPAZ: "red_topaz";
870
- readonly RED: "red";
871
- readonly ROGUE: "rogue";
872
- readonly RUBY: "ruby";
873
- readonly RUNE: "rune";
874
- readonly RUNECRAFTER: "runecrafter";
875
- readonly SAGE: "sage";
876
- readonly SAPPHIRE: "sapphire";
877
- readonly SARADOMINIST: "saradominist";
878
- readonly SAVIOUR: "saviour";
879
- readonly SCAVENGER: "scavenger";
880
- readonly SCHOLAR: "scholar";
881
- readonly SCOURGE: "scourge";
882
- readonly SCOUT: "scout";
883
- readonly SCRIBE: "scribe";
884
- readonly SEER: "seer";
885
- readonly SENATOR: "senator";
886
- readonly SENTRY: "sentry";
887
- readonly SERENIST: "serenist";
888
- readonly SERGEANT: "sergeant";
889
- readonly SHAMAN: "shaman";
890
- readonly SHERIFF: "sheriff";
891
- readonly SHORT_GREEN_GUY: "short_green_guy";
892
- readonly SKILLER: "skiller";
893
- readonly SKULLED: "skulled";
894
- readonly SLAYER: "slayer";
895
- readonly SMITER: "smiter";
896
- readonly SMITH: "smith";
897
- readonly SMUGGLER: "smuggler";
898
- readonly SNIPER: "sniper";
899
- readonly SOUL: "soul";
900
- readonly SPECIALIST: "specialist";
901
- readonly SPEED_RUNNER: "speed_runner";
902
- readonly SPELLCASTER: "spellcaster";
903
- readonly SQUIRE: "squire";
904
- readonly STAFF: "staff";
905
- readonly STEEL: "steel";
906
- readonly STRIDER: "strider";
907
- readonly STRIKER: "striker";
908
- readonly SUMMONER: "summoner";
909
- readonly SUPERIOR: "superior";
910
- readonly SUPERVISOR: "supervisor";
911
- readonly TEACHER: "teacher";
912
- readonly TEMPLAR: "templar";
913
- readonly THERAPIST: "therapist";
914
- readonly THIEF: "thief";
915
- readonly TIRANNIAN: "tirannian";
916
- readonly TRIALIST: "trialist";
917
- readonly TRICKSTER: "trickster";
918
- readonly TZKAL: "tzkal";
919
- readonly TZTOK: "tztok";
920
- readonly UNHOLY: "unholy";
921
- readonly VAGRANT: "vagrant";
922
- readonly VANGUARD: "vanguard";
923
- readonly WALKER: "walker";
924
- readonly WANDERER: "wanderer";
925
- readonly WARDEN: "warden";
926
- readonly WARLOCK: "warlock";
927
- readonly WARRIOR: "warrior";
928
- readonly WATER: "water";
929
- readonly WILD: "wild";
930
- readonly WILLOW: "willow";
931
- readonly WILY: "wily";
932
- readonly WINTUMBER: "wintumber";
933
- readonly WITCH: "witch";
934
- readonly WIZARD: "wizard";
935
- readonly WORKER: "worker";
936
- readonly WRATH: "wrath";
937
- readonly XERICIAN: "xerician";
938
- readonly YELLOW: "yellow";
939
- readonly YEW: "yew";
940
- readonly ZAMORAKIAN: "zamorakian";
941
- readonly ZAROSIAN: "zarosian";
942
- readonly ZEALOT: "zealot";
943
- readonly ZENYTE: "zenyte";
944
- };
945
- type GroupRole = (typeof GroupRole)[keyof typeof GroupRole];
295
+
296
+ interface Competition {
297
+ id: number;
298
+ title: string;
299
+ metric: Metric;
300
+ type: CompetitionType;
301
+ startsAt: Date;
302
+ endsAt: Date;
303
+ groupId: number | null;
304
+ score: number;
305
+ visible: boolean;
306
+ verificationHash: string;
307
+ createdAt: Date | null;
308
+ updatedAt: Date | null;
309
+ creatorIpHash: string | null;
310
+ }
311
+
946
312
  declare const Country: {
947
313
  readonly AD: "AD";
948
314
  readonly AE: "AE";
@@ -1198,628 +564,888 @@ declare const Country: {
1198
564
  readonly ZW: "ZW";
1199
565
  };
1200
566
  type Country = (typeof Country)[keyof typeof Country];
1201
- declare const ActivityType: {
1202
- readonly JOINED: "joined";
1203
- readonly LEFT: "left";
1204
- readonly CHANGED_ROLE: "changed_role";
1205
- };
1206
- type ActivityType = (typeof ActivityType)[keyof typeof ActivityType];
1207
567
 
1208
- type Achievement = Omit<Prisma_Base_Achievement, 'threshold' | 'accuracy'> & {
1209
- threshold: number;
1210
- accuracy: number | null;
1211
- };
1212
- type Record = Omit<Prisma_Base_Record, 'value'> & {
1213
- value: number;
1214
- };
1215
- type Snapshot = Omit<Prisma_Base_Snapshot, 'overallExperience'> & {
1216
- overallExperience: number;
1217
- };
1218
- type Player = Omit<Prisma_Base_Player, 'exp' | 'latestSnapshotId'> & {
1219
- exp: number;
1220
- };
1221
- type Group = Omit<Prisma_Base_Group, 'creatorIpHash'>;
1222
- type Competition = Omit<Prisma_Base_Competition, 'creatorIpHash'>;
1223
- type NameChange = Omit<Prisma_Base_NameChange, 'reviewContext'> & {
1224
- reviewContext: SkipContext | DenyContext | null;
568
+ declare const Period: {
569
+ readonly FIVE_MIN: "five_min";
570
+ readonly DAY: "day";
571
+ readonly WEEK: "week";
572
+ readonly MONTH: "month";
573
+ readonly YEAR: "year";
1225
574
  };
1226
- type GroupSocialLinks = Omit<Prisma_Base_GroupSocialLinks, 'id' | 'groupId' | 'createdAt' | 'updatedAt'>;
1227
-
1228
- interface AchievementTemplate {
1229
- name: string;
1230
- metric: Metric;
1231
- measure?: string;
1232
- thresholds: number[];
1233
- getCurrentValue?: (snapshot: Snapshot, threshold: number) => number;
1234
- }
1235
- interface AchievementDefinition {
1236
- name: string;
1237
- metric: Metric;
1238
- measure: string;
1239
- threshold: number;
1240
- validate: (snapshot: Snapshot) => boolean;
1241
- getCurrentValue: (snapshot: Snapshot) => number;
1242
- }
1243
- interface ExtendedAchievement extends Achievement {
1244
- measure: string;
1245
- }
1246
- interface ExtendedAchievementWithPlayer extends ExtendedAchievement {
1247
- player: Player;
1248
- }
1249
- interface AchievementProgress extends Omit<ExtendedAchievement, 'createdAt'> {
1250
- createdAt: Date | null;
1251
- currentValue: number;
1252
- absoluteProgress: number;
1253
- relativeProgress: number;
1254
- }
575
+ type Period = (typeof Period)[keyof typeof Period];
1255
576
 
1256
- interface MeasuredDeltaProgress {
1257
- start: number;
1258
- end: number;
1259
- gained: number;
1260
- }
1261
- interface SkillDelta {
1262
- metric: Skill;
1263
- ehp: MeasuredDeltaProgress;
1264
- rank: MeasuredDeltaProgress;
1265
- level: MeasuredDeltaProgress;
1266
- experience: MeasuredDeltaProgress;
1267
- }
1268
- interface BossDelta {
1269
- metric: Boss;
1270
- ehb: MeasuredDeltaProgress;
1271
- rank: MeasuredDeltaProgress;
1272
- kills: MeasuredDeltaProgress;
1273
- }
1274
- interface ActivityDelta {
1275
- metric: Activity;
1276
- rank: MeasuredDeltaProgress;
1277
- score: MeasuredDeltaProgress;
1278
- }
1279
- interface ComputedMetricDelta {
1280
- metric: ComputedMetric;
1281
- rank: MeasuredDeltaProgress;
1282
- value: MeasuredDeltaProgress;
1283
- }
1284
- interface PlayerDeltasMap {
1285
- skills: MapOf<Skill, SkillDelta>;
1286
- bosses: MapOf<Boss, BossDelta>;
1287
- activities: MapOf<Activity, ActivityDelta>;
1288
- computed: MapOf<ComputedMetric, ComputedMetricDelta>;
1289
- }
1290
- interface DeltaLeaderboardEntry {
1291
- player: Player;
1292
- playerId: number;
1293
- startDate: Date;
1294
- endDate: Date;
1295
- gained: number;
1296
- }
1297
- interface DeltaGroupLeaderboardEntry {
1298
- player: Player;
1299
- startDate: Date;
1300
- endDate: Date;
1301
- data: {
1302
- start: number;
1303
- end: number;
1304
- gained: number;
1305
- };
577
+ declare enum EfficiencyAlgorithmType {
578
+ MAIN = "main",
579
+ IRONMAN = "ironman",
580
+ ULTIMATE = "ultimate",
581
+ LVL3 = "lvl3",
582
+ F2P = "f2p",
583
+ F2P_LVL3 = "f2p_lvl3",
584
+ F2P_IRONMAN = "f2p_ironman",
585
+ F2P_LVL3_IRONMAN = "f2p_lvl3_ironman",
586
+ DEF1 = "def1"
1306
587
  }
1307
588
 
1308
- type SnapshotFragment = Omit<Snapshot, 'id'>;
1309
- interface SkillValue {
1310
- metric: Skill;
1311
- rank: number;
1312
- level: number;
1313
- experience: number;
1314
- ehp: number;
1315
- }
1316
- interface BossValue {
1317
- metric: Boss;
1318
- rank: number;
1319
- kills: number;
1320
- ehb: number;
1321
- }
1322
- interface ActivityValue {
1323
- metric: Activity;
1324
- rank: number;
1325
- score: number;
1326
- }
1327
- interface ComputedMetricValue {
1328
- metric: ComputedMetric;
1329
- rank: number;
1330
- value: number;
1331
- }
1332
- interface MetricLeaders {
1333
- skills: MapOf<Skill, Omit<SkillValue, 'ehp'> & {
1334
- player: Player | null;
1335
- }>;
1336
- bosses: MapOf<Boss, Omit<BossValue, 'ehb'> & {
1337
- player: Player | null;
1338
- }>;
1339
- activities: MapOf<Activity, ActivityValue & {
1340
- player: Player | null;
1341
- }>;
1342
- computed: MapOf<ComputedMetric, ComputedMetricValue & {
1343
- player: Player | null;
589
+ declare const GroupRole: {
590
+ readonly ACHIEVER: "achiever";
591
+ readonly ADAMANT: "adamant";
592
+ readonly ADEPT: "adept";
593
+ readonly ADMINISTRATOR: "administrator";
594
+ readonly ADMIRAL: "admiral";
595
+ readonly ADVENTURER: "adventurer";
596
+ readonly AIR: "air";
597
+ readonly ANCHOR: "anchor";
598
+ readonly APOTHECARY: "apothecary";
599
+ readonly ARCHER: "archer";
600
+ readonly ARMADYLEAN: "armadylean";
601
+ readonly ARTILLERY: "artillery";
602
+ readonly ARTISAN: "artisan";
603
+ readonly ASGARNIAN: "asgarnian";
604
+ readonly ASSASSIN: "assassin";
605
+ readonly ASSISTANT: "assistant";
606
+ readonly ASTRAL: "astral";
607
+ readonly ATHLETE: "athlete";
608
+ readonly ATTACKER: "attacker";
609
+ readonly BANDIT: "bandit";
610
+ readonly BANDOSIAN: "bandosian";
611
+ readonly BARBARIAN: "barbarian";
612
+ readonly BATTLEMAGE: "battlemage";
613
+ readonly BEAST: "beast";
614
+ readonly BERSERKER: "berserker";
615
+ readonly BLISTERWOOD: "blisterwood";
616
+ readonly BLOOD: "blood";
617
+ readonly BLUE: "blue";
618
+ readonly BOB: "bob";
619
+ readonly BODY: "body";
620
+ readonly BRASSICAN: "brassican";
621
+ readonly BRAWLER: "brawler";
622
+ readonly BRIGADIER: "brigadier";
623
+ readonly BRIGAND: "brigand";
624
+ readonly BRONZE: "bronze";
625
+ readonly BRUISER: "bruiser";
626
+ readonly BULWARK: "bulwark";
627
+ readonly BURGLAR: "burglar";
628
+ readonly BURNT: "burnt";
629
+ readonly CADET: "cadet";
630
+ readonly CAPTAIN: "captain";
631
+ readonly CARRY: "carry";
632
+ readonly CHAMPION: "champion";
633
+ readonly CHAOS: "chaos";
634
+ readonly CLERIC: "cleric";
635
+ readonly COLLECTOR: "collector";
636
+ readonly COLONEL: "colonel";
637
+ readonly COMMANDER: "commander";
638
+ readonly COMPETITOR: "competitor";
639
+ readonly COMPLETIONIST: "completionist";
640
+ readonly CONSTRUCTOR: "constructor";
641
+ readonly COOK: "cook";
642
+ readonly COORDINATOR: "coordinator";
643
+ readonly CORPORAL: "corporal";
644
+ readonly COSMIC: "cosmic";
645
+ readonly COUNCILLOR: "councillor";
646
+ readonly CRAFTER: "crafter";
647
+ readonly CREW: "crew";
648
+ readonly CRUSADER: "crusader";
649
+ readonly CUTPURSE: "cutpurse";
650
+ readonly DEATH: "death";
651
+ readonly DEFENDER: "defender";
652
+ readonly DEFILER: "defiler";
653
+ readonly DEPUTY_OWNER: "deputy_owner";
654
+ readonly DESTROYER: "destroyer";
655
+ readonly DIAMOND: "diamond";
656
+ readonly DISEASED: "diseased";
657
+ readonly DOCTOR: "doctor";
658
+ readonly DOGSBODY: "dogsbody";
659
+ readonly DRAGON: "dragon";
660
+ readonly DRAGONSTONE: "dragonstone";
661
+ readonly DRUID: "druid";
662
+ readonly DUELLIST: "duellist";
663
+ readonly EARTH: "earth";
664
+ readonly ELITE: "elite";
665
+ readonly EMERALD: "emerald";
666
+ readonly ENFORCER: "enforcer";
667
+ readonly EPIC: "epic";
668
+ readonly EXECUTIVE: "executive";
669
+ readonly EXPERT: "expert";
670
+ readonly EXPLORER: "explorer";
671
+ readonly FARMER: "farmer";
672
+ readonly FEEDER: "feeder";
673
+ readonly FIGHTER: "fighter";
674
+ readonly FIRE: "fire";
675
+ readonly FIREMAKER: "firemaker";
676
+ readonly FIRESTARTER: "firestarter";
677
+ readonly FISHER: "fisher";
678
+ readonly FLETCHER: "fletcher";
679
+ readonly FORAGER: "forager";
680
+ readonly FREMENNIK: "fremennik";
681
+ readonly GAMER: "gamer";
682
+ readonly GATHERER: "gatherer";
683
+ readonly GENERAL: "general";
684
+ readonly GNOME_CHILD: "gnome_child";
685
+ readonly GNOME_ELDER: "gnome_elder";
686
+ readonly GOBLIN: "goblin";
687
+ readonly GOLD: "gold";
688
+ readonly GOON: "goon";
689
+ readonly GREEN: "green";
690
+ readonly GREY: "grey";
691
+ readonly GUARDIAN: "guardian";
692
+ readonly GUTHIXIAN: "guthixian";
693
+ readonly HARPOON: "harpoon";
694
+ readonly HEALER: "healer";
695
+ readonly HELLCAT: "hellcat";
696
+ readonly HELPER: "helper";
697
+ readonly HERBOLOGIST: "herbologist";
698
+ readonly HERO: "hero";
699
+ readonly HOLY: "holy";
700
+ readonly HOARDER: "hoarder";
701
+ readonly HUNTER: "hunter";
702
+ readonly IGNITOR: "ignitor";
703
+ readonly ILLUSIONIST: "illusionist";
704
+ readonly IMP: "imp";
705
+ readonly INFANTRY: "infantry";
706
+ readonly INQUISITOR: "inquisitor";
707
+ readonly IRON: "iron";
708
+ readonly JADE: "jade";
709
+ readonly JUSTICIAR: "justiciar";
710
+ readonly KANDARIN: "kandarin";
711
+ readonly KARAMJAN: "karamjan";
712
+ readonly KHARIDIAN: "kharidian";
713
+ readonly KITTEN: "kitten";
714
+ readonly KNIGHT: "knight";
715
+ readonly LABOURER: "labourer";
716
+ readonly LAW: "law";
717
+ readonly LEADER: "leader";
718
+ readonly LEARNER: "learner";
719
+ readonly LEGACY: "legacy";
720
+ readonly LEGEND: "legend";
721
+ readonly LEGIONNAIRE: "legionnaire";
722
+ readonly LIEUTENANT: "lieutenant";
723
+ readonly LOOTER: "looter";
724
+ readonly LUMBERJACK: "lumberjack";
725
+ readonly MAGIC: "magic";
726
+ readonly MAGICIAN: "magician";
727
+ readonly MAJOR: "major";
728
+ readonly MAPLE: "maple";
729
+ readonly MARSHAL: "marshal";
730
+ readonly MASTER: "master";
731
+ readonly MAXED: "maxed";
732
+ readonly MEDIATOR: "mediator";
733
+ readonly MEDIC: "medic";
734
+ readonly MENTOR: "mentor";
735
+ readonly MEMBER: "member";
736
+ readonly MERCHANT: "merchant";
737
+ readonly MIND: "mind";
738
+ readonly MINER: "miner";
739
+ readonly MINION: "minion";
740
+ readonly MISTHALINIAN: "misthalinian";
741
+ readonly MITHRIL: "mithril";
742
+ readonly MODERATOR: "moderator";
743
+ readonly MONARCH: "monarch";
744
+ readonly MORYTANIAN: "morytanian";
745
+ readonly MYSTIC: "mystic";
746
+ readonly MYTH: "myth";
747
+ readonly NATURAL: "natural";
748
+ readonly NATURE: "nature";
749
+ readonly NECROMANCER: "necromancer";
750
+ readonly NINJA: "ninja";
751
+ readonly NOBLE: "noble";
752
+ readonly NOVICE: "novice";
753
+ readonly NURSE: "nurse";
754
+ readonly OAK: "oak";
755
+ readonly OFFICER: "officer";
756
+ readonly ONYX: "onyx";
757
+ readonly OPAL: "opal";
758
+ readonly ORACLE: "oracle";
759
+ readonly ORANGE: "orange";
760
+ readonly OWNER: "owner";
761
+ readonly PAGE: "page";
762
+ readonly PALADIN: "paladin";
763
+ readonly PAWN: "pawn";
764
+ readonly PILGRIM: "pilgrim";
765
+ readonly PINE: "pine";
766
+ readonly PINK: "pink";
767
+ readonly PREFECT: "prefect";
768
+ readonly PRIEST: "priest";
769
+ readonly PRIVATE: "private";
770
+ readonly PRODIGY: "prodigy";
771
+ readonly PROSELYTE: "proselyte";
772
+ readonly PROSPECTOR: "prospector";
773
+ readonly PROTECTOR: "protector";
774
+ readonly PURE: "pure";
775
+ readonly PURPLE: "purple";
776
+ readonly PYROMANCER: "pyromancer";
777
+ readonly QUESTER: "quester";
778
+ readonly RACER: "racer";
779
+ readonly RAIDER: "raider";
780
+ readonly RANGER: "ranger";
781
+ readonly RECORD_CHASER: "record_chaser";
782
+ readonly RECRUIT: "recruit";
783
+ readonly RECRUITER: "recruiter";
784
+ readonly RED_TOPAZ: "red_topaz";
785
+ readonly RED: "red";
786
+ readonly ROGUE: "rogue";
787
+ readonly RUBY: "ruby";
788
+ readonly RUNE: "rune";
789
+ readonly RUNECRAFTER: "runecrafter";
790
+ readonly SAGE: "sage";
791
+ readonly SAPPHIRE: "sapphire";
792
+ readonly SARADOMINIST: "saradominist";
793
+ readonly SAVIOUR: "saviour";
794
+ readonly SCAVENGER: "scavenger";
795
+ readonly SCHOLAR: "scholar";
796
+ readonly SCOURGE: "scourge";
797
+ readonly SCOUT: "scout";
798
+ readonly SCRIBE: "scribe";
799
+ readonly SEER: "seer";
800
+ readonly SENATOR: "senator";
801
+ readonly SENTRY: "sentry";
802
+ readonly SERENIST: "serenist";
803
+ readonly SERGEANT: "sergeant";
804
+ readonly SHAMAN: "shaman";
805
+ readonly SHERIFF: "sheriff";
806
+ readonly SHORT_GREEN_GUY: "short_green_guy";
807
+ readonly SKILLER: "skiller";
808
+ readonly SKULLED: "skulled";
809
+ readonly SLAYER: "slayer";
810
+ readonly SMITER: "smiter";
811
+ readonly SMITH: "smith";
812
+ readonly SMUGGLER: "smuggler";
813
+ readonly SNIPER: "sniper";
814
+ readonly SOUL: "soul";
815
+ readonly SPECIALIST: "specialist";
816
+ readonly SPEED_RUNNER: "speed_runner";
817
+ readonly SPELLCASTER: "spellcaster";
818
+ readonly SQUIRE: "squire";
819
+ readonly STAFF: "staff";
820
+ readonly STEEL: "steel";
821
+ readonly STRIDER: "strider";
822
+ readonly STRIKER: "striker";
823
+ readonly SUMMONER: "summoner";
824
+ readonly SUPERIOR: "superior";
825
+ readonly SUPERVISOR: "supervisor";
826
+ readonly TEACHER: "teacher";
827
+ readonly TEMPLAR: "templar";
828
+ readonly THERAPIST: "therapist";
829
+ readonly THIEF: "thief";
830
+ readonly TIRANNIAN: "tirannian";
831
+ readonly TRIALIST: "trialist";
832
+ readonly TRICKSTER: "trickster";
833
+ readonly TZKAL: "tzkal";
834
+ readonly TZTOK: "tztok";
835
+ readonly UNHOLY: "unholy";
836
+ readonly VAGRANT: "vagrant";
837
+ readonly VANGUARD: "vanguard";
838
+ readonly WALKER: "walker";
839
+ readonly WANDERER: "wanderer";
840
+ readonly WARDEN: "warden";
841
+ readonly WARLOCK: "warlock";
842
+ readonly WARRIOR: "warrior";
843
+ readonly WATER: "water";
844
+ readonly WILD: "wild";
845
+ readonly WILLOW: "willow";
846
+ readonly WILY: "wily";
847
+ readonly WINTUMBER: "wintumber";
848
+ readonly WITCH: "witch";
849
+ readonly WIZARD: "wizard";
850
+ readonly WORKER: "worker";
851
+ readonly WRATH: "wrath";
852
+ readonly XERICIAN: "xerician";
853
+ readonly YELLOW: "yellow";
854
+ readonly YEW: "yew";
855
+ readonly ZAMORAKIAN: "zamorakian";
856
+ readonly ZAROSIAN: "zarosian";
857
+ readonly ZEALOT: "zealot";
858
+ readonly ZENYTE: "zenyte";
859
+ };
860
+ type GroupRole = (typeof GroupRole)[keyof typeof GroupRole];
861
+
862
+ interface GroupRoleOrder {
863
+ groupId: number;
864
+ role: GroupRole;
865
+ index: number;
866
+ }
867
+
868
+ interface GroupSocialLinks {
869
+ id: number;
870
+ groupId: number;
871
+ website: string | null;
872
+ discord: string | null;
873
+ twitter: string | null;
874
+ youtube: string | null;
875
+ twitch: string | null;
876
+ createdAt: Date;
877
+ updatedAt: Date;
878
+ }
879
+
880
+ interface Group {
881
+ id: number;
882
+ name: string;
883
+ clanChat: string | null;
884
+ description: string | null;
885
+ homeworld: number | null;
886
+ verified: boolean;
887
+ patron: boolean;
888
+ visible: boolean;
889
+ profileImage: string | null;
890
+ bannerImage: string | null;
891
+ score: number;
892
+ verificationHash: string;
893
+ createdAt: Date;
894
+ updatedAt: Date;
895
+ creatorIpHash: string | null;
896
+ }
897
+
898
+ declare const MemberActivityType: {
899
+ readonly JOINED: "joined";
900
+ readonly LEFT: "left";
901
+ readonly CHANGED_ROLE: "changed_role";
902
+ };
903
+ type MemberActivityType = (typeof MemberActivityType)[keyof typeof MemberActivityType];
904
+
905
+ interface MemberActivity {
906
+ groupId: number;
907
+ playerId: number;
908
+ type: MemberActivityType;
909
+ role: GroupRole | null;
910
+ previousRole: GroupRole | null;
911
+ createdAt: Date;
912
+ }
913
+
914
+ interface Membership {
915
+ playerId: number;
916
+ groupId: number;
917
+ role: GroupRole;
918
+ createdAt: Date;
919
+ updatedAt: Date;
920
+ }
921
+
922
+ interface MetricDelta {
923
+ start: number;
924
+ end: number;
925
+ gained: number;
926
+ }
927
+
928
+ declare enum MetricType {
929
+ SKILL = "skill",
930
+ BOSS = "boss",
931
+ ACTIVITY = "activity",
932
+ COMPUTED = "computed"
933
+ }
934
+
935
+ type NameChangeDenyContext = {
936
+ reason: 'manual_review';
937
+ } | {
938
+ reason: 'old_stats_cannot_be_found';
939
+ } | {
940
+ reason: 'new_name_not_on_the_hiscores';
941
+ } | {
942
+ reason: 'negative_gains';
943
+ negativeGains: Record<Metric, number>;
944
+ };
945
+ type NameChangeSkipContext = {
946
+ reason: 'transition_period_too_long';
947
+ maxHoursDiff: number;
948
+ hoursDiff: number;
949
+ } | {
950
+ reason: 'excessive_gains';
951
+ ehpDiff: number;
952
+ ehbDiff: number;
953
+ hoursDiff: number;
954
+ } | {
955
+ reason: 'total_level_too_low';
956
+ minTotalLevel: number;
957
+ totalLevel: number;
958
+ };
959
+ type NameChangeReviewContext = NameChangeSkipContext | NameChangeDenyContext;
960
+
961
+ declare const NameChangeStatus: {
962
+ readonly PENDING: "pending";
963
+ readonly DENIED: "denied";
964
+ readonly APPROVED: "approved";
965
+ };
966
+ type NameChangeStatus = (typeof NameChangeStatus)[keyof typeof NameChangeStatus];
967
+
968
+ interface NameChange {
969
+ id: number;
970
+ playerId: number;
971
+ oldName: string;
972
+ newName: string;
973
+ status: NameChangeStatus;
974
+ reviewContext: NameChangeReviewContext | null;
975
+ resolvedAt: Date | null;
976
+ createdAt: Date;
977
+ updatedAt: Date;
978
+ }
979
+
980
+ interface Participation {
981
+ playerId: number;
982
+ competitionId: number;
983
+ startSnapshotId: number | null;
984
+ endSnapshotId: number | null;
985
+ teamName: string | null;
986
+ createdAt: Date;
987
+ updatedAt: Date;
988
+ }
989
+
990
+ declare const PlayerAnnotationType: {
991
+ readonly OPT_OUT: "opt_out";
992
+ readonly OPT_OUT_GROUPS: "opt_out_groups";
993
+ readonly OPT_OUT_COMPETITIONS: "opt_out_competitions";
994
+ readonly BLOCKED: "blocked";
995
+ readonly FAKE_F2P: "fake_f2p";
996
+ };
997
+ type PlayerAnnotationType = (typeof PlayerAnnotationType)[keyof typeof PlayerAnnotationType];
998
+
999
+ interface PlayerAnnotation {
1000
+ playerId: number;
1001
+ type: PlayerAnnotationType;
1002
+ createdAt: Date;
1003
+ }
1004
+
1005
+ interface PlayerArchive {
1006
+ playerId: number;
1007
+ previousUsername: string;
1008
+ archiveUsername: string;
1009
+ restoredUsername: string | null;
1010
+ createdAt: Date;
1011
+ restoredAt: Date | null;
1012
+ }
1013
+
1014
+ declare const PlayerBuild: {
1015
+ readonly MAIN: "main";
1016
+ readonly F2P: "f2p";
1017
+ readonly F2P_LVL3: "f2p_lvl3";
1018
+ readonly LVL3: "lvl3";
1019
+ readonly ZERKER: "zerker";
1020
+ readonly DEF1: "def1";
1021
+ readonly HP10: "hp10";
1022
+ };
1023
+ type PlayerBuild = (typeof PlayerBuild)[keyof typeof PlayerBuild];
1024
+
1025
+ declare const PlayerStatus: {
1026
+ readonly ACTIVE: "active";
1027
+ readonly UNRANKED: "unranked";
1028
+ readonly FLAGGED: "flagged";
1029
+ readonly ARCHIVED: "archived";
1030
+ readonly BANNED: "banned";
1031
+ };
1032
+ type PlayerStatus = (typeof PlayerStatus)[keyof typeof PlayerStatus];
1033
+
1034
+ declare const PlayerType: {
1035
+ readonly UNKNOWN: "unknown";
1036
+ readonly REGULAR: "regular";
1037
+ readonly IRONMAN: "ironman";
1038
+ readonly HARDCORE: "hardcore";
1039
+ readonly ULTIMATE: "ultimate";
1040
+ };
1041
+ type PlayerType = (typeof PlayerType)[keyof typeof PlayerType];
1042
+
1043
+ interface Player {
1044
+ id: number;
1045
+ username: string;
1046
+ displayName: string;
1047
+ type: PlayerType;
1048
+ build: PlayerBuild;
1049
+ status: PlayerStatus;
1050
+ country: Country | null;
1051
+ patron: boolean;
1052
+ exp: number;
1053
+ ehp: number;
1054
+ ehb: number;
1055
+ ttm: number;
1056
+ tt200m: number;
1057
+ registeredAt: Date;
1058
+ updatedAt: Date | null;
1059
+ lastChangedAt: Date | null;
1060
+ lastImportedAt: Date | null;
1061
+ latestSnapshotId: number | null;
1062
+ }
1063
+
1064
+ interface Record$1 {
1065
+ playerId: number;
1066
+ period: Period;
1067
+ metric: Metric;
1068
+ value: number;
1069
+ updatedAt: Date;
1070
+ }
1071
+
1072
+ interface SkillMetaBonus {
1073
+ originSkill: Skill;
1074
+ bonusSkill: Skill;
1075
+ startExp: number;
1076
+ endExp: number;
1077
+ maxBonus?: number;
1078
+ end: boolean;
1079
+ ratio: number;
1080
+ }
1081
+
1082
+ interface SkillMetaMethod {
1083
+ rate: number;
1084
+ realRate?: number;
1085
+ startExp: number;
1086
+ description: string;
1087
+ }
1088
+
1089
+ interface SkillMetaConfig {
1090
+ skill: Skill;
1091
+ methods: Array<SkillMetaMethod>;
1092
+ bonuses: SkillMetaBonus[];
1093
+ }
1094
+
1095
+ /**
1096
+ * Response types are used to format the data returned by the API.
1097
+ *
1098
+ * Although sometimes very similar to our database models,
1099
+ * they often include transformations, additional properties or sensitive field omissions.
1100
+ */
1101
+
1102
+ interface AchievementResponse extends Achievement {
1103
+ measure: AchievementMeasure;
1104
+ }
1105
+
1106
+ /**
1107
+ * Response types are used to format the data returned by the API.
1108
+ *
1109
+ * Although sometimes very similar to our database models,
1110
+ * they often include transformations, additional properties or sensitive field omissions.
1111
+ */
1112
+
1113
+ interface AchievementProgressResponse extends Omit<AchievementResponse, 'createdAt'> {
1114
+ createdAt: Date | null;
1115
+ currentValue: number;
1116
+ absoluteProgress: number;
1117
+ relativeProgress: number;
1118
+ }
1119
+
1120
+ /**
1121
+ * Response types are used to format the data returned by the API.
1122
+ *
1123
+ * Although sometimes very similar to our database models,
1124
+ * they often include transformations, additional properties or sensitive field omissions.
1125
+ */
1126
+
1127
+ interface GroupResponse extends Omit<Group, 'verificationHash' | 'creatorIpHash'> {
1128
+ memberCount: number;
1129
+ }
1130
+
1131
+ /**
1132
+ * Response types are used to format the data returned by the API.
1133
+ *
1134
+ * Although sometimes very similar to our database models,
1135
+ * they often include transformations, additional properties or sensitive field omissions.
1136
+ */
1137
+
1138
+ interface CompetitionResponse extends Omit<Competition, 'verificationHash' | 'creatorIpHash'> {
1139
+ participantCount: number;
1140
+ group?: GroupResponse;
1141
+ }
1142
+
1143
+ /**
1144
+ * Response types are used to format the data returned by the API.
1145
+ *
1146
+ * Although sometimes very similar to our database models,
1147
+ * they often include transformations, additional properties or sensitive field omissions.
1148
+ */
1149
+
1150
+ type ParticipationResponse = Omit<Participation, 'startSnapshotId' | 'endSnapshotId'>;
1151
+
1152
+ /**
1153
+ * Response types are used to format the data returned by the API.
1154
+ *
1155
+ * Although sometimes very similar to our database models,
1156
+ * they often include transformations, additional properties or sensitive field omissions.
1157
+ */
1158
+
1159
+ type PlayerResponse = Omit<Player, 'latestSnapshotId'>;
1160
+
1161
+ /**
1162
+ * Response types are used to format the data returned by the API.
1163
+ *
1164
+ * Although sometimes very similar to our database models,
1165
+ * they often include transformations, additional properties or sensitive field omissions.
1166
+ */
1167
+
1168
+ interface CompetitionDetailsResponse extends CompetitionResponse {
1169
+ participations: Array<ParticipationResponse & {
1170
+ player: PlayerResponse;
1171
+ progress: MetricDelta;
1172
+ levels: MetricDelta;
1344
1173
  }>;
1345
1174
  }
1346
- interface FormattedSnapshot {
1175
+
1176
+ /**
1177
+ * Response types are used to format the data returned by the API.
1178
+ *
1179
+ * Although sometimes very similar to our database models,
1180
+ * they often include transformations, additional properties or sensitive field omissions.
1181
+ */
1182
+
1183
+ interface SkillData {
1184
+ metric: Skill;
1185
+ rank: number;
1186
+ level: number;
1187
+ experience: number;
1188
+ ehp: number;
1189
+ }
1190
+ interface BossData {
1191
+ metric: Boss;
1192
+ rank: number;
1193
+ kills: number;
1194
+ ehb: number;
1195
+ }
1196
+ interface ActivityData {
1197
+ metric: Activity;
1198
+ rank: number;
1199
+ score: number;
1200
+ }
1201
+ interface ComputeMetricData {
1202
+ metric: ComputedMetric;
1203
+ rank: number;
1204
+ value: number;
1205
+ }
1206
+ interface SnapshotResponse {
1347
1207
  id: number;
1348
1208
  playerId: number;
1349
1209
  createdAt: Date;
1350
1210
  importedAt: Date | null;
1351
1211
  data: {
1352
- skills: MapOf<Skill, SkillValue>;
1353
- bosses: MapOf<Boss, BossValue>;
1354
- activities: MapOf<Activity, ActivityValue>;
1355
- computed: MapOf<ComputedMetric, ComputedMetricValue>;
1212
+ skills: Record<Skill, SkillData>;
1213
+ bosses: Record<Boss, BossData>;
1214
+ activities: Record<Activity, ActivityData>;
1215
+ computed: Record<ComputedMetric, ComputeMetricData>;
1356
1216
  };
1357
1217
  }
1358
1218
 
1359
- interface GroupListItem extends Omit<Group, 'verificationHash'> {
1360
- memberCount: number;
1361
- }
1362
- interface GroupDetails extends GroupListItem {
1363
- socialLinks: GroupSocialLinks;
1364
- memberships: MembershipWithPlayer[];
1365
- roleOrders: GroupRoleOrder[];
1366
- }
1367
- interface MembershipWithGroup extends Membership {
1368
- group: GroupListItem;
1369
- }
1370
- interface MembershipWithPlayer extends Membership {
1371
- player: Player;
1219
+ /**
1220
+ * Response types are used to format the data returned by the API.
1221
+ *
1222
+ * Although sometimes very similar to our database models,
1223
+ * they often include transformations, additional properties or sensitive field omissions.
1224
+ */
1225
+
1226
+ type GroupRoleOrderResponse = GroupRoleOrder;
1227
+
1228
+ /**
1229
+ * Response types are used to format the data returned by the API.
1230
+ *
1231
+ * Although sometimes very similar to our database models,
1232
+ * they often include transformations, additional properties or sensitive field omissions.
1233
+ */
1234
+
1235
+ type GroupSocialLinksResponse = Pick<GroupSocialLinks, 'website' | 'discord' | 'twitter' | 'youtube' | 'twitch'>;
1236
+
1237
+ /**
1238
+ * Response types are used to format the data returned by the API.
1239
+ *
1240
+ * Although sometimes very similar to our database models,
1241
+ * they often include transformations, additional properties or sensitive field omissions.
1242
+ */
1243
+
1244
+ type MembershipResponse = Membership;
1245
+
1246
+ /**
1247
+ * Response types are used to format the data returned by the API.
1248
+ *
1249
+ * Although sometimes very similar to our database models,
1250
+ * they often include transformations, additional properties or sensitive field omissions.
1251
+ */
1252
+
1253
+ interface GroupDetailsResponse extends GroupResponse {
1254
+ socialLinks: GroupSocialLinksResponse;
1255
+ roleOrders: Array<GroupRoleOrderResponse>;
1256
+ memberships: Array<MembershipResponse & {
1257
+ player: PlayerResponse;
1258
+ }>;
1372
1259
  }
1373
- interface MemberInput {
1374
- username: string;
1375
- role: string | GroupRole;
1260
+
1261
+ /**
1262
+ * Response types are used to format the data returned by the API.
1263
+ *
1264
+ * Although sometimes very similar to our database models,
1265
+ * they often include transformations, additional properties or sensitive field omissions.
1266
+ */
1267
+ interface GroupHiscoresEntryResponse {
1268
+ player: PlayerResponse;
1269
+ data: GroupHiscoresSkillData | GroupHiscoresBossData | GroupHiscoresActivityData | GroupHiscoresComputedMetricData;
1376
1270
  }
1377
- interface GroupHiscoresSkillItem {
1271
+ interface GroupHiscoresSkillData {
1378
1272
  type: 'skill';
1379
1273
  rank: number;
1380
1274
  level: number;
1381
1275
  experience: number;
1382
1276
  }
1383
- interface GroupHiscoresBossItem {
1277
+ interface GroupHiscoresBossData {
1384
1278
  type: 'boss';
1385
1279
  rank: number;
1386
1280
  kills: number;
1387
1281
  }
1388
- interface GroupHiscoresActivityItem {
1282
+ interface GroupHiscoresActivityData {
1389
1283
  type: 'activity';
1390
1284
  rank: number;
1391
1285
  score: number;
1392
1286
  }
1393
- interface GroupHiscoresComputedMetricItem {
1287
+ interface GroupHiscoresComputedMetricData {
1394
1288
  type: 'computed';
1395
1289
  rank: number;
1396
1290
  value: number;
1397
1291
  }
1398
- interface GroupHiscoresEntry {
1399
- player: Player;
1400
- data: GroupHiscoresSkillItem | GroupHiscoresBossItem | GroupHiscoresActivityItem | GroupHiscoresComputedMetricItem;
1401
- }
1402
- interface GroupStatistics {
1403
- maxedCombatCount: number;
1404
- maxedTotalCount: number;
1405
- maxed200msCount: number;
1406
- averageStats: FormattedSnapshot;
1407
- metricLeaders: MetricLeaders;
1408
- }
1409
- type MemberActivityWithPlayer = MemberActivity & {
1410
- player: Player;
1411
- };
1412
1292
 
1413
- type CleanCompetition = Omit<Competition, 'verificationHash'>;
1414
- type CleanParticipation = Omit<Participation, 'startSnapshotId' | 'endSnapshotId'>;
1415
- interface CompetitionListItem extends CleanCompetition {
1416
- group?: GroupListItem;
1417
- participantCount: number;
1418
- }
1419
- interface CompetitionDetails extends CompetitionListItem {
1420
- participations: ParticipationWithPlayerAndProgress[];
1421
- }
1422
- interface CompetitionWithParticipations extends CompetitionListItem {
1423
- participations: ParticipationWithPlayer[];
1424
- }
1425
- interface ParticipationWithCompetition extends CleanParticipation {
1426
- competition: CompetitionListItem;
1427
- }
1428
- interface ParticipationWithPlayer extends CleanParticipation {
1429
- player: Player;
1430
- }
1431
- interface ParticipationWithPlayerAndProgress extends ParticipationWithPlayer {
1432
- progress: MeasuredDeltaProgress;
1433
- levels: MeasuredDeltaProgress;
1434
- }
1435
- interface ParticipationWithCompetitionAndStandings extends ParticipationWithCompetition {
1436
- progress: MeasuredDeltaProgress;
1437
- levels: MeasuredDeltaProgress;
1438
- rank: number;
1439
- }
1440
- interface Team {
1441
- name: string;
1442
- participants: string[];
1443
- }
1444
- type Top5ProgressResult = Array<{
1445
- player: Player;
1446
- history: Array<{
1293
+ /**
1294
+ * Response types are used to format the data returned by the API.
1295
+ *
1296
+ * Although sometimes very similar to our database models,
1297
+ * they often include transformations, additional properties or sensitive field omissions.
1298
+ */
1299
+
1300
+ interface GroupMetricLeadersResponse {
1301
+ skills: Record<Skill, {
1302
+ player: PlayerResponse | null;
1303
+ metric: Skill;
1304
+ rank: number;
1305
+ level: number;
1306
+ experience: number;
1307
+ }>;
1308
+ bosses: Record<Boss, {
1309
+ player: PlayerResponse | null;
1310
+ metric: Boss;
1311
+ rank: number;
1312
+ kills: number;
1313
+ }>;
1314
+ activities: Record<Activity, {
1315
+ player: PlayerResponse | null;
1316
+ metric: Activity;
1317
+ rank: number;
1318
+ score: number;
1319
+ }>;
1320
+ computed: Record<ComputedMetric, {
1321
+ player: PlayerResponse | null;
1322
+ metric: ComputedMetric;
1323
+ rank: number;
1447
1324
  value: number;
1448
- date: Date;
1449
1325
  }>;
1450
- }>;
1451
-
1452
- declare enum EfficiencyAlgorithmType {
1453
- MAIN = "main",
1454
- IRONMAN = "ironman",
1455
- ULTIMATE = "ultimate",
1456
- LVL3 = "lvl3",
1457
- F2P = "f2p",
1458
- F2P_LVL3 = "f2p_lvl3",
1459
- F2P_IRONMAN = "f2p_ironman",
1460
- F2P_LVL3_IRONMAN = "f2p_lvl3_ironman",
1461
- DEF1 = "def1"
1462
- }
1463
- interface SkillMetaMethod {
1464
- rate: number;
1465
- realRate?: number;
1466
- startExp: number;
1467
- description: string;
1468
- }
1469
- interface SkillMetaConfig {
1470
- skill: Skill;
1471
- methods: Array<SkillMetaMethod>;
1472
- bonuses: Bonus[];
1473
- }
1474
- interface BossMetaConfig {
1475
- boss: Boss;
1476
- rate: number;
1477
- }
1478
- interface Bonus {
1479
- originSkill: Skill;
1480
- bonusSkill: Skill;
1481
- startExp: number;
1482
- endExp: number;
1483
- maxBonus?: number;
1484
- end: boolean;
1485
- ratio: number;
1486
1326
  }
1487
1327
 
1488
- type DenyContext = {
1489
- reason: 'manual_review';
1490
- } | {
1491
- reason: 'old_stats_cannot_be_found';
1492
- } | {
1493
- reason: 'new_name_not_on_the_hiscores';
1494
- } | {
1495
- reason: 'negative_gains';
1496
- negativeGains: MapOf<Metric, number>;
1497
- };
1498
- type SkipContext = {
1499
- reason: 'transition_period_too_long';
1500
- maxHoursDiff: number;
1501
- hoursDiff: number;
1502
- } | {
1503
- reason: 'excessive_gains';
1504
- ehpDiff: number;
1505
- ehbDiff: number;
1506
- hoursDiff: number;
1507
- } | {
1508
- reason: 'total_level_too_low';
1509
- minTotalLevel: number;
1510
- totalLevel: number;
1511
- };
1512
- type NameChangeDetails = {
1513
- nameChange: NameChange;
1514
- data?: {
1515
- isNewOnHiscores: boolean;
1516
- isOldOnHiscores: boolean;
1517
- isNewTracked: boolean;
1518
- hasNegativeGains: boolean;
1519
- negativeGains: MapOf<Metric, number> | null;
1520
- timeDiff: number;
1521
- hoursDiff: number;
1522
- ehpDiff: number;
1523
- ehbDiff: number;
1524
- oldStats: FormattedSnapshot;
1525
- newStats: FormattedSnapshot | null;
1526
- };
1527
- };
1528
- type NameChangeWithPlayer = NameChange & {
1529
- player: Player;
1530
- };
1328
+ /**
1329
+ * Response types are used to format the data returned by the API.
1330
+ *
1331
+ * Although sometimes very similar to our database models,
1332
+ * they often include transformations, additional properties or sensitive field omissions.
1333
+ */
1531
1334
 
1532
- interface PlayerDetails extends Player {
1533
- combatLevel: number;
1534
- archive: PlayerArchive | null;
1535
- latestSnapshot: FormattedSnapshot | null;
1536
- annotations: PlayerAnnotation[];
1537
- }
1538
- interface FlaggedPlayerReviewContext {
1539
- previous: FormattedSnapshot;
1540
- rejected: FormattedSnapshot;
1541
- negativeGains: boolean;
1542
- excessiveGains: boolean;
1543
- possibleRollback: boolean;
1544
- excessiveGainsReversed: boolean;
1545
- data: {
1546
- stackableGainedRatio: number;
1547
- previousEHP: number;
1548
- previousEHB: number;
1549
- previousRank: number;
1550
- rejectedEHP: number;
1551
- rejectedEHB: number;
1552
- rejectedRank: number;
1553
- };
1335
+ interface GroupStatisticsResponse {
1336
+ maxedCombatCount: number;
1337
+ maxedTotalCount: number;
1338
+ maxed200msCount: number;
1339
+ averageStats: SnapshotResponse;
1340
+ metricLeaders: GroupMetricLeadersResponse;
1554
1341
  }
1555
- type PlayerArchiveWithPlayer = PlayerArchive & {
1556
- player: Player;
1557
- };
1558
-
1559
- type RecordLeaderboardEntry = Record & {
1560
- player: Player;
1561
- };
1562
1342
 
1563
- type MapOf<K extends keyof any, T> = {
1564
- [P in K]: T;
1565
- };
1343
+ /**
1344
+ * Response types are used to format the data returned by the API.
1345
+ *
1346
+ * Although sometimes very similar to our database models,
1347
+ * they often include transformations, additional properties or sensitive field omissions.
1348
+ */
1566
1349
 
1567
- declare enum CompetitionStatus {
1568
- UPCOMING = "upcoming",
1569
- ONGOING = "ongoing",
1570
- FINISHED = "finished"
1571
- }
1572
- declare enum CompetitionCSVTableType {
1573
- TEAM = "team",
1574
- TEAMS = "teams",
1575
- PARTICIPANTS = "participants"
1576
- }
1577
- declare const CompetitionTypeProps: MapOf<CompetitionType, {
1578
- name: string;
1579
- }>;
1580
- declare const CompetitionStatusProps: MapOf<CompetitionStatus, {
1581
- name: string;
1582
- }>;
1583
- declare const COMPETITION_TYPES: ("classic" | "team")[];
1584
- declare const COMPETITION_STATUSES: CompetitionStatus[];
1585
- declare function isCompetitionType(typeString: string): typeString is CompetitionType;
1586
- declare function isCompetitionStatus(statusString: string): statusString is CompetitionStatus;
1350
+ type MemberActivityResponse = MemberActivity;
1587
1351
 
1588
- interface CountryDetails {
1589
- code: Country;
1590
- name: string;
1591
- }
1592
- declare const CountryProps: MapOf<Country, CountryDetails>;
1593
- declare const COUNTRY_CODES: ("AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GB_NIR" | "GB_SCT" | "GB_WLS" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW")[];
1594
- declare function isCountry(countryCodeString: string): countryCodeString is Country;
1595
- declare function findCountry(countryIdentifier: string): CountryDetails | undefined;
1596
- declare function findCountryByName(countryName: string): CountryDetails | undefined;
1597
- declare function findCountryByCode(countryCode: string): CountryDetails | undefined;
1352
+ /**
1353
+ * Response types are used to format the data returned by the API.
1354
+ *
1355
+ * Although sometimes very similar to our database models,
1356
+ * they often include transformations, additional properties or sensitive field omissions.
1357
+ */
1598
1358
 
1599
- declare const MAX_LEVEL = 99;
1600
- declare const MAX_VIRTUAL_LEVEL = 126;
1601
- declare const MAX_SKILL_EXP = 200000000;
1602
- declare const SKILL_EXP_AT_99 = 13034431;
1603
- declare const CAPPED_MAX_TOTAL_XP: number;
1604
- declare function getExpForLevel(level: number): number;
1605
- declare function getLevel(exp: number, virtual?: boolean): number;
1606
- declare function getCombatLevel(attack: number, strength: number, defence: number, ranged: number, magic: number, hitpoints: number, prayer: number): number;
1359
+ type NameChangeResponse = NameChange;
1607
1360
 
1608
- declare const GROUP_ROLES: ("magic" | "slayer" | "hunter" | "achiever" | "adamant" | "adept" | "administrator" | "admiral" | "adventurer" | "air" | "anchor" | "apothecary" | "archer" | "armadylean" | "artillery" | "artisan" | "asgarnian" | "assassin" | "assistant" | "astral" | "athlete" | "attacker" | "bandit" | "bandosian" | "barbarian" | "battlemage" | "beast" | "berserker" | "blisterwood" | "blood" | "blue" | "bob" | "body" | "brassican" | "brawler" | "brigadier" | "brigand" | "bronze" | "bruiser" | "bulwark" | "burglar" | "burnt" | "cadet" | "captain" | "carry" | "champion" | "chaos" | "cleric" | "collector" | "colonel" | "commander" | "competitor" | "completionist" | "constructor" | "cook" | "coordinator" | "corporal" | "cosmic" | "councillor" | "crafter" | "crew" | "crusader" | "cutpurse" | "death" | "defender" | "defiler" | "deputy_owner" | "destroyer" | "diamond" | "diseased" | "doctor" | "dogsbody" | "dragon" | "dragonstone" | "druid" | "duellist" | "earth" | "elite" | "emerald" | "enforcer" | "epic" | "executive" | "expert" | "explorer" | "farmer" | "feeder" | "fighter" | "fire" | "firemaker" | "firestarter" | "fisher" | "fletcher" | "forager" | "fremennik" | "gamer" | "gatherer" | "general" | "gnome_child" | "gnome_elder" | "goblin" | "gold" | "goon" | "green" | "grey" | "guardian" | "guthixian" | "harpoon" | "healer" | "hellcat" | "helper" | "herbologist" | "hero" | "holy" | "hoarder" | "ignitor" | "illusionist" | "imp" | "infantry" | "inquisitor" | "iron" | "jade" | "justiciar" | "kandarin" | "karamjan" | "kharidian" | "kitten" | "knight" | "labourer" | "law" | "leader" | "learner" | "legacy" | "legend" | "legionnaire" | "lieutenant" | "looter" | "lumberjack" | "magician" | "major" | "maple" | "marshal" | "master" | "maxed" | "mediator" | "medic" | "mentor" | "member" | "merchant" | "mind" | "miner" | "minion" | "misthalinian" | "mithril" | "moderator" | "monarch" | "morytanian" | "mystic" | "myth" | "natural" | "nature" | "necromancer" | "ninja" | "noble" | "novice" | "nurse" | "oak" | "officer" | "onyx" | "opal" | "oracle" | "orange" | "owner" | "page" | "paladin" | "pawn" | "pilgrim" | "pine" | "pink" | "prefect" | "priest" | "private" | "prodigy" | "proselyte" | "prospector" | "protector" | "pure" | "purple" | "pyromancer" | "quester" | "racer" | "raider" | "ranger" | "record_chaser" | "recruit" | "recruiter" | "red_topaz" | "red" | "rogue" | "ruby" | "rune" | "runecrafter" | "sage" | "sapphire" | "saradominist" | "saviour" | "scavenger" | "scholar" | "scourge" | "scout" | "scribe" | "seer" | "senator" | "sentry" | "serenist" | "sergeant" | "shaman" | "sheriff" | "short_green_guy" | "skiller" | "skulled" | "smiter" | "smith" | "smuggler" | "sniper" | "soul" | "specialist" | "speed_runner" | "spellcaster" | "squire" | "staff" | "steel" | "strider" | "striker" | "summoner" | "superior" | "supervisor" | "teacher" | "templar" | "therapist" | "thief" | "tirannian" | "trialist" | "trickster" | "tzkal" | "tztok" | "unholy" | "vagrant" | "vanguard" | "walker" | "wanderer" | "warden" | "warlock" | "warrior" | "water" | "wild" | "willow" | "wily" | "wintumber" | "witch" | "wizard" | "worker" | "wrath" | "xerician" | "yellow" | "yew" | "zamorakian" | "zarosian" | "zealot" | "zenyte")[];
1609
- declare const PRIVELEGED_GROUP_ROLES: GroupRole[];
1610
- type GroupRolePropsMap = MapOf<GroupRole, {
1611
- name: string;
1612
- isPriveleged: boolean;
1613
- }>;
1614
- declare const GroupRoleProps: GroupRolePropsMap;
1615
- declare function findGroupRole(roleName: string): GroupRole | null;
1616
- declare function isGroupRole(roleString: string): roleString is GroupRole;
1361
+ /**
1362
+ * Response types are used to format the data returned by the API.
1363
+ *
1364
+ * Although sometimes very similar to our database models,
1365
+ * they often include transformations, additional properties or sensitive field omissions.
1366
+ */
1617
1367
 
1618
- declare enum MetricType {
1619
- SKILL = "skill",
1620
- BOSS = "boss",
1621
- ACTIVITY = "activity",
1622
- COMPUTED = "computed"
1623
- }
1624
- declare enum MetricMeasure {
1625
- EXPERIENCE = "experience",
1626
- KILLS = "kills",
1627
- SCORE = "score",
1628
- VALUE = "value"
1629
- }
1630
- interface SkillProperties {
1631
- name: string;
1632
- isCombat: boolean;
1633
- isMembers: boolean;
1634
- type: MetricType;
1635
- measure: MetricMeasure;
1636
- }
1637
- interface BossProperties {
1638
- name: string;
1639
- minimumValue: number;
1640
- isMembers: boolean;
1641
- type: MetricType;
1642
- measure: MetricMeasure;
1643
- }
1644
- interface ActivityProperties {
1645
- name: string;
1646
- minimumValue: number;
1647
- type: MetricType;
1648
- measure: MetricMeasure;
1649
- }
1650
- interface ComputedMetricProperties {
1651
- name: string;
1652
- type: MetricType;
1653
- measure: MetricMeasure;
1654
- }
1655
- declare const MetricProps: {
1656
- readonly ehp: ComputedMetricProperties;
1657
- readonly ehb: ComputedMetricProperties;
1658
- readonly league_points: ActivityProperties;
1659
- readonly bounty_hunter_hunter: ActivityProperties;
1660
- readonly bounty_hunter_rogue: ActivityProperties;
1661
- readonly clue_scrolls_all: ActivityProperties;
1662
- readonly clue_scrolls_beginner: ActivityProperties;
1663
- readonly clue_scrolls_easy: ActivityProperties;
1664
- readonly clue_scrolls_medium: ActivityProperties;
1665
- readonly clue_scrolls_hard: ActivityProperties;
1666
- readonly clue_scrolls_elite: ActivityProperties;
1667
- readonly clue_scrolls_master: ActivityProperties;
1668
- readonly last_man_standing: ActivityProperties;
1669
- readonly pvp_arena: ActivityProperties;
1670
- readonly soul_wars_zeal: ActivityProperties;
1671
- readonly guardians_of_the_rift: ActivityProperties;
1672
- readonly colosseum_glory: ActivityProperties;
1673
- readonly collections_logged: ActivityProperties;
1674
- readonly abyssal_sire: BossProperties;
1675
- readonly alchemical_hydra: BossProperties;
1676
- readonly amoxliatl: BossProperties;
1677
- readonly araxxor: BossProperties;
1678
- readonly artio: BossProperties;
1679
- readonly barrows_chests: BossProperties;
1680
- readonly bryophyta: BossProperties;
1681
- readonly callisto: BossProperties;
1682
- readonly calvarion: BossProperties;
1683
- readonly cerberus: BossProperties;
1684
- readonly chambers_of_xeric: BossProperties;
1685
- readonly chambers_of_xeric_challenge_mode: BossProperties;
1686
- readonly chaos_elemental: BossProperties;
1687
- readonly chaos_fanatic: BossProperties;
1688
- readonly commander_zilyana: BossProperties;
1689
- readonly corporeal_beast: BossProperties;
1690
- readonly crazy_archaeologist: BossProperties;
1691
- readonly dagannoth_prime: BossProperties;
1692
- readonly dagannoth_rex: BossProperties;
1693
- readonly dagannoth_supreme: BossProperties;
1694
- readonly deranged_archaeologist: BossProperties;
1695
- readonly duke_sucellus: BossProperties;
1696
- readonly general_graardor: BossProperties;
1697
- readonly giant_mole: BossProperties;
1698
- readonly grotesque_guardians: BossProperties;
1699
- readonly hespori: BossProperties;
1700
- readonly kalphite_queen: BossProperties;
1701
- readonly king_black_dragon: BossProperties;
1702
- readonly kraken: BossProperties;
1703
- readonly kreearra: BossProperties;
1704
- readonly kril_tsutsaroth: BossProperties;
1705
- readonly lunar_chests: BossProperties;
1706
- readonly mimic: BossProperties;
1707
- readonly nex: BossProperties;
1708
- readonly nightmare: BossProperties;
1709
- readonly phosanis_nightmare: BossProperties;
1710
- readonly obor: BossProperties;
1711
- readonly phantom_muspah: BossProperties;
1712
- readonly sarachnis: BossProperties;
1713
- readonly scorpia: BossProperties;
1714
- readonly scurrius: BossProperties;
1715
- readonly skotizo: BossProperties;
1716
- readonly sol_heredit: BossProperties;
1717
- readonly spindel: BossProperties;
1718
- readonly tempoross: BossProperties;
1719
- readonly the_gauntlet: BossProperties;
1720
- readonly the_corrupted_gauntlet: BossProperties;
1721
- readonly the_hueycoatl: BossProperties;
1722
- readonly the_leviathan: BossProperties;
1723
- readonly the_royal_titans: BossProperties;
1724
- readonly the_whisperer: BossProperties;
1725
- readonly theatre_of_blood: BossProperties;
1726
- readonly theatre_of_blood_hard_mode: BossProperties;
1727
- readonly thermonuclear_smoke_devil: BossProperties;
1728
- readonly tombs_of_amascut: BossProperties;
1729
- readonly tombs_of_amascut_expert: BossProperties;
1730
- readonly tzkal_zuk: BossProperties;
1731
- readonly tztok_jad: BossProperties;
1732
- readonly vardorvis: BossProperties;
1733
- readonly venenatis: BossProperties;
1734
- readonly vetion: BossProperties;
1735
- readonly vorkath: BossProperties;
1736
- readonly wintertodt: BossProperties;
1737
- readonly yama: BossProperties;
1738
- readonly zalcano: BossProperties;
1739
- readonly zulrah: BossProperties;
1740
- readonly overall: SkillProperties;
1741
- readonly attack: SkillProperties;
1742
- readonly defence: SkillProperties;
1743
- readonly strength: SkillProperties;
1744
- readonly hitpoints: SkillProperties;
1745
- readonly ranged: SkillProperties;
1746
- readonly prayer: SkillProperties;
1747
- readonly magic: SkillProperties;
1748
- readonly cooking: SkillProperties;
1749
- readonly woodcutting: SkillProperties;
1750
- readonly fletching: SkillProperties;
1751
- readonly fishing: SkillProperties;
1752
- readonly firemaking: SkillProperties;
1753
- readonly crafting: SkillProperties;
1754
- readonly smithing: SkillProperties;
1755
- readonly mining: SkillProperties;
1756
- readonly herblore: SkillProperties;
1757
- readonly agility: SkillProperties;
1758
- readonly thieving: SkillProperties;
1759
- readonly slayer: SkillProperties;
1760
- readonly farming: SkillProperties;
1761
- readonly runecrafting: SkillProperties;
1762
- readonly hunter: SkillProperties;
1763
- readonly construction: SkillProperties;
1764
- };
1765
- declare const METRICS: Metric[];
1766
- declare const SKILLS: Skill[];
1767
- declare const BOSSES: Boss[];
1768
- declare const ACTIVITIES: Activity[];
1769
- declare const COMPUTED_METRICS: ComputedMetric[];
1770
- declare const REAL_SKILLS: Skill[];
1771
- declare const F2P_BOSSES: Boss[];
1772
- declare const MEMBER_SKILLS: Skill[];
1773
- declare const COMBAT_SKILLS: Skill[];
1774
- declare const REAL_METRICS: (Skill | Activity | Boss)[];
1775
- declare function findMetric(metricName: string): Metric | null;
1776
- declare function isMetric(metric: Metric | string): metric is Metric;
1777
- declare function isSkill(metric: Metric | string): metric is Skill;
1778
- declare function isActivity(metric: Metric | string): metric is Activity;
1779
- declare function isBoss(metric: Metric | string): metric is Boss;
1780
- declare function isComputedMetric(metric: Metric | string): metric is ComputedMetric;
1781
- declare function getMetricRankKey<T extends Metric>(metric: T): `${T}Rank`;
1782
- type MetricValueKey = `${Skill}Experience` | `${Boss}Kills` | `${Activity}Score` | `${ComputedMetric}Value`;
1783
- declare function getMetricValueKey(metric: Metric): MetricValueKey;
1784
- declare function getMetricMeasure(metric: Metric): MetricMeasure;
1785
- declare function getMetricName(metric: Metric): string;
1786
- declare function getMinimumValue(metric: Metric): number;
1787
- declare function getParentEfficiencyMetric(metric: Metric): "ehp" | "ehb";
1368
+ interface ParticipantHistoryResponse {
1369
+ player: PlayerResponse;
1370
+ history: Array<{
1371
+ value: number;
1372
+ date: Date;
1373
+ }>;
1374
+ }
1788
1375
 
1789
- type PeriodPropsMap = MapOf<Period, {
1790
- name: string;
1791
- milliseconds: number;
1792
- }>;
1793
- declare const PeriodProps: PeriodPropsMap;
1794
- declare const PERIODS: ("five_min" | "day" | "week" | "month" | "year")[];
1795
- declare function findPeriod(periodName: string): Period | null;
1796
- declare function isPeriod(periodString: string): periodString is Period;
1797
- declare function parsePeriodExpression(periodExpression: string): {
1798
- expression: string;
1799
- durationMs: number;
1376
+ /**
1377
+ * Response types are used to format the data returned by the API.
1378
+ *
1379
+ * Although sometimes very similar to our database models,
1380
+ * they often include transformations, additional properties or sensitive field omissions.
1381
+ */
1382
+
1383
+ type PlayerAnnotationResponse = PlayerAnnotation;
1384
+
1385
+ /**
1386
+ * Response types are used to format the data returned by the API.
1387
+ *
1388
+ * Although sometimes very similar to our database models,
1389
+ * they often include transformations, additional properties or sensitive field omissions.
1390
+ */
1391
+
1392
+ type PlayerArchiveResponse = PlayerArchive;
1393
+
1394
+ type PlayerCompetitionStandingResponse = ParticipationResponse & {
1395
+ competition: CompetitionResponse;
1396
+ progress: MetricDelta;
1397
+ levels: MetricDelta;
1398
+ rank: number;
1800
1399
  };
1801
1400
 
1802
- declare const PlayerTypeProps: MapOf<PlayerType, {
1803
- name: string;
1804
- }>;
1805
- declare const PlayerBuildProps: MapOf<PlayerBuild, {
1806
- name: string;
1807
- }>;
1808
- declare const PlayerStatusProps: MapOf<PlayerStatus, {
1809
- name: string;
1810
- }>;
1811
- declare const PLAYER_TYPES: ("unknown" | "regular" | "ironman" | "hardcore" | "ultimate")[];
1812
- declare const PLAYER_BUILDS: ("main" | "f2p" | "f2p_lvl3" | "lvl3" | "zerker" | "def1" | "hp10")[];
1813
- declare const PLAYER_STATUSES: ("active" | "unranked" | "flagged" | "archived" | "banned")[];
1814
- declare function isPlayerType(typeString: string): typeString is PlayerType;
1815
- declare function isPlayerBuild(buildString: string): buildString is PlayerBuild;
1816
- declare function isPlayerStatus(statusString: string): statusString is PlayerStatus;
1817
- declare function findPlayerType(typeName: string): PlayerType | null;
1818
- declare function findPlayerBuild(buildName: string): PlayerBuild | null;
1401
+ interface PlayerDeltasMapResponse {
1402
+ skills: Record<Skill, {
1403
+ metric: Skill;
1404
+ ehp: MetricDelta;
1405
+ rank: MetricDelta;
1406
+ level: MetricDelta;
1407
+ experience: MetricDelta;
1408
+ }>;
1409
+ bosses: Record<Boss, {
1410
+ metric: Boss;
1411
+ ehb: MetricDelta;
1412
+ rank: MetricDelta;
1413
+ kills: MetricDelta;
1414
+ }>;
1415
+ activities: Record<Activity, {
1416
+ metric: Activity;
1417
+ rank: MetricDelta;
1418
+ score: MetricDelta;
1419
+ }>;
1420
+ computed: Record<ComputedMetric, {
1421
+ metric: ComputedMetric;
1422
+ rank: MetricDelta;
1423
+ value: MetricDelta;
1424
+ }>;
1425
+ }
1426
+
1427
+ /**
1428
+ * Response types are used to format the data returned by the API.
1429
+ *
1430
+ * Although sometimes very similar to our database models,
1431
+ * they often include transformations, additional properties or sensitive field omissions.
1432
+ */
1433
+
1434
+ interface PlayerDetailsResponse extends PlayerResponse {
1435
+ combatLevel: number;
1436
+ archive: PlayerArchiveResponse | null;
1437
+ annotations: Array<PlayerAnnotationResponse> | null;
1438
+ latestSnapshot: SnapshotResponse | null;
1439
+ }
1440
+
1441
+ /**
1442
+ * Response types are used to format the data returned by the API.
1443
+ *
1444
+ * Although sometimes very similar to our database models,
1445
+ * they often include transformations, additional properties or sensitive field omissions.
1446
+ */
1819
1447
 
1820
- declare function formatNumber(num: number, withLetters?: boolean, decimalPrecision?: number): string | -1;
1821
- declare function padNumber(value: number): string;
1822
- declare function round(num: number, cases: number): number;
1448
+ type RecordResponse = Record$1;
1823
1449
 
1824
1450
  interface GenericCountMessageResponse {
1825
1451
  count: number;
@@ -1834,56 +1460,30 @@ type TimeRangeFilter = {
1834
1460
  startDate: Date;
1835
1461
  endDate: Date;
1836
1462
  };
1837
- interface BasePlayerFilter {
1838
- country?: Country;
1839
- playerType?: PlayerType;
1840
- playerBuild?: PlayerBuild;
1841
- }
1842
- /**
1843
- * Groups Client Types
1844
- */
1845
- interface GroupMemberFragment {
1846
- username: string;
1847
- role?: GroupRole;
1848
- }
1849
1463
  interface CreateGroupPayload {
1850
1464
  name: string;
1851
1465
  clanChat?: string;
1852
1466
  homeworld?: number;
1853
1467
  description?: string;
1854
- members: Array<GroupMemberFragment>;
1468
+ members: Array<{
1469
+ username: string;
1470
+ role?: GroupRole;
1471
+ }>;
1855
1472
  }
1856
1473
  type EditGroupPayload = Partial<CreateGroupPayload> & {
1857
1474
  bannerImage?: string;
1858
1475
  profileImage?: string;
1859
- socialLinks?: Partial<GroupSocialLinks>;
1860
- roleOrders?: Array<GroupRoleOrder>;
1861
- };
1862
- interface CreateGroupResponse {
1863
- group: GroupDetails;
1864
- verificationCode: string;
1865
- }
1866
- type ChangeMemberRolePayload = Required<GroupMemberFragment>;
1867
- type GetGroupGainsFilter = {
1868
- metric: Metric;
1869
- } & TimeRangeFilter;
1870
- interface GroupRecordsFilter {
1871
- metric: Metric;
1872
- period: Period;
1873
- }
1874
- /**
1875
- * Competitions Client Types
1876
- */
1877
- interface CompetitionsSearchFilter {
1878
- title?: string;
1879
- metric?: Metric;
1880
- type?: CompetitionType;
1881
- status?: CompetitionStatus;
1882
- }
1883
- type CompetitionDetailsCSVParams = {
1884
- previewMetric?: Metric;
1885
- teamName?: string;
1886
- table?: CompetitionCSVTableType;
1476
+ socialLinks?: Partial<{
1477
+ website?: string | null;
1478
+ discord?: string | null;
1479
+ twitter?: string | null;
1480
+ twitch?: string | null;
1481
+ youtube?: string | null;
1482
+ }>;
1483
+ roleOrders?: Array<{
1484
+ role: GroupRole;
1485
+ index: number;
1486
+ }>;
1887
1487
  };
1888
1488
  type CreateCompetitionPayload = {
1889
1489
  title: string;
@@ -1895,7 +1495,7 @@ type CreateCompetitionPayload = {
1895
1495
  } & ({
1896
1496
  participants: string[];
1897
1497
  } | {
1898
- teams: Team[];
1498
+ teams: CompetitionTeam[];
1899
1499
  });
1900
1500
  type EditCompetitionPayload = {
1901
1501
  title?: string;
@@ -1903,76 +1503,88 @@ type EditCompetitionPayload = {
1903
1503
  startsAt?: Date;
1904
1504
  endsAt?: Date;
1905
1505
  participants?: string[];
1906
- teams?: Team[];
1907
- };
1908
- type CreateCompetitionResponse = {
1909
- competition: CompetitionWithParticipations;
1910
- verificationCode: string;
1911
- };
1912
- /**
1913
- * Name Changes Client Types
1914
- */
1915
- type NameChangesSearchFilter = {
1916
- username?: string;
1917
- status?: NameChangeStatus;
1506
+ teams?: CompetitionTeam[];
1918
1507
  };
1919
- /**
1920
- * Record Client Types
1921
- */
1922
- interface RecordLeaderboardFilter extends BasePlayerFilter {
1923
- metric: Metric;
1924
- period: Period;
1925
- }
1926
- /**
1927
- * Player Client Types
1928
- */
1929
- interface PlayerCompetitionsFilter {
1930
- status?: CompetitionStatus;
1931
- }
1932
- interface PlayerCompetitionStandingsFilter {
1933
- status: Exclude<CompetitionStatus, CompetitionStatus.UPCOMING>;
1934
- }
1935
- interface PlayerRecordsFilter {
1936
- period: Period | string;
1937
- metric: Metric;
1938
- }
1939
- interface AssertPlayerTypeResponse {
1940
- player: Player;
1941
- changed: boolean;
1942
- }
1943
- interface GetPlayerGainsResponse {
1944
- startsAt: Date;
1945
- endsAt: Date;
1946
- data: PlayerDeltasMap;
1947
- }
1948
- /**
1949
- * Efficiency Client Types
1950
- */
1951
- type EfficiencyAlgorithmTypeUnion = `${EfficiencyAlgorithmType}`;
1952
- interface EfficiencyLeaderboardsFilter extends BasePlayerFilter {
1953
- metric: typeof Metric.EHP | typeof Metric.EHB | 'ehp+ehb';
1954
- }
1955
- /**
1956
- * Delta Client Types
1957
- */
1958
- interface DeltaLeaderboardFilter extends BasePlayerFilter {
1959
- metric: Metric;
1960
- period: Period | string;
1508
+
1509
+ interface PaginationOptions {
1510
+ limit?: number;
1511
+ offset?: number;
1961
1512
  }
1962
1513
 
1963
- declare class BaseAPIClient {
1964
- private headers;
1965
- private baseUrl;
1966
- constructor(headers: object, baseUrl: string);
1967
- private buildParams;
1968
- private fetch;
1969
- private request;
1970
- private requestText;
1971
- postRequest<T>(path: string, body?: unknown): Promise<T>;
1972
- putRequest<T>(path: string, body?: unknown): Promise<T>;
1973
- deleteRequest<T>(path: string, body?: unknown): Promise<T>;
1974
- getRequest<T>(path: string, params?: unknown): Promise<T>;
1975
- getText(path: string, params?: unknown): Promise<string>;
1514
+ declare class CompetitionsClient extends BaseAPIClient {
1515
+ /**
1516
+ * Searches for competitions that match a title, type, metric and status filter.
1517
+ * @returns A list of competitions.
1518
+ */
1519
+ searchCompetitions(filter: {
1520
+ title?: string;
1521
+ metric?: Metric;
1522
+ type?: CompetitionType;
1523
+ status?: CompetitionStatus;
1524
+ }, pagination?: PaginationOptions): Promise<CompetitionResponse[]>;
1525
+ /**
1526
+ * Fetches the competition's full details, including all the participants and their progress.
1527
+ * @returns A competition with a list of participants.
1528
+ */
1529
+ getCompetitionDetails(id: number, previewMetric?: Metric): Promise<CompetitionDetailsResponse>;
1530
+ /**
1531
+ * Fetches the competition's participant list in CSV format.
1532
+ * @returns A string containing the CSV content.
1533
+ */
1534
+ getCompetitionDetailsCSV(id: number, params?: {
1535
+ previewMetric?: Metric;
1536
+ teamName?: string;
1537
+ table?: CompetitionCSVTableType;
1538
+ }): Promise<string>;
1539
+ /**
1540
+ * Fetches all the values (exp, kc, etc) in chronological order within the bounds
1541
+ * of the competition, for the top 5 participants.
1542
+ * @returns A list of competition progress objects, including the player and their value history over time.
1543
+ */
1544
+ getCompetitionTopHistory(id: number, previewMetric?: Metric): Promise<ParticipantHistoryResponse[]>;
1545
+ /**
1546
+ * Creates a new competition.
1547
+ * @returns The newly created competition, and the verification code that authorizes future changes to it.
1548
+ */
1549
+ createCompetition(payload: CreateCompetitionPayload): Promise<{
1550
+ competition: CompetitionDetailsResponse;
1551
+ verificationCode: string;
1552
+ }>;
1553
+ /**
1554
+ * Edits an existing competition.
1555
+ * @returns The updated competition.
1556
+ */
1557
+ editCompetition(id: number, payload: EditCompetitionPayload, verificationCode: string): Promise<CompetitionDetailsResponse>;
1558
+ /**
1559
+ * Deletes an existing competition.
1560
+ * @returns A confirmation message.
1561
+ */
1562
+ deleteCompetition(id: number, verificationCode: string): Promise<GenericMessageResponse>;
1563
+ /**
1564
+ * Adds all (valid) given participants to a competition, ignoring duplicates.
1565
+ * @returns The number of participants added and a confirmation message.
1566
+ */
1567
+ addParticipants(id: number, participants: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
1568
+ /**
1569
+ * Remove all given usernames from a competition, ignoring usernames that aren't competing.
1570
+ * @returns The number of participants removed and a confirmation message.
1571
+ */
1572
+ removeParticipants(id: number, participants: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
1573
+ /**
1574
+ * Adds all (valid) given teams to a team competition, ignoring duplicates.
1575
+ * @returns The number of participants added and a confirmation message.
1576
+ */
1577
+ addTeams(id: number, teams: CompetitionTeam[], verificationCode: string): Promise<GenericCountMessageResponse>;
1578
+ /**
1579
+ * Remove all given team names from a competition, ignoring names that don't exist.
1580
+ * @returns The number of participants removed and a confirmation message.
1581
+ */
1582
+ removeTeams(id: number, teamNames: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
1583
+ /**
1584
+ * Adds an "update" request to the queue, for each outdated competition participant.
1585
+ * @returns The number of players to be updated and a confirmation message.
1586
+ */
1587
+ updateAll(id: number, verificationCode: string): Promise<GenericCountMessageResponse>;
1976
1588
  }
1977
1589
 
1978
1590
  declare class DeltasClient extends BaseAPIClient {
@@ -1980,12 +1592,41 @@ declare class DeltasClient extends BaseAPIClient {
1980
1592
  * Fetches the current top leaderboard for a specific metric, period, playerType, playerBuild and country.
1981
1593
  * @returns A list of deltas, with their respective players, values and dates included.
1982
1594
  */
1983
- getDeltaLeaderboard(filter: DeltaLeaderboardFilter): Promise<DeltaLeaderboardEntry[]>;
1595
+ getDeltaLeaderboard(filter: {
1596
+ country?: Country;
1597
+ playerType?: PlayerType;
1598
+ playerBuild?: PlayerBuild;
1599
+ metric: Metric;
1600
+ period: Period | string;
1601
+ }): Promise<{
1602
+ player: PlayerResponse;
1603
+ startDate: Date;
1604
+ endDate: Date;
1605
+ gained: number;
1606
+ }[]>;
1984
1607
  }
1985
1608
 
1986
- interface PaginationOptions {
1987
- limit?: number;
1988
- offset?: number;
1609
+ declare class EfficiencyClient extends BaseAPIClient {
1610
+ /**
1611
+ * Fetches the current efficiency leaderboard for a specific efficiency metric, playerType, playerBuild and country.
1612
+ * @returns A list of players.
1613
+ */
1614
+ getEfficiencyLeaderboards(filter: {
1615
+ country?: Country;
1616
+ playerType?: PlayerType;
1617
+ playerBuild?: PlayerBuild;
1618
+ metric: typeof Metric.EHP | typeof Metric.EHB | 'ehp+ehb';
1619
+ }, pagination?: PaginationOptions): Promise<PlayerResponse[]>;
1620
+ /**
1621
+ * Fetches the top EHP (Efficient Hours Played) rates.
1622
+ * @returns A list of skilling methods and their bonus exp ratios.
1623
+ */
1624
+ getEHPRates(algorithmType: `${EfficiencyAlgorithmType}`): Promise<SkillMetaConfig[]>;
1625
+ /**
1626
+ * Fetches the top EHB (Efficient Hours Bossed) rates.
1627
+ * @returns A list of bosses and their respective "per-hour" kill rates.
1628
+ */
1629
+ getEHBRates(algorithmType: `${EfficiencyAlgorithmType}`): Promise<BossMetaConfig[]>;
1989
1630
  }
1990
1631
 
1991
1632
  declare class GroupsClient extends BaseAPIClient {
@@ -1993,22 +1634,25 @@ declare class GroupsClient extends BaseAPIClient {
1993
1634
  * Searches for groups that match a partial name.
1994
1635
  * @returns A list of groups.
1995
1636
  */
1996
- searchGroups(name: string, pagination?: PaginationOptions): Promise<GroupListItem[]>;
1637
+ searchGroups(name: string, pagination?: PaginationOptions): Promise<GroupResponse[]>;
1997
1638
  /**
1998
1639
  * Fetches a group's details, including a list of membership objects.
1999
1640
  * @returns A group details object.
2000
1641
  */
2001
- getGroupDetails(id: number): Promise<GroupDetails>;
1642
+ getGroupDetails(id: number): Promise<GroupDetailsResponse>;
2002
1643
  /**
2003
1644
  * Creates a new group.
2004
1645
  * @returns The newly created group, and the verification code that authorizes future changes to it.
2005
1646
  */
2006
- createGroup(payload: CreateGroupPayload): Promise<CreateGroupResponse>;
1647
+ createGroup(payload: CreateGroupPayload): Promise<{
1648
+ group: GroupDetailsResponse;
1649
+ verificationCode: string;
1650
+ }>;
2007
1651
  /**
2008
1652
  * Edits an existing group.
2009
1653
  * @returns The updated group.
2010
1654
  */
2011
- editGroup(id: number, payload: EditGroupPayload, verificationCode: string): Promise<GroupDetails>;
1655
+ editGroup(id: number, payload: EditGroupPayload, verificationCode: string): Promise<GroupDetailsResponse>;
2012
1656
  /**
2013
1657
  * Deletes an existing group.
2014
1658
  * @returns A confirmation message.
@@ -2018,7 +1662,10 @@ declare class GroupsClient extends BaseAPIClient {
2018
1662
  * Adds all (valid) given usernames (and roles) to a group, ignoring duplicates.
2019
1663
  * @returns The number of members added and a confirmation message.
2020
1664
  */
2021
- addMembers(id: number, members: GroupMemberFragment[], verificationCode: string): Promise<GenericCountMessageResponse>;
1665
+ addMembers(id: number, members: Array<{
1666
+ username: string;
1667
+ role?: GroupRole;
1668
+ }>, verificationCode: string): Promise<GenericCountMessageResponse>;
2022
1669
  /**
2023
1670
  * Remove all given usernames from a group, ignoring usernames that aren't members.
2024
1671
  * @returns The number of members removed and a confirmation message.
@@ -2028,7 +1675,12 @@ declare class GroupsClient extends BaseAPIClient {
2028
1675
  * Changes a player's role in a given group.
2029
1676
  * @returns The updated membership, with player included.
2030
1677
  */
2031
- changeRole(id: number, payload: ChangeMemberRolePayload, verificationCode: string): Promise<MembershipWithPlayer>;
1678
+ changeRole(id: number, payload: {
1679
+ username: string;
1680
+ role: GroupRole;
1681
+ }, verificationCode: string): Promise<Membership & {
1682
+ player: PlayerResponse;
1683
+ }>;
2032
1684
  /**
2033
1685
  * Adds an "update" request to the queue, for each outdated group member.
2034
1686
  * @returns The number of players to be updated and a confirmation message.
@@ -2038,38 +1690,56 @@ declare class GroupsClient extends BaseAPIClient {
2038
1690
  * Fetches all of the groups's competitions
2039
1691
  * @returns A list of competitions.
2040
1692
  */
2041
- getGroupCompetitions(id: number, pagination?: PaginationOptions): Promise<CompetitionListItem[]>;
2042
- getGroupGains(id: number, filter: GetGroupGainsFilter, pagination?: PaginationOptions): Promise<DeltaGroupLeaderboardEntry[]>;
1693
+ getGroupCompetitions(id: number, pagination?: PaginationOptions): Promise<CompetitionResponse[]>;
1694
+ getGroupGains(id: number, filter: TimeRangeFilter & {
1695
+ metric: Metric;
1696
+ }, pagination?: PaginationOptions): Promise<{
1697
+ player: PlayerResponse;
1698
+ startDate: Date;
1699
+ endDate: Date;
1700
+ data: MetricDelta;
1701
+ }[]>;
2043
1702
  /**
2044
1703
  * Fetches a group members' latest achievements.
2045
1704
  * @returns A list of achievements.
2046
1705
  */
2047
- getGroupAchievements(id: number, pagination?: PaginationOptions): Promise<ExtendedAchievementWithPlayer[]>;
1706
+ getGroupAchievements(id: number, pagination?: PaginationOptions): Promise<(AchievementResponse & {
1707
+ player: PlayerResponse;
1708
+ })[]>;
2048
1709
  /**
2049
1710
  * Fetches a group's record leaderboard for a specific metric and period.
2050
1711
  * @returns A list of records, including their respective players.
2051
1712
  */
2052
- getGroupRecords(id: number, filter: GroupRecordsFilter, pagination?: PaginationOptions): Promise<RecordLeaderboardEntry[]>;
1713
+ getGroupRecords(id: number, filter: {
1714
+ metric: Metric;
1715
+ period: Period;
1716
+ }, pagination?: PaginationOptions): Promise<(Record$1 & {
1717
+ player: PlayerResponse;
1718
+ })[]>;
2053
1719
  /**
2054
1720
  * Fetches a group's hiscores for a specific metric.
2055
1721
  * @returns A list of hiscores entries (value, rank), including their respective players.
2056
1722
  */
2057
- getGroupHiscores(id: number, metric: Metric, pagination?: PaginationOptions): Promise<GroupHiscoresEntry[]>;
1723
+ getGroupHiscores(id: number, metric: Metric, pagination?: PaginationOptions): Promise<GroupHiscoresEntryResponse[]>;
2058
1724
  /**
2059
1725
  * Fetches a group members' latest name changes.
2060
1726
  * @returns A list of name change (approved) requests.
2061
1727
  */
2062
- getGroupNameChanges(id: number, pagination?: PaginationOptions): Promise<NameChangeWithPlayer[]>;
1728
+ getGroupNameChanges(id: number, pagination?: PaginationOptions): Promise<NameChange & {
1729
+ player: PlayerResponse;
1730
+ }>;
2063
1731
  /**
2064
1732
  * Fetches a group's general statistics.
2065
1733
  * @returns An object with a few statistic values and an average stats snapshot.
2066
1734
  */
2067
- getGroupStatistics(id: number): Promise<GroupStatistics>;
1735
+ getGroupStatistics(id: number): Promise<GroupStatisticsResponse>;
2068
1736
  /**
2069
1737
  * Fetches a group's activity.
2070
1738
  * @returns A list of a group's (join, leave and role changed) activity.
2071
1739
  */
2072
- getGroupActivity(id: number, pagination?: PaginationOptions): Promise<MemberActivityWithPlayer[]>;
1740
+ getGroupActivity(id: number, pagination?: PaginationOptions): Promise<(MemberActivity & {
1741
+ player: PlayerResponse;
1742
+ })[]>;
2073
1743
  /**
2074
1744
  * Fetches the groups's member list in CSV format.
2075
1745
  * @returns A string containing the CSV content.
@@ -2077,72 +1747,106 @@ declare class GroupsClient extends BaseAPIClient {
2077
1747
  getMembersCSV(id: number): Promise<string>;
2078
1748
  }
2079
1749
 
1750
+ declare class NameChangesClient extends BaseAPIClient {
1751
+ /**
1752
+ * Searches for name changes that match a name and/or status filter.
1753
+ * @returns A list of name changes.
1754
+ */
1755
+ searchNameChanges(filter: {
1756
+ username?: string;
1757
+ status?: NameChangeStatus;
1758
+ }, pagination?: PaginationOptions): Promise<NameChange[]>;
1759
+ /**
1760
+ * Submits a name change request between two usernames (old and new).
1761
+ * @returns A pending name change request, to be reviewed and resolved at a later date.
1762
+ */
1763
+ submitNameChange(oldName: string, newName: string): Promise<NameChange>;
1764
+ }
1765
+
2080
1766
  declare class PlayersClient extends BaseAPIClient {
2081
1767
  /**
2082
1768
  * Searches players by partial username.
2083
1769
  * @returns A list of players.
2084
1770
  */
2085
- searchPlayers(partialUsername: string, pagination?: PaginationOptions): Promise<Player[]>;
1771
+ searchPlayers(partialUsername: string, pagination?: PaginationOptions): Promise<PlayerResponse[]>;
2086
1772
  /**
2087
1773
  * Updates/tracks a player.
2088
1774
  * @returns The player's new details, including the latest snapshot.
2089
1775
  */
2090
- updatePlayer(username: string): Promise<PlayerDetails>;
1776
+ updatePlayer(username: string): Promise<PlayerDetailsResponse>;
2091
1777
  /**
2092
1778
  * Asserts (and attempts to fix, if necessary) a player's game-mode type.
2093
1779
  * @returns The updated player, and an indication of whether the type was changed.
2094
1780
  */
2095
- assertPlayerType(username: string): Promise<AssertPlayerTypeResponse>;
1781
+ assertPlayerType(username: string): Promise<{
1782
+ player: PlayerResponse;
1783
+ changed: boolean;
1784
+ }>;
2096
1785
  /**
2097
1786
  * Fetches a player's details.
2098
1787
  * @returns The player's details, including the latest snapshot.
2099
1788
  */
2100
- getPlayerDetails(username: string): Promise<PlayerDetails>;
1789
+ getPlayerDetails(username: string): Promise<PlayerDetailsResponse>;
2101
1790
  /**
2102
1791
  * Fetches a player's details by ID.
2103
1792
  * @returns The player's details, including the latest snapshot.
2104
1793
  */
2105
- getPlayerDetailsById(id: number): Promise<PlayerDetails>;
1794
+ getPlayerDetailsById(id: number): Promise<PlayerDetailsResponse>;
2106
1795
  /**
2107
1796
  * Fetches a player's current achievements.
2108
1797
  * @returns A list of achievements.
2109
1798
  */
2110
- getPlayerAchievements(username: string): Promise<ExtendedAchievement[]>;
1799
+ getPlayerAchievements(username: string): Promise<AchievementResponse[]>;
2111
1800
  /**
2112
1801
  * Fetches a player's current achievement progress.
2113
1802
  * @returns A list of achievements (completed or otherwise), with their respective relative/absolute progress percentage.
2114
1803
  */
2115
- getPlayerAchievementProgress(username: string): Promise<AchievementProgress[]>;
1804
+ getPlayerAchievementProgress(username: string): Promise<AchievementProgressResponse[]>;
2116
1805
  /**
2117
1806
  * Fetches all of the player's competition participations.
2118
1807
  * @returns A list of participations, with the respective competition included.
2119
1808
  */
2120
- getPlayerCompetitions(username: string, filter?: PlayerCompetitionsFilter, pagination?: PaginationOptions): Promise<ParticipationWithCompetition[]>;
1809
+ getPlayerCompetitions(username: string, filter?: {
1810
+ status?: CompetitionStatus;
1811
+ }, pagination?: PaginationOptions): Promise<(ParticipationResponse & {
1812
+ competition: CompetitionResponse;
1813
+ })[]>;
2121
1814
  /**
2122
1815
  * Fetches all of the player's competition participations' standings.
2123
1816
  * @returns A list of participations, with the respective competition, rank and progress included.
2124
1817
  */
2125
- getPlayerCompetitionStandings(username: string, filter: PlayerCompetitionsFilter): Promise<ParticipationWithCompetitionAndStandings[]>;
1818
+ getPlayerCompetitionStandings(username: string, filter: {
1819
+ status?: CompetitionStatus;
1820
+ }): Promise<PlayerCompetitionStandingResponse[]>;
2126
1821
  /**
2127
1822
  * Fetches all of the player's group memberships.
2128
1823
  * @returns A list of memberships, with the respective group included.
2129
1824
  */
2130
- getPlayerGroups(username: string, pagination?: PaginationOptions): Promise<MembershipWithGroup[]>;
1825
+ getPlayerGroups(username: string, pagination?: PaginationOptions): Promise<(Membership & {
1826
+ player: PlayerResponse;
1827
+ })[]>;
2131
1828
  /**
2132
1829
  * Fetches a player's gains, for a specific period or time range, as a [metric: data] map.
2133
1830
  * @returns A map of each metric's gained data.
2134
1831
  */
2135
- getPlayerGains(username: string, options: TimeRangeFilter): Promise<GetPlayerGainsResponse>;
1832
+ getPlayerGains(username: string, options: TimeRangeFilter): Promise<{
1833
+ startsAt: Date | null;
1834
+ endsAt: Date | null;
1835
+ data: PlayerDeltasMapResponse;
1836
+ }>;
2136
1837
  /**
2137
1838
  * Fetches all of the player's records.
2138
1839
  * @returns A list of records.
2139
1840
  */
2140
- getPlayerRecords(username: string, options?: PlayerRecordsFilter): Promise<Record[]>;
1841
+ getPlayerRecords(username: string, options?: {
1842
+ period: Period | string;
1843
+ metric: Metric;
1844
+ }): Promise<Record$1[]>;
2141
1845
  /**
2142
1846
  * Fetches all of the player's past snapshots.
2143
1847
  * @returns A list of snapshots.
2144
1848
  */
2145
- getPlayerSnapshots(username: string, filter: TimeRangeFilter, pagination?: PaginationOptions): Promise<FormattedSnapshot[]>;
1849
+ getPlayerSnapshots(username: string, filter: TimeRangeFilter, pagination?: PaginationOptions): Promise<SnapshotResponse[]>;
2146
1850
  /**
2147
1851
  * Fetches all of the player's past snapshots' timeline.
2148
1852
  * @returns A list of timeseries data (value, rank, date)
@@ -2161,7 +1865,9 @@ declare class PlayersClient extends BaseAPIClient {
2161
1865
  * Fetches all of archived players that previously held this username.
2162
1866
  * @returns A list of player archives.
2163
1867
  */
2164
- getPlayerArchives(username: string): Promise<PlayerArchiveWithPlayer[]>;
1868
+ getPlayerArchives(username: string): Promise<(PlayerArchive & {
1869
+ player: PlayerResponse;
1870
+ })[]>;
2165
1871
  }
2166
1872
 
2167
1873
  declare class RecordsClient extends BaseAPIClient {
@@ -2169,118 +1875,1682 @@ declare class RecordsClient extends BaseAPIClient {
2169
1875
  * Fetches the current records leaderboard for a specific metric, period, playerType, playerBuild and country.
2170
1876
  * @returns A list of records, with their respective players, dates and values included.
2171
1877
  */
2172
- getRecordLeaderboard(filter: RecordLeaderboardFilter): Promise<RecordLeaderboardEntry[]>;
1878
+ getRecordLeaderboard(filter: {
1879
+ country?: Country;
1880
+ playerType?: PlayerType;
1881
+ playerBuild?: PlayerBuild;
1882
+ metric: Metric;
1883
+ period: Period;
1884
+ }): Promise<(Record$1 & {
1885
+ player: PlayerResponse;
1886
+ })[]>;
1887
+ }
1888
+
1889
+ interface WOMClientOptions {
1890
+ apiKey?: string;
1891
+ userAgent?: string;
1892
+ baseAPIUrl?: string;
1893
+ }
1894
+ declare class WOMClient extends BaseAPIClient {
1895
+ deltas: DeltasClient;
1896
+ groups: GroupsClient;
1897
+ players: PlayersClient;
1898
+ records: RecordsClient;
1899
+ efficiency: EfficiencyClient;
1900
+ nameChanges: NameChangesClient;
1901
+ competitions: CompetitionsClient;
1902
+ constructor(options?: WOMClientOptions);
2173
1903
  }
2174
1904
 
2175
- declare class EfficiencyClient extends BaseAPIClient {
2176
- /**
2177
- * Fetches the current efficiency leaderboard for a specific efficiency metric, playerType, playerBuild and country.
2178
- * @returns A list of players.
2179
- */
2180
- getEfficiencyLeaderboards(filter: EfficiencyLeaderboardsFilter, pagination?: PaginationOptions): Promise<Player[]>;
2181
- /**
2182
- * Fetches the top EHP (Efficient Hours Played) rates.
2183
- * @returns A list of skilling methods and their bonus exp ratios.
2184
- */
2185
- getEHPRates(algorithmType: EfficiencyAlgorithmTypeUnion): Promise<SkillMetaConfig[]>;
2186
- /**
2187
- * Fetches the top EHB (Efficient Hours Bossed) rates.
2188
- * @returns A list of bosses and their respective "per-hour" kill rates.
2189
- */
2190
- getEHBRates(algorithmType: EfficiencyAlgorithmTypeUnion): Promise<BossMetaConfig[]>;
2191
- }
1905
+ declare const CompetitionStatusProps: Record<CompetitionStatus, {
1906
+ name: string;
1907
+ }>;
1908
+
1909
+ declare const CompetitionTypeProps: Record<CompetitionType, {
1910
+ name: string;
1911
+ }>;
1912
+
1913
+ declare const CountryProps: Record<Country, {
1914
+ code: Country;
1915
+ name: string;
1916
+ }>;
1917
+ declare function isCountry(countryCodeString: string): countryCodeString is Country;
1918
+ declare function findCountry(countryIdentifier: string): {
1919
+ code: Country;
1920
+ name: string;
1921
+ };
1922
+ declare function findCountryByName(countryName: string): {
1923
+ code: Country;
1924
+ name: string;
1925
+ };
1926
+ declare function findCountryByCode(countryCode: string): {
1927
+ code: Country;
1928
+ name: string;
1929
+ };
1930
+
1931
+ declare const MAX_LEVEL = 99;
1932
+ declare const MAX_VIRTUAL_LEVEL = 126;
1933
+ declare const MAX_SKILL_EXP = 200000000;
1934
+ declare const SKILL_EXP_AT_99 = 13034431;
1935
+ declare const CAPPED_MAX_TOTAL_XP: number;
1936
+ declare function getExpForLevel(level: number): number;
1937
+ declare function getLevel(exp: number, virtual?: boolean): number;
1938
+ declare function getCombatLevel(attack: number, strength: number, defence: number, ranged: number, magic: number, hitpoints: number, prayer: number): number;
1939
+
1940
+ declare const GroupRoleProps: {
1941
+ achiever: {
1942
+ name: string;
1943
+ };
1944
+ adamant: {
1945
+ name: string;
1946
+ };
1947
+ adept: {
1948
+ name: string;
1949
+ };
1950
+ administrator: {
1951
+ name: string;
1952
+ };
1953
+ admiral: {
1954
+ name: string;
1955
+ };
1956
+ adventurer: {
1957
+ name: string;
1958
+ };
1959
+ air: {
1960
+ name: string;
1961
+ };
1962
+ anchor: {
1963
+ name: string;
1964
+ };
1965
+ apothecary: {
1966
+ name: string;
1967
+ };
1968
+ archer: {
1969
+ name: string;
1970
+ };
1971
+ armadylean: {
1972
+ name: string;
1973
+ };
1974
+ artillery: {
1975
+ name: string;
1976
+ };
1977
+ artisan: {
1978
+ name: string;
1979
+ };
1980
+ asgarnian: {
1981
+ name: string;
1982
+ };
1983
+ assassin: {
1984
+ name: string;
1985
+ };
1986
+ assistant: {
1987
+ name: string;
1988
+ };
1989
+ astral: {
1990
+ name: string;
1991
+ };
1992
+ athlete: {
1993
+ name: string;
1994
+ };
1995
+ attacker: {
1996
+ name: string;
1997
+ };
1998
+ bandit: {
1999
+ name: string;
2000
+ };
2001
+ bandosian: {
2002
+ name: string;
2003
+ };
2004
+ barbarian: {
2005
+ name: string;
2006
+ };
2007
+ battlemage: {
2008
+ name: string;
2009
+ };
2010
+ beast: {
2011
+ name: string;
2012
+ };
2013
+ berserker: {
2014
+ name: string;
2015
+ };
2016
+ blisterwood: {
2017
+ name: string;
2018
+ };
2019
+ blood: {
2020
+ name: string;
2021
+ };
2022
+ blue: {
2023
+ name: string;
2024
+ };
2025
+ bob: {
2026
+ name: string;
2027
+ };
2028
+ body: {
2029
+ name: string;
2030
+ };
2031
+ brassican: {
2032
+ name: string;
2033
+ };
2034
+ brawler: {
2035
+ name: string;
2036
+ };
2037
+ brigadier: {
2038
+ name: string;
2039
+ };
2040
+ brigand: {
2041
+ name: string;
2042
+ };
2043
+ bronze: {
2044
+ name: string;
2045
+ };
2046
+ bruiser: {
2047
+ name: string;
2048
+ };
2049
+ bulwark: {
2050
+ name: string;
2051
+ };
2052
+ burglar: {
2053
+ name: string;
2054
+ };
2055
+ burnt: {
2056
+ name: string;
2057
+ };
2058
+ cadet: {
2059
+ name: string;
2060
+ };
2061
+ captain: {
2062
+ name: string;
2063
+ };
2064
+ carry: {
2065
+ name: string;
2066
+ };
2067
+ champion: {
2068
+ name: string;
2069
+ };
2070
+ chaos: {
2071
+ name: string;
2072
+ };
2073
+ cleric: {
2074
+ name: string;
2075
+ };
2076
+ collector: {
2077
+ name: string;
2078
+ };
2079
+ colonel: {
2080
+ name: string;
2081
+ };
2082
+ commander: {
2083
+ name: string;
2084
+ };
2085
+ competitor: {
2086
+ name: string;
2087
+ };
2088
+ completionist: {
2089
+ name: string;
2090
+ };
2091
+ constructor: {
2092
+ name: string;
2093
+ };
2094
+ cook: {
2095
+ name: string;
2096
+ };
2097
+ coordinator: {
2098
+ name: string;
2099
+ };
2100
+ corporal: {
2101
+ name: string;
2102
+ };
2103
+ cosmic: {
2104
+ name: string;
2105
+ };
2106
+ councillor: {
2107
+ name: string;
2108
+ };
2109
+ crafter: {
2110
+ name: string;
2111
+ };
2112
+ crew: {
2113
+ name: string;
2114
+ };
2115
+ crusader: {
2116
+ name: string;
2117
+ };
2118
+ cutpurse: {
2119
+ name: string;
2120
+ };
2121
+ death: {
2122
+ name: string;
2123
+ };
2124
+ defender: {
2125
+ name: string;
2126
+ };
2127
+ defiler: {
2128
+ name: string;
2129
+ };
2130
+ deputy_owner: {
2131
+ name: string;
2132
+ };
2133
+ destroyer: {
2134
+ name: string;
2135
+ };
2136
+ diamond: {
2137
+ name: string;
2138
+ };
2139
+ diseased: {
2140
+ name: string;
2141
+ };
2142
+ doctor: {
2143
+ name: string;
2144
+ };
2145
+ dogsbody: {
2146
+ name: string;
2147
+ };
2148
+ dragon: {
2149
+ name: string;
2150
+ };
2151
+ dragonstone: {
2152
+ name: string;
2153
+ };
2154
+ druid: {
2155
+ name: string;
2156
+ };
2157
+ duellist: {
2158
+ name: string;
2159
+ };
2160
+ earth: {
2161
+ name: string;
2162
+ };
2163
+ elite: {
2164
+ name: string;
2165
+ };
2166
+ emerald: {
2167
+ name: string;
2168
+ };
2169
+ enforcer: {
2170
+ name: string;
2171
+ };
2172
+ epic: {
2173
+ name: string;
2174
+ };
2175
+ executive: {
2176
+ name: string;
2177
+ };
2178
+ expert: {
2179
+ name: string;
2180
+ };
2181
+ explorer: {
2182
+ name: string;
2183
+ };
2184
+ farmer: {
2185
+ name: string;
2186
+ };
2187
+ feeder: {
2188
+ name: string;
2189
+ };
2190
+ fighter: {
2191
+ name: string;
2192
+ };
2193
+ fire: {
2194
+ name: string;
2195
+ };
2196
+ firemaker: {
2197
+ name: string;
2198
+ };
2199
+ firestarter: {
2200
+ name: string;
2201
+ };
2202
+ fisher: {
2203
+ name: string;
2204
+ };
2205
+ fletcher: {
2206
+ name: string;
2207
+ };
2208
+ forager: {
2209
+ name: string;
2210
+ };
2211
+ fremennik: {
2212
+ name: string;
2213
+ };
2214
+ gamer: {
2215
+ name: string;
2216
+ };
2217
+ gatherer: {
2218
+ name: string;
2219
+ };
2220
+ general: {
2221
+ name: string;
2222
+ };
2223
+ gnome_child: {
2224
+ name: string;
2225
+ };
2226
+ gnome_elder: {
2227
+ name: string;
2228
+ };
2229
+ goblin: {
2230
+ name: string;
2231
+ };
2232
+ gold: {
2233
+ name: string;
2234
+ };
2235
+ goon: {
2236
+ name: string;
2237
+ };
2238
+ green: {
2239
+ name: string;
2240
+ };
2241
+ grey: {
2242
+ name: string;
2243
+ };
2244
+ guardian: {
2245
+ name: string;
2246
+ };
2247
+ guthixian: {
2248
+ name: string;
2249
+ };
2250
+ harpoon: {
2251
+ name: string;
2252
+ };
2253
+ healer: {
2254
+ name: string;
2255
+ };
2256
+ hellcat: {
2257
+ name: string;
2258
+ };
2259
+ helper: {
2260
+ name: string;
2261
+ };
2262
+ herbologist: {
2263
+ name: string;
2264
+ };
2265
+ hero: {
2266
+ name: string;
2267
+ };
2268
+ holy: {
2269
+ name: string;
2270
+ };
2271
+ hoarder: {
2272
+ name: string;
2273
+ };
2274
+ hunter: {
2275
+ name: string;
2276
+ };
2277
+ ignitor: {
2278
+ name: string;
2279
+ };
2280
+ illusionist: {
2281
+ name: string;
2282
+ };
2283
+ imp: {
2284
+ name: string;
2285
+ };
2286
+ infantry: {
2287
+ name: string;
2288
+ };
2289
+ inquisitor: {
2290
+ name: string;
2291
+ };
2292
+ iron: {
2293
+ name: string;
2294
+ };
2295
+ jade: {
2296
+ name: string;
2297
+ };
2298
+ justiciar: {
2299
+ name: string;
2300
+ };
2301
+ kandarin: {
2302
+ name: string;
2303
+ };
2304
+ karamjan: {
2305
+ name: string;
2306
+ };
2307
+ kharidian: {
2308
+ name: string;
2309
+ };
2310
+ kitten: {
2311
+ name: string;
2312
+ };
2313
+ knight: {
2314
+ name: string;
2315
+ };
2316
+ labourer: {
2317
+ name: string;
2318
+ };
2319
+ law: {
2320
+ name: string;
2321
+ };
2322
+ leader: {
2323
+ name: string;
2324
+ };
2325
+ learner: {
2326
+ name: string;
2327
+ };
2328
+ legacy: {
2329
+ name: string;
2330
+ };
2331
+ legend: {
2332
+ name: string;
2333
+ };
2334
+ legionnaire: {
2335
+ name: string;
2336
+ };
2337
+ lieutenant: {
2338
+ name: string;
2339
+ };
2340
+ looter: {
2341
+ name: string;
2342
+ };
2343
+ lumberjack: {
2344
+ name: string;
2345
+ };
2346
+ magic: {
2347
+ name: string;
2348
+ };
2349
+ magician: {
2350
+ name: string;
2351
+ };
2352
+ major: {
2353
+ name: string;
2354
+ };
2355
+ maple: {
2356
+ name: string;
2357
+ };
2358
+ marshal: {
2359
+ name: string;
2360
+ };
2361
+ master: {
2362
+ name: string;
2363
+ };
2364
+ maxed: {
2365
+ name: string;
2366
+ };
2367
+ mediator: {
2368
+ name: string;
2369
+ };
2370
+ medic: {
2371
+ name: string;
2372
+ };
2373
+ mentor: {
2374
+ name: string;
2375
+ };
2376
+ member: {
2377
+ name: string;
2378
+ };
2379
+ merchant: {
2380
+ name: string;
2381
+ };
2382
+ mind: {
2383
+ name: string;
2384
+ };
2385
+ miner: {
2386
+ name: string;
2387
+ };
2388
+ minion: {
2389
+ name: string;
2390
+ };
2391
+ misthalinian: {
2392
+ name: string;
2393
+ };
2394
+ mithril: {
2395
+ name: string;
2396
+ };
2397
+ moderator: {
2398
+ name: string;
2399
+ };
2400
+ monarch: {
2401
+ name: string;
2402
+ };
2403
+ morytanian: {
2404
+ name: string;
2405
+ };
2406
+ mystic: {
2407
+ name: string;
2408
+ };
2409
+ myth: {
2410
+ name: string;
2411
+ };
2412
+ natural: {
2413
+ name: string;
2414
+ };
2415
+ nature: {
2416
+ name: string;
2417
+ };
2418
+ necromancer: {
2419
+ name: string;
2420
+ };
2421
+ ninja: {
2422
+ name: string;
2423
+ };
2424
+ noble: {
2425
+ name: string;
2426
+ };
2427
+ novice: {
2428
+ name: string;
2429
+ };
2430
+ nurse: {
2431
+ name: string;
2432
+ };
2433
+ oak: {
2434
+ name: string;
2435
+ };
2436
+ officer: {
2437
+ name: string;
2438
+ };
2439
+ onyx: {
2440
+ name: string;
2441
+ };
2442
+ opal: {
2443
+ name: string;
2444
+ };
2445
+ oracle: {
2446
+ name: string;
2447
+ };
2448
+ orange: {
2449
+ name: string;
2450
+ };
2451
+ owner: {
2452
+ name: string;
2453
+ };
2454
+ page: {
2455
+ name: string;
2456
+ };
2457
+ paladin: {
2458
+ name: string;
2459
+ };
2460
+ pawn: {
2461
+ name: string;
2462
+ };
2463
+ pilgrim: {
2464
+ name: string;
2465
+ };
2466
+ pine: {
2467
+ name: string;
2468
+ };
2469
+ pink: {
2470
+ name: string;
2471
+ };
2472
+ prefect: {
2473
+ name: string;
2474
+ };
2475
+ priest: {
2476
+ name: string;
2477
+ };
2478
+ private: {
2479
+ name: string;
2480
+ };
2481
+ prodigy: {
2482
+ name: string;
2483
+ };
2484
+ proselyte: {
2485
+ name: string;
2486
+ };
2487
+ prospector: {
2488
+ name: string;
2489
+ };
2490
+ protector: {
2491
+ name: string;
2492
+ };
2493
+ pure: {
2494
+ name: string;
2495
+ };
2496
+ purple: {
2497
+ name: string;
2498
+ };
2499
+ pyromancer: {
2500
+ name: string;
2501
+ };
2502
+ quester: {
2503
+ name: string;
2504
+ };
2505
+ racer: {
2506
+ name: string;
2507
+ };
2508
+ raider: {
2509
+ name: string;
2510
+ };
2511
+ ranger: {
2512
+ name: string;
2513
+ };
2514
+ record_chaser: {
2515
+ name: string;
2516
+ };
2517
+ recruit: {
2518
+ name: string;
2519
+ };
2520
+ recruiter: {
2521
+ name: string;
2522
+ };
2523
+ red_topaz: {
2524
+ name: string;
2525
+ };
2526
+ red: {
2527
+ name: string;
2528
+ };
2529
+ rogue: {
2530
+ name: string;
2531
+ };
2532
+ ruby: {
2533
+ name: string;
2534
+ };
2535
+ rune: {
2536
+ name: string;
2537
+ };
2538
+ runecrafter: {
2539
+ name: string;
2540
+ };
2541
+ sage: {
2542
+ name: string;
2543
+ };
2544
+ sapphire: {
2545
+ name: string;
2546
+ };
2547
+ saradominist: {
2548
+ name: string;
2549
+ };
2550
+ saviour: {
2551
+ name: string;
2552
+ };
2553
+ scavenger: {
2554
+ name: string;
2555
+ };
2556
+ scholar: {
2557
+ name: string;
2558
+ };
2559
+ scourge: {
2560
+ name: string;
2561
+ };
2562
+ scout: {
2563
+ name: string;
2564
+ };
2565
+ scribe: {
2566
+ name: string;
2567
+ };
2568
+ seer: {
2569
+ name: string;
2570
+ };
2571
+ senator: {
2572
+ name: string;
2573
+ };
2574
+ sentry: {
2575
+ name: string;
2576
+ };
2577
+ serenist: {
2578
+ name: string;
2579
+ };
2580
+ sergeant: {
2581
+ name: string;
2582
+ };
2583
+ shaman: {
2584
+ name: string;
2585
+ };
2586
+ sheriff: {
2587
+ name: string;
2588
+ };
2589
+ short_green_guy: {
2590
+ name: string;
2591
+ };
2592
+ skiller: {
2593
+ name: string;
2594
+ };
2595
+ skulled: {
2596
+ name: string;
2597
+ };
2598
+ slayer: {
2599
+ name: string;
2600
+ };
2601
+ smiter: {
2602
+ name: string;
2603
+ };
2604
+ smith: {
2605
+ name: string;
2606
+ };
2607
+ smuggler: {
2608
+ name: string;
2609
+ };
2610
+ sniper: {
2611
+ name: string;
2612
+ };
2613
+ soul: {
2614
+ name: string;
2615
+ };
2616
+ specialist: {
2617
+ name: string;
2618
+ };
2619
+ speed_runner: {
2620
+ name: string;
2621
+ };
2622
+ spellcaster: {
2623
+ name: string;
2624
+ };
2625
+ squire: {
2626
+ name: string;
2627
+ };
2628
+ staff: {
2629
+ name: string;
2630
+ };
2631
+ steel: {
2632
+ name: string;
2633
+ };
2634
+ strider: {
2635
+ name: string;
2636
+ };
2637
+ striker: {
2638
+ name: string;
2639
+ };
2640
+ summoner: {
2641
+ name: string;
2642
+ };
2643
+ superior: {
2644
+ name: string;
2645
+ };
2646
+ supervisor: {
2647
+ name: string;
2648
+ };
2649
+ teacher: {
2650
+ name: string;
2651
+ };
2652
+ templar: {
2653
+ name: string;
2654
+ };
2655
+ therapist: {
2656
+ name: string;
2657
+ };
2658
+ thief: {
2659
+ name: string;
2660
+ };
2661
+ tirannian: {
2662
+ name: string;
2663
+ };
2664
+ trialist: {
2665
+ name: string;
2666
+ };
2667
+ trickster: {
2668
+ name: string;
2669
+ };
2670
+ tzkal: {
2671
+ name: string;
2672
+ };
2673
+ tztok: {
2674
+ name: string;
2675
+ };
2676
+ unholy: {
2677
+ name: string;
2678
+ };
2679
+ vagrant: {
2680
+ name: string;
2681
+ };
2682
+ vanguard: {
2683
+ name: string;
2684
+ };
2685
+ walker: {
2686
+ name: string;
2687
+ };
2688
+ wanderer: {
2689
+ name: string;
2690
+ };
2691
+ warden: {
2692
+ name: string;
2693
+ };
2694
+ warlock: {
2695
+ name: string;
2696
+ };
2697
+ warrior: {
2698
+ name: string;
2699
+ };
2700
+ water: {
2701
+ name: string;
2702
+ };
2703
+ wild: {
2704
+ name: string;
2705
+ };
2706
+ willow: {
2707
+ name: string;
2708
+ };
2709
+ wily: {
2710
+ name: string;
2711
+ };
2712
+ wintumber: {
2713
+ name: string;
2714
+ };
2715
+ witch: {
2716
+ name: string;
2717
+ };
2718
+ wizard: {
2719
+ name: string;
2720
+ };
2721
+ worker: {
2722
+ name: string;
2723
+ };
2724
+ wrath: {
2725
+ name: string;
2726
+ };
2727
+ xerician: {
2728
+ name: string;
2729
+ };
2730
+ yellow: {
2731
+ name: string;
2732
+ };
2733
+ yew: {
2734
+ name: string;
2735
+ };
2736
+ zamorakian: {
2737
+ name: string;
2738
+ };
2739
+ zarosian: {
2740
+ name: string;
2741
+ };
2742
+ zealot: {
2743
+ name: string;
2744
+ };
2745
+ zenyte: {
2746
+ name: string;
2747
+ };
2748
+ };
2749
+ declare function isGroupRole(roleString: string): roleString is GroupRole;
2750
+ declare const PRIVILEGED_GROUP_ROLES: readonly ["administrator", "owner", "leader", "deputy_owner", "moderator"];
2751
+
2752
+ declare const SkillProps: Record<Skill, {
2753
+ name: string;
2754
+ isCombat: boolean;
2755
+ isMembers: boolean;
2756
+ type: MetricType;
2757
+ measure: MetricMeasure;
2758
+ }>;
2759
+ declare const BossProps: Record<Boss, {
2760
+ name: string;
2761
+ minimumValue: number;
2762
+ isMembers: boolean;
2763
+ type: MetricType;
2764
+ measure: MetricMeasure;
2765
+ }>;
2766
+ declare const ActivityProps: Record<Activity, {
2767
+ name: string;
2768
+ minimumValue: number;
2769
+ type: MetricType;
2770
+ measure: MetricMeasure;
2771
+ }>;
2772
+ declare const ComputedMetricProps: Record<ComputedMetric, {
2773
+ name: string;
2774
+ type: MetricType;
2775
+ measure: MetricMeasure;
2776
+ }>;
2777
+ declare const MetricProps: {
2778
+ readonly ehp: {
2779
+ name: string;
2780
+ type: MetricType;
2781
+ measure: MetricMeasure;
2782
+ };
2783
+ readonly ehb: {
2784
+ name: string;
2785
+ type: MetricType;
2786
+ measure: MetricMeasure;
2787
+ };
2788
+ readonly league_points: {
2789
+ name: string;
2790
+ minimumValue: number;
2791
+ type: MetricType;
2792
+ measure: MetricMeasure;
2793
+ };
2794
+ readonly bounty_hunter_hunter: {
2795
+ name: string;
2796
+ minimumValue: number;
2797
+ type: MetricType;
2798
+ measure: MetricMeasure;
2799
+ };
2800
+ readonly bounty_hunter_rogue: {
2801
+ name: string;
2802
+ minimumValue: number;
2803
+ type: MetricType;
2804
+ measure: MetricMeasure;
2805
+ };
2806
+ readonly clue_scrolls_all: {
2807
+ name: string;
2808
+ minimumValue: number;
2809
+ type: MetricType;
2810
+ measure: MetricMeasure;
2811
+ };
2812
+ readonly clue_scrolls_beginner: {
2813
+ name: string;
2814
+ minimumValue: number;
2815
+ type: MetricType;
2816
+ measure: MetricMeasure;
2817
+ };
2818
+ readonly clue_scrolls_easy: {
2819
+ name: string;
2820
+ minimumValue: number;
2821
+ type: MetricType;
2822
+ measure: MetricMeasure;
2823
+ };
2824
+ readonly clue_scrolls_medium: {
2825
+ name: string;
2826
+ minimumValue: number;
2827
+ type: MetricType;
2828
+ measure: MetricMeasure;
2829
+ };
2830
+ readonly clue_scrolls_hard: {
2831
+ name: string;
2832
+ minimumValue: number;
2833
+ type: MetricType;
2834
+ measure: MetricMeasure;
2835
+ };
2836
+ readonly clue_scrolls_elite: {
2837
+ name: string;
2838
+ minimumValue: number;
2839
+ type: MetricType;
2840
+ measure: MetricMeasure;
2841
+ };
2842
+ readonly clue_scrolls_master: {
2843
+ name: string;
2844
+ minimumValue: number;
2845
+ type: MetricType;
2846
+ measure: MetricMeasure;
2847
+ };
2848
+ readonly last_man_standing: {
2849
+ name: string;
2850
+ minimumValue: number;
2851
+ type: MetricType;
2852
+ measure: MetricMeasure;
2853
+ };
2854
+ readonly pvp_arena: {
2855
+ name: string;
2856
+ minimumValue: number;
2857
+ type: MetricType;
2858
+ measure: MetricMeasure;
2859
+ };
2860
+ readonly soul_wars_zeal: {
2861
+ name: string;
2862
+ minimumValue: number;
2863
+ type: MetricType;
2864
+ measure: MetricMeasure;
2865
+ };
2866
+ readonly guardians_of_the_rift: {
2867
+ name: string;
2868
+ minimumValue: number;
2869
+ type: MetricType;
2870
+ measure: MetricMeasure;
2871
+ };
2872
+ readonly colosseum_glory: {
2873
+ name: string;
2874
+ minimumValue: number;
2875
+ type: MetricType;
2876
+ measure: MetricMeasure;
2877
+ };
2878
+ readonly collections_logged: {
2879
+ name: string;
2880
+ minimumValue: number;
2881
+ type: MetricType;
2882
+ measure: MetricMeasure;
2883
+ };
2884
+ readonly abyssal_sire: {
2885
+ name: string;
2886
+ minimumValue: number;
2887
+ isMembers: boolean;
2888
+ type: MetricType;
2889
+ measure: MetricMeasure;
2890
+ };
2891
+ readonly alchemical_hydra: {
2892
+ name: string;
2893
+ minimumValue: number;
2894
+ isMembers: boolean;
2895
+ type: MetricType;
2896
+ measure: MetricMeasure;
2897
+ };
2898
+ readonly amoxliatl: {
2899
+ name: string;
2900
+ minimumValue: number;
2901
+ isMembers: boolean;
2902
+ type: MetricType;
2903
+ measure: MetricMeasure;
2904
+ };
2905
+ readonly araxxor: {
2906
+ name: string;
2907
+ minimumValue: number;
2908
+ isMembers: boolean;
2909
+ type: MetricType;
2910
+ measure: MetricMeasure;
2911
+ };
2912
+ readonly artio: {
2913
+ name: string;
2914
+ minimumValue: number;
2915
+ isMembers: boolean;
2916
+ type: MetricType;
2917
+ measure: MetricMeasure;
2918
+ };
2919
+ readonly barrows_chests: {
2920
+ name: string;
2921
+ minimumValue: number;
2922
+ isMembers: boolean;
2923
+ type: MetricType;
2924
+ measure: MetricMeasure;
2925
+ };
2926
+ readonly bryophyta: {
2927
+ name: string;
2928
+ minimumValue: number;
2929
+ isMembers: boolean;
2930
+ type: MetricType;
2931
+ measure: MetricMeasure;
2932
+ };
2933
+ readonly callisto: {
2934
+ name: string;
2935
+ minimumValue: number;
2936
+ isMembers: boolean;
2937
+ type: MetricType;
2938
+ measure: MetricMeasure;
2939
+ };
2940
+ readonly calvarion: {
2941
+ name: string;
2942
+ minimumValue: number;
2943
+ isMembers: boolean;
2944
+ type: MetricType;
2945
+ measure: MetricMeasure;
2946
+ };
2947
+ readonly cerberus: {
2948
+ name: string;
2949
+ minimumValue: number;
2950
+ isMembers: boolean;
2951
+ type: MetricType;
2952
+ measure: MetricMeasure;
2953
+ };
2954
+ readonly chambers_of_xeric: {
2955
+ name: string;
2956
+ minimumValue: number;
2957
+ isMembers: boolean;
2958
+ type: MetricType;
2959
+ measure: MetricMeasure;
2960
+ };
2961
+ readonly chambers_of_xeric_challenge_mode: {
2962
+ name: string;
2963
+ minimumValue: number;
2964
+ isMembers: boolean;
2965
+ type: MetricType;
2966
+ measure: MetricMeasure;
2967
+ };
2968
+ readonly chaos_elemental: {
2969
+ name: string;
2970
+ minimumValue: number;
2971
+ isMembers: boolean;
2972
+ type: MetricType;
2973
+ measure: MetricMeasure;
2974
+ };
2975
+ readonly chaos_fanatic: {
2976
+ name: string;
2977
+ minimumValue: number;
2978
+ isMembers: boolean;
2979
+ type: MetricType;
2980
+ measure: MetricMeasure;
2981
+ };
2982
+ readonly commander_zilyana: {
2983
+ name: string;
2984
+ minimumValue: number;
2985
+ isMembers: boolean;
2986
+ type: MetricType;
2987
+ measure: MetricMeasure;
2988
+ };
2989
+ readonly corporeal_beast: {
2990
+ name: string;
2991
+ minimumValue: number;
2992
+ isMembers: boolean;
2993
+ type: MetricType;
2994
+ measure: MetricMeasure;
2995
+ };
2996
+ readonly crazy_archaeologist: {
2997
+ name: string;
2998
+ minimumValue: number;
2999
+ isMembers: boolean;
3000
+ type: MetricType;
3001
+ measure: MetricMeasure;
3002
+ };
3003
+ readonly dagannoth_prime: {
3004
+ name: string;
3005
+ minimumValue: number;
3006
+ isMembers: boolean;
3007
+ type: MetricType;
3008
+ measure: MetricMeasure;
3009
+ };
3010
+ readonly dagannoth_rex: {
3011
+ name: string;
3012
+ minimumValue: number;
3013
+ isMembers: boolean;
3014
+ type: MetricType;
3015
+ measure: MetricMeasure;
3016
+ };
3017
+ readonly dagannoth_supreme: {
3018
+ name: string;
3019
+ minimumValue: number;
3020
+ isMembers: boolean;
3021
+ type: MetricType;
3022
+ measure: MetricMeasure;
3023
+ };
3024
+ readonly deranged_archaeologist: {
3025
+ name: string;
3026
+ minimumValue: number;
3027
+ isMembers: boolean;
3028
+ type: MetricType;
3029
+ measure: MetricMeasure;
3030
+ };
3031
+ readonly doom_of_mokhaiotl: {
3032
+ name: string;
3033
+ minimumValue: number;
3034
+ isMembers: boolean;
3035
+ type: MetricType;
3036
+ measure: MetricMeasure;
3037
+ };
3038
+ readonly duke_sucellus: {
3039
+ name: string;
3040
+ minimumValue: number;
3041
+ isMembers: boolean;
3042
+ type: MetricType;
3043
+ measure: MetricMeasure;
3044
+ };
3045
+ readonly general_graardor: {
3046
+ name: string;
3047
+ minimumValue: number;
3048
+ isMembers: boolean;
3049
+ type: MetricType;
3050
+ measure: MetricMeasure;
3051
+ };
3052
+ readonly giant_mole: {
3053
+ name: string;
3054
+ minimumValue: number;
3055
+ isMembers: boolean;
3056
+ type: MetricType;
3057
+ measure: MetricMeasure;
3058
+ };
3059
+ readonly grotesque_guardians: {
3060
+ name: string;
3061
+ minimumValue: number;
3062
+ isMembers: boolean;
3063
+ type: MetricType;
3064
+ measure: MetricMeasure;
3065
+ };
3066
+ readonly hespori: {
3067
+ name: string;
3068
+ minimumValue: number;
3069
+ isMembers: boolean;
3070
+ type: MetricType;
3071
+ measure: MetricMeasure;
3072
+ };
3073
+ readonly kalphite_queen: {
3074
+ name: string;
3075
+ minimumValue: number;
3076
+ isMembers: boolean;
3077
+ type: MetricType;
3078
+ measure: MetricMeasure;
3079
+ };
3080
+ readonly king_black_dragon: {
3081
+ name: string;
3082
+ minimumValue: number;
3083
+ isMembers: boolean;
3084
+ type: MetricType;
3085
+ measure: MetricMeasure;
3086
+ };
3087
+ readonly kraken: {
3088
+ name: string;
3089
+ minimumValue: number;
3090
+ isMembers: boolean;
3091
+ type: MetricType;
3092
+ measure: MetricMeasure;
3093
+ };
3094
+ readonly kreearra: {
3095
+ name: string;
3096
+ minimumValue: number;
3097
+ isMembers: boolean;
3098
+ type: MetricType;
3099
+ measure: MetricMeasure;
3100
+ };
3101
+ readonly kril_tsutsaroth: {
3102
+ name: string;
3103
+ minimumValue: number;
3104
+ isMembers: boolean;
3105
+ type: MetricType;
3106
+ measure: MetricMeasure;
3107
+ };
3108
+ readonly lunar_chests: {
3109
+ name: string;
3110
+ minimumValue: number;
3111
+ isMembers: boolean;
3112
+ type: MetricType;
3113
+ measure: MetricMeasure;
3114
+ };
3115
+ readonly mimic: {
3116
+ name: string;
3117
+ minimumValue: number;
3118
+ isMembers: boolean;
3119
+ type: MetricType;
3120
+ measure: MetricMeasure;
3121
+ };
3122
+ readonly nex: {
3123
+ name: string;
3124
+ minimumValue: number;
3125
+ isMembers: boolean;
3126
+ type: MetricType;
3127
+ measure: MetricMeasure;
3128
+ };
3129
+ readonly nightmare: {
3130
+ name: string;
3131
+ minimumValue: number;
3132
+ isMembers: boolean;
3133
+ type: MetricType;
3134
+ measure: MetricMeasure;
3135
+ };
3136
+ readonly phosanis_nightmare: {
3137
+ name: string;
3138
+ minimumValue: number;
3139
+ isMembers: boolean;
3140
+ type: MetricType;
3141
+ measure: MetricMeasure;
3142
+ };
3143
+ readonly obor: {
3144
+ name: string;
3145
+ minimumValue: number;
3146
+ isMembers: boolean;
3147
+ type: MetricType;
3148
+ measure: MetricMeasure;
3149
+ };
3150
+ readonly phantom_muspah: {
3151
+ name: string;
3152
+ minimumValue: number;
3153
+ isMembers: boolean;
3154
+ type: MetricType;
3155
+ measure: MetricMeasure;
3156
+ };
3157
+ readonly sarachnis: {
3158
+ name: string;
3159
+ minimumValue: number;
3160
+ isMembers: boolean;
3161
+ type: MetricType;
3162
+ measure: MetricMeasure;
3163
+ };
3164
+ readonly scorpia: {
3165
+ name: string;
3166
+ minimumValue: number;
3167
+ isMembers: boolean;
3168
+ type: MetricType;
3169
+ measure: MetricMeasure;
3170
+ };
3171
+ readonly scurrius: {
3172
+ name: string;
3173
+ minimumValue: number;
3174
+ isMembers: boolean;
3175
+ type: MetricType;
3176
+ measure: MetricMeasure;
3177
+ };
3178
+ readonly skotizo: {
3179
+ name: string;
3180
+ minimumValue: number;
3181
+ isMembers: boolean;
3182
+ type: MetricType;
3183
+ measure: MetricMeasure;
3184
+ };
3185
+ readonly sol_heredit: {
3186
+ name: string;
3187
+ minimumValue: number;
3188
+ isMembers: boolean;
3189
+ type: MetricType;
3190
+ measure: MetricMeasure;
3191
+ };
3192
+ readonly spindel: {
3193
+ name: string;
3194
+ minimumValue: number;
3195
+ isMembers: boolean;
3196
+ type: MetricType;
3197
+ measure: MetricMeasure;
3198
+ };
3199
+ readonly tempoross: {
3200
+ name: string;
3201
+ minimumValue: number;
3202
+ isMembers: boolean;
3203
+ type: MetricType;
3204
+ measure: MetricMeasure;
3205
+ };
3206
+ readonly the_gauntlet: {
3207
+ name: string;
3208
+ minimumValue: number;
3209
+ isMembers: boolean;
3210
+ type: MetricType;
3211
+ measure: MetricMeasure;
3212
+ };
3213
+ readonly the_corrupted_gauntlet: {
3214
+ name: string;
3215
+ minimumValue: number;
3216
+ isMembers: boolean;
3217
+ type: MetricType;
3218
+ measure: MetricMeasure;
3219
+ };
3220
+ readonly the_hueycoatl: {
3221
+ name: string;
3222
+ minimumValue: number;
3223
+ isMembers: boolean;
3224
+ type: MetricType;
3225
+ measure: MetricMeasure;
3226
+ };
3227
+ readonly the_leviathan: {
3228
+ name: string;
3229
+ minimumValue: number;
3230
+ isMembers: boolean;
3231
+ type: MetricType;
3232
+ measure: MetricMeasure;
3233
+ };
3234
+ readonly the_royal_titans: {
3235
+ name: string;
3236
+ minimumValue: number;
3237
+ isMembers: boolean;
3238
+ type: MetricType;
3239
+ measure: MetricMeasure;
3240
+ };
3241
+ readonly the_whisperer: {
3242
+ name: string;
3243
+ minimumValue: number;
3244
+ isMembers: boolean;
3245
+ type: MetricType;
3246
+ measure: MetricMeasure;
3247
+ };
3248
+ readonly theatre_of_blood: {
3249
+ name: string;
3250
+ minimumValue: number;
3251
+ isMembers: boolean;
3252
+ type: MetricType;
3253
+ measure: MetricMeasure;
3254
+ };
3255
+ readonly theatre_of_blood_hard_mode: {
3256
+ name: string;
3257
+ minimumValue: number;
3258
+ isMembers: boolean;
3259
+ type: MetricType;
3260
+ measure: MetricMeasure;
3261
+ };
3262
+ readonly thermonuclear_smoke_devil: {
3263
+ name: string;
3264
+ minimumValue: number;
3265
+ isMembers: boolean;
3266
+ type: MetricType;
3267
+ measure: MetricMeasure;
3268
+ };
3269
+ readonly tombs_of_amascut: {
3270
+ name: string;
3271
+ minimumValue: number;
3272
+ isMembers: boolean;
3273
+ type: MetricType;
3274
+ measure: MetricMeasure;
3275
+ };
3276
+ readonly tombs_of_amascut_expert: {
3277
+ name: string;
3278
+ minimumValue: number;
3279
+ isMembers: boolean;
3280
+ type: MetricType;
3281
+ measure: MetricMeasure;
3282
+ };
3283
+ readonly tzkal_zuk: {
3284
+ name: string;
3285
+ minimumValue: number;
3286
+ isMembers: boolean;
3287
+ type: MetricType;
3288
+ measure: MetricMeasure;
3289
+ };
3290
+ readonly tztok_jad: {
3291
+ name: string;
3292
+ minimumValue: number;
3293
+ isMembers: boolean;
3294
+ type: MetricType;
3295
+ measure: MetricMeasure;
3296
+ };
3297
+ readonly vardorvis: {
3298
+ name: string;
3299
+ minimumValue: number;
3300
+ isMembers: boolean;
3301
+ type: MetricType;
3302
+ measure: MetricMeasure;
3303
+ };
3304
+ readonly venenatis: {
3305
+ name: string;
3306
+ minimumValue: number;
3307
+ isMembers: boolean;
3308
+ type: MetricType;
3309
+ measure: MetricMeasure;
3310
+ };
3311
+ readonly vetion: {
3312
+ name: string;
3313
+ minimumValue: number;
3314
+ isMembers: boolean;
3315
+ type: MetricType;
3316
+ measure: MetricMeasure;
3317
+ };
3318
+ readonly vorkath: {
3319
+ name: string;
3320
+ minimumValue: number;
3321
+ isMembers: boolean;
3322
+ type: MetricType;
3323
+ measure: MetricMeasure;
3324
+ };
3325
+ readonly wintertodt: {
3326
+ name: string;
3327
+ minimumValue: number;
3328
+ isMembers: boolean;
3329
+ type: MetricType;
3330
+ measure: MetricMeasure;
3331
+ };
3332
+ readonly yama: {
3333
+ name: string;
3334
+ minimumValue: number;
3335
+ isMembers: boolean;
3336
+ type: MetricType;
3337
+ measure: MetricMeasure;
3338
+ };
3339
+ readonly zalcano: {
3340
+ name: string;
3341
+ minimumValue: number;
3342
+ isMembers: boolean;
3343
+ type: MetricType;
3344
+ measure: MetricMeasure;
3345
+ };
3346
+ readonly zulrah: {
3347
+ name: string;
3348
+ minimumValue: number;
3349
+ isMembers: boolean;
3350
+ type: MetricType;
3351
+ measure: MetricMeasure;
3352
+ };
3353
+ readonly overall: {
3354
+ name: string;
3355
+ isCombat: boolean;
3356
+ isMembers: boolean;
3357
+ type: MetricType;
3358
+ measure: MetricMeasure;
3359
+ };
3360
+ readonly attack: {
3361
+ name: string;
3362
+ isCombat: boolean;
3363
+ isMembers: boolean;
3364
+ type: MetricType;
3365
+ measure: MetricMeasure;
3366
+ };
3367
+ readonly defence: {
3368
+ name: string;
3369
+ isCombat: boolean;
3370
+ isMembers: boolean;
3371
+ type: MetricType;
3372
+ measure: MetricMeasure;
3373
+ };
3374
+ readonly strength: {
3375
+ name: string;
3376
+ isCombat: boolean;
3377
+ isMembers: boolean;
3378
+ type: MetricType;
3379
+ measure: MetricMeasure;
3380
+ };
3381
+ readonly hitpoints: {
3382
+ name: string;
3383
+ isCombat: boolean;
3384
+ isMembers: boolean;
3385
+ type: MetricType;
3386
+ measure: MetricMeasure;
3387
+ };
3388
+ readonly ranged: {
3389
+ name: string;
3390
+ isCombat: boolean;
3391
+ isMembers: boolean;
3392
+ type: MetricType;
3393
+ measure: MetricMeasure;
3394
+ };
3395
+ readonly prayer: {
3396
+ name: string;
3397
+ isCombat: boolean;
3398
+ isMembers: boolean;
3399
+ type: MetricType;
3400
+ measure: MetricMeasure;
3401
+ };
3402
+ readonly magic: {
3403
+ name: string;
3404
+ isCombat: boolean;
3405
+ isMembers: boolean;
3406
+ type: MetricType;
3407
+ measure: MetricMeasure;
3408
+ };
3409
+ readonly cooking: {
3410
+ name: string;
3411
+ isCombat: boolean;
3412
+ isMembers: boolean;
3413
+ type: MetricType;
3414
+ measure: MetricMeasure;
3415
+ };
3416
+ readonly woodcutting: {
3417
+ name: string;
3418
+ isCombat: boolean;
3419
+ isMembers: boolean;
3420
+ type: MetricType;
3421
+ measure: MetricMeasure;
3422
+ };
3423
+ readonly fletching: {
3424
+ name: string;
3425
+ isCombat: boolean;
3426
+ isMembers: boolean;
3427
+ type: MetricType;
3428
+ measure: MetricMeasure;
3429
+ };
3430
+ readonly fishing: {
3431
+ name: string;
3432
+ isCombat: boolean;
3433
+ isMembers: boolean;
3434
+ type: MetricType;
3435
+ measure: MetricMeasure;
3436
+ };
3437
+ readonly firemaking: {
3438
+ name: string;
3439
+ isCombat: boolean;
3440
+ isMembers: boolean;
3441
+ type: MetricType;
3442
+ measure: MetricMeasure;
3443
+ };
3444
+ readonly crafting: {
3445
+ name: string;
3446
+ isCombat: boolean;
3447
+ isMembers: boolean;
3448
+ type: MetricType;
3449
+ measure: MetricMeasure;
3450
+ };
3451
+ readonly smithing: {
3452
+ name: string;
3453
+ isCombat: boolean;
3454
+ isMembers: boolean;
3455
+ type: MetricType;
3456
+ measure: MetricMeasure;
3457
+ };
3458
+ readonly mining: {
3459
+ name: string;
3460
+ isCombat: boolean;
3461
+ isMembers: boolean;
3462
+ type: MetricType;
3463
+ measure: MetricMeasure;
3464
+ };
3465
+ readonly herblore: {
3466
+ name: string;
3467
+ isCombat: boolean;
3468
+ isMembers: boolean;
3469
+ type: MetricType;
3470
+ measure: MetricMeasure;
3471
+ };
3472
+ readonly agility: {
3473
+ name: string;
3474
+ isCombat: boolean;
3475
+ isMembers: boolean;
3476
+ type: MetricType;
3477
+ measure: MetricMeasure;
3478
+ };
3479
+ readonly thieving: {
3480
+ name: string;
3481
+ isCombat: boolean;
3482
+ isMembers: boolean;
3483
+ type: MetricType;
3484
+ measure: MetricMeasure;
3485
+ };
3486
+ readonly slayer: {
3487
+ name: string;
3488
+ isCombat: boolean;
3489
+ isMembers: boolean;
3490
+ type: MetricType;
3491
+ measure: MetricMeasure;
3492
+ };
3493
+ readonly farming: {
3494
+ name: string;
3495
+ isCombat: boolean;
3496
+ isMembers: boolean;
3497
+ type: MetricType;
3498
+ measure: MetricMeasure;
3499
+ };
3500
+ readonly runecrafting: {
3501
+ name: string;
3502
+ isCombat: boolean;
3503
+ isMembers: boolean;
3504
+ type: MetricType;
3505
+ measure: MetricMeasure;
3506
+ };
3507
+ readonly hunter: {
3508
+ name: string;
3509
+ isCombat: boolean;
3510
+ isMembers: boolean;
3511
+ type: MetricType;
3512
+ measure: MetricMeasure;
3513
+ };
3514
+ readonly construction: {
3515
+ name: string;
3516
+ isCombat: boolean;
3517
+ isMembers: boolean;
3518
+ type: MetricType;
3519
+ measure: MetricMeasure;
3520
+ };
3521
+ };
3522
+ declare const REAL_SKILLS: Skill[];
3523
+ declare const F2P_BOSSES: Boss[];
3524
+ declare const MEMBER_SKILLS: Skill[];
3525
+ declare const COMBAT_SKILLS: Skill[];
3526
+ declare const REAL_METRICS: (Skill | Activity | Boss)[];
3527
+ declare function isMetric(metric: Metric | string): metric is Metric;
3528
+ declare function isSkill(metric: Metric | string): metric is Skill;
3529
+ declare function isActivity(metric: Metric | string): metric is Activity;
3530
+ declare function isBoss(metric: Metric | string): metric is Boss;
3531
+ declare function isComputedMetric(metric: Metric | string): metric is ComputedMetric;
3532
+ declare function getMinimumValue(metric: Metric): number;
3533
+ declare function getParentEfficiencyMetric(metric: Metric): "ehp" | "ehb";
2192
3534
 
2193
- declare class NameChangesClient extends BaseAPIClient {
2194
- /**
2195
- * Searches for name changes that match a name and/or status filter.
2196
- * @returns A list of name changes.
2197
- */
2198
- searchNameChanges(filter: NameChangesSearchFilter, pagination?: PaginationOptions): Promise<NameChange[]>;
2199
- /**
2200
- * Submits a name change request between two usernames (old and new).
2201
- * @returns A pending name change request, to be reviewed and resolved at a later date.
2202
- */
2203
- submitNameChange(oldName: string, newName: string): Promise<NameChange>;
2204
- }
3535
+ declare const PeriodProps: Record<Period, {
3536
+ name: string;
3537
+ milliseconds: number;
3538
+ }>;
3539
+ declare function isPeriod(periodString: string): periodString is Period;
2205
3540
 
2206
- declare class CompetitionsClient extends BaseAPIClient {
2207
- /**
2208
- * Searches for competitions that match a title, type, metric and status filter.
2209
- * @returns A list of competitions.
2210
- */
2211
- searchCompetitions(filter: CompetitionsSearchFilter, pagination?: PaginationOptions): Promise<CompetitionListItem[]>;
2212
- /**
2213
- * Fetches the competition's full details, including all the participants and their progress.
2214
- * @returns A competition with a list of participants.
2215
- */
2216
- getCompetitionDetails(id: number, previewMetric?: Metric): Promise<CompetitionDetails>;
2217
- /**
2218
- * Fetches the competition's participant list in CSV format.
2219
- * @returns A string containing the CSV content.
2220
- */
2221
- getCompetitionDetailsCSV(id: number, params?: CompetitionDetailsCSVParams): Promise<string>;
2222
- /**
2223
- * Fetches all the values (exp, kc, etc) in chronological order within the bounds
2224
- * of the competition, for the top 5 participants.
2225
- * @returns A list of competition progress objects, including the player and their value history over time.
2226
- */
2227
- getCompetitionTopHistory(id: number, previewMetric?: Metric): Promise<Top5ProgressResult>;
2228
- /**
2229
- * Creates a new competition.
2230
- * @returns The newly created competition, and the verification code that authorizes future changes to it.
2231
- */
2232
- createCompetition(payload: CreateCompetitionPayload): Promise<CreateCompetitionResponse>;
2233
- /**
2234
- * Edits an existing competition.
2235
- * @returns The updated competition.
2236
- */
2237
- editCompetition(id: number, payload: EditCompetitionPayload, verificationCode: string): Promise<CompetitionWithParticipations>;
2238
- /**
2239
- * Deletes an existing competition.
2240
- * @returns A confirmation message.
2241
- */
2242
- deleteCompetition(id: number, verificationCode: string): Promise<GenericMessageResponse>;
2243
- /**
2244
- * Adds all (valid) given participants to a competition, ignoring duplicates.
2245
- * @returns The number of participants added and a confirmation message.
2246
- */
2247
- addParticipants(id: number, participants: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
2248
- /**
2249
- * Remove all given usernames from a competition, ignoring usernames that aren't competing.
2250
- * @returns The number of participants removed and a confirmation message.
2251
- */
2252
- removeParticipants(id: number, participants: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
2253
- /**
2254
- * Adds all (valid) given teams to a team competition, ignoring duplicates.
2255
- * @returns The number of participants added and a confirmation message.
2256
- */
2257
- addTeams(id: number, teams: Team[], verificationCode: string): Promise<GenericCountMessageResponse>;
2258
- /**
2259
- * Remove all given team names from a competition, ignoring names that don't exist.
2260
- * @returns The number of participants removed and a confirmation message.
2261
- */
2262
- removeTeams(id: number, teamNames: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
2263
- /**
2264
- * Adds an "update" request to the queue, for each outdated competition participant.
2265
- * @returns The number of players to be updated and a confirmation message.
2266
- */
2267
- updateAll(id: number, verificationCode: string): Promise<GenericCountMessageResponse>;
2268
- }
3541
+ declare const PlayerBuildProps: Record<PlayerBuild, {
3542
+ name: string;
3543
+ }>;
3544
+ declare function isPlayerBuild(buildString: string): buildString is PlayerBuild;
2269
3545
 
2270
- interface WOMClientOptions {
2271
- apiKey?: string;
2272
- userAgent?: string;
2273
- baseAPIUrl?: string;
2274
- }
2275
- declare class WOMClient extends BaseAPIClient {
2276
- deltas: DeltasClient;
2277
- groups: GroupsClient;
2278
- players: PlayersClient;
2279
- records: RecordsClient;
2280
- efficiency: EfficiencyClient;
2281
- nameChanges: NameChangesClient;
2282
- competitions: CompetitionsClient;
2283
- constructor(options?: WOMClientOptions);
2284
- }
3546
+ declare const PlayerStatusProps: Record<PlayerStatus, {
3547
+ name: string;
3548
+ }>;
3549
+ declare function isPlayerStatus(statusString: string): statusString is PlayerStatus;
3550
+
3551
+ declare const PlayerTypeProps: Record<PlayerType, {
3552
+ name: string;
3553
+ }>;
3554
+ declare function isPlayerType(typeString: string): typeString is PlayerType;
2285
3555
 
2286
- export { ACTIVITIES, type Achievement, type AchievementDefinition, type AchievementProgress, type AchievementTemplate, Activity, type ActivityDelta, ActivityType, type ActivityValue, type AssertPlayerTypeResponse, BOSSES, type Bonus, Boss, type BossDelta, type BossMetaConfig, type BossValue, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, type ChangeMemberRolePayload, CompetitionCSVTableType, type CompetitionDetails, type CompetitionDetailsCSVParams, type CompetitionListItem, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, type CompetitionWithParticipations, type CompetitionsSearchFilter, ComputedMetric, type ComputedMetricDelta, type ComputedMetricValue, Country, type CountryDetails, CountryProps, type CreateCompetitionPayload, type CreateCompetitionResponse, type CreateGroupPayload, type CreateGroupResponse, type DeltaGroupLeaderboardEntry, type DeltaLeaderboardEntry, type DeltaLeaderboardFilter, type DenyContext, type EditCompetitionPayload, type EditGroupPayload, EfficiencyAlgorithmType, type EfficiencyAlgorithmTypeUnion, type EfficiencyLeaderboardsFilter, type ExtendedAchievement, type ExtendedAchievementWithPlayer, F2P_BOSSES, type FlaggedPlayerReviewContext, type FormattedSnapshot, GROUP_ROLES, type GenericCountMessageResponse, type GenericMessageResponse, type GetGroupGainsFilter, type GetPlayerGainsResponse, type Group, type GroupDetails, type GroupHiscoresActivityItem, type GroupHiscoresBossItem, type GroupHiscoresComputedMetricItem, type GroupHiscoresEntry, type GroupHiscoresSkillItem, type GroupListItem, type GroupMemberFragment, type GroupRecordsFilter, GroupRole, GroupRoleProps, type GroupStatistics, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, type MapOf, type MeasuredDeltaProgress, type MemberActivityWithPlayer, type MemberInput, type MembershipWithGroup, type MembershipWithPlayer, Metric, type MetricLeaders, MetricMeasure, MetricProps, MetricType, type MetricValueKey, type NameChange, type NameChangeDetails, NameChangeStatus, type NameChangeWithPlayer, type NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_STATUSES, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, type ParticipationWithCompetition, type ParticipationWithCompetitionAndStandings, type ParticipationWithPlayer, type ParticipationWithPlayerAndProgress, Period, PeriodProps, type Player, PlayerAnnotationType, type PlayerArchiveWithPlayer, PlayerBuild, PlayerBuildProps, type PlayerCompetitionStandingsFilter, type PlayerCompetitionsFilter, type PlayerDeltasMap, type PlayerDetails, type PlayerRecordsFilter, PlayerStatus, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, type Record, type RecordLeaderboardEntry, type RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, type SkillDelta, type SkillMetaConfig, type SkillMetaMethod, type SkillValue, type SkipContext, type Snapshot, type SnapshotFragment, type Team, type TimeRangeFilter, type Top5ProgressResult, WOMClient, findCountry, findCountryByCode, findCountryByName, findGroupRole, findMetric, findPeriod, findPlayerBuild, findPlayerType, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMetricMeasure, getMetricName, getMetricRankKey, getMetricValueKey, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isCompetitionStatus, isCompetitionType, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill, padNumber, parsePeriodExpression, round };
3556
+ export { type AchievementProgressResponse, type AchievementResponse, ActivityProps, type BossMetaConfig, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, CompetitionCSVTableType, type CompetitionDetailsResponse, type CompetitionResponse, CompetitionStatus, CompetitionStatusProps, type CompetitionTeam, CompetitionType, CompetitionTypeProps, ComputedMetricProps, Country, CountryProps, type CreateCompetitionPayload, type CreateGroupPayload, type EditCompetitionPayload, type EditGroupPayload, EfficiencyAlgorithmType, F2P_BOSSES, type GenericCountMessageResponse, type GenericMessageResponse, type GroupDetailsResponse, type GroupHiscoresEntryResponse, type GroupResponse, GroupRole, GroupRoleProps, type GroupStatisticsResponse, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, type MemberActivityResponse, type MembershipResponse, Metric, type MetricDelta, MetricProps, type NameChangeResponse, NameChangeStatus, PRIVILEGED_GROUP_ROLES, type ParticipantHistoryResponse, type ParticipationResponse, Period, PeriodProps, type PlayerArchiveResponse, PlayerBuild, PlayerBuildProps, type PlayerCompetitionStandingResponse, type PlayerDeltasMapResponse, type PlayerDetailsResponse, type PlayerResponse, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, type RecordResponse, SKILL_EXP_AT_99, type SkillMetaConfig, SkillProps, type SnapshotResponse, type TimeRangeFilter, WOMClient, findCountry, findCountryByCode, findCountryByName, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill };