@wise-old-man/utils 3.3.15 → 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";
@@ -620,331 +246,69 @@ declare const Metric: {
620
246
  readonly CONSTRUCTION: "construction";
621
247
  };
622
248
  type Metric = (typeof Metric)[keyof typeof Metric];
623
- declare const NameChangeStatus: {
624
- readonly PENDING: "pending";
625
- readonly DENIED: "denied";
626
- readonly APPROVED: "approved";
627
- };
628
- type NameChangeStatus = (typeof NameChangeStatus)[keyof typeof NameChangeStatus];
629
- declare const Period: {
630
- readonly FIVE_MIN: "five_min";
631
- readonly DAY: "day";
632
- readonly WEEK: "week";
633
- readonly MONTH: "month";
634
- readonly YEAR: "year";
635
- };
636
- type Period = (typeof Period)[keyof typeof Period];
637
- declare const PlayerType: {
638
- readonly UNKNOWN: "unknown";
639
- readonly REGULAR: "regular";
640
- readonly IRONMAN: "ironman";
641
- readonly HARDCORE: "hardcore";
642
- readonly ULTIMATE: "ultimate";
643
- };
644
- type PlayerType = (typeof PlayerType)[keyof typeof PlayerType];
645
- declare const PlayerAnnotationType: {
646
- readonly OPT_OUT: "opt_out";
647
- readonly OPT_OUT_GROUPS: "opt_out_groups";
648
- readonly OPT_OUT_COMPETITIONS: "opt_out_competitions";
649
- readonly BLOCKED: "blocked";
650
- readonly FAKE_F2P: "fake_f2p";
651
- };
652
- type PlayerAnnotationType = (typeof PlayerAnnotationType)[keyof typeof PlayerAnnotationType];
653
- declare const PlayerBuild: {
654
- readonly MAIN: "main";
655
- readonly F2P: "f2p";
656
- readonly F2P_LVL3: "f2p_lvl3";
657
- readonly LVL3: "lvl3";
658
- readonly ZERKER: "zerker";
659
- readonly DEF1: "def1";
660
- readonly HP10: "hp10";
661
- };
662
- type PlayerBuild = (typeof PlayerBuild)[keyof typeof PlayerBuild];
663
- declare const PlayerStatus: {
664
- readonly ACTIVE: "active";
665
- readonly UNRANKED: "unranked";
666
- readonly FLAGGED: "flagged";
667
- readonly ARCHIVED: "archived";
668
- readonly BANNED: "banned";
669
- };
670
- 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
+
671
290
  declare const CompetitionType: {
672
291
  readonly CLASSIC: "classic";
673
292
  readonly TEAM: "team";
674
293
  };
675
294
  type CompetitionType = (typeof CompetitionType)[keyof typeof CompetitionType];
676
- declare const GroupRole: {
677
- readonly ACHIEVER: "achiever";
678
- readonly ADAMANT: "adamant";
679
- readonly ADEPT: "adept";
680
- readonly ADMINISTRATOR: "administrator";
681
- readonly ADMIRAL: "admiral";
682
- readonly ADVENTURER: "adventurer";
683
- readonly AIR: "air";
684
- readonly ANCHOR: "anchor";
685
- readonly APOTHECARY: "apothecary";
686
- readonly ARCHER: "archer";
687
- readonly ARMADYLEAN: "armadylean";
688
- readonly ARTILLERY: "artillery";
689
- readonly ARTISAN: "artisan";
690
- readonly ASGARNIAN: "asgarnian";
691
- readonly ASSASSIN: "assassin";
692
- readonly ASSISTANT: "assistant";
693
- readonly ASTRAL: "astral";
694
- readonly ATHLETE: "athlete";
695
- readonly ATTACKER: "attacker";
696
- readonly BANDIT: "bandit";
697
- readonly BANDOSIAN: "bandosian";
698
- readonly BARBARIAN: "barbarian";
699
- readonly BATTLEMAGE: "battlemage";
700
- readonly BEAST: "beast";
701
- readonly BERSERKER: "berserker";
702
- readonly BLISTERWOOD: "blisterwood";
703
- readonly BLOOD: "blood";
704
- readonly BLUE: "blue";
705
- readonly BOB: "bob";
706
- readonly BODY: "body";
707
- readonly BRASSICAN: "brassican";
708
- readonly BRAWLER: "brawler";
709
- readonly BRIGADIER: "brigadier";
710
- readonly BRIGAND: "brigand";
711
- readonly BRONZE: "bronze";
712
- readonly BRUISER: "bruiser";
713
- readonly BULWARK: "bulwark";
714
- readonly BURGLAR: "burglar";
715
- readonly BURNT: "burnt";
716
- readonly CADET: "cadet";
717
- readonly CAPTAIN: "captain";
718
- readonly CARRY: "carry";
719
- readonly CHAMPION: "champion";
720
- readonly CHAOS: "chaos";
721
- readonly CLERIC: "cleric";
722
- readonly COLLECTOR: "collector";
723
- readonly COLONEL: "colonel";
724
- readonly COMMANDER: "commander";
725
- readonly COMPETITOR: "competitor";
726
- readonly COMPLETIONIST: "completionist";
727
- readonly CONSTRUCTOR: "constructor";
728
- readonly COOK: "cook";
729
- readonly COORDINATOR: "coordinator";
730
- readonly CORPORAL: "corporal";
731
- readonly COSMIC: "cosmic";
732
- readonly COUNCILLOR: "councillor";
733
- readonly CRAFTER: "crafter";
734
- readonly CREW: "crew";
735
- readonly CRUSADER: "crusader";
736
- readonly CUTPURSE: "cutpurse";
737
- readonly DEATH: "death";
738
- readonly DEFENDER: "defender";
739
- readonly DEFILER: "defiler";
740
- readonly DEPUTY_OWNER: "deputy_owner";
741
- readonly DESTROYER: "destroyer";
742
- readonly DIAMOND: "diamond";
743
- readonly DISEASED: "diseased";
744
- readonly DOCTOR: "doctor";
745
- readonly DOGSBODY: "dogsbody";
746
- readonly DRAGON: "dragon";
747
- readonly DRAGONSTONE: "dragonstone";
748
- readonly DRUID: "druid";
749
- readonly DUELLIST: "duellist";
750
- readonly EARTH: "earth";
751
- readonly ELITE: "elite";
752
- readonly EMERALD: "emerald";
753
- readonly ENFORCER: "enforcer";
754
- readonly EPIC: "epic";
755
- readonly EXECUTIVE: "executive";
756
- readonly EXPERT: "expert";
757
- readonly EXPLORER: "explorer";
758
- readonly FARMER: "farmer";
759
- readonly FEEDER: "feeder";
760
- readonly FIGHTER: "fighter";
761
- readonly FIRE: "fire";
762
- readonly FIREMAKER: "firemaker";
763
- readonly FIRESTARTER: "firestarter";
764
- readonly FISHER: "fisher";
765
- readonly FLETCHER: "fletcher";
766
- readonly FORAGER: "forager";
767
- readonly FREMENNIK: "fremennik";
768
- readonly GAMER: "gamer";
769
- readonly GATHERER: "gatherer";
770
- readonly GENERAL: "general";
771
- readonly GNOME_CHILD: "gnome_child";
772
- readonly GNOME_ELDER: "gnome_elder";
773
- readonly GOBLIN: "goblin";
774
- readonly GOLD: "gold";
775
- readonly GOON: "goon";
776
- readonly GREEN: "green";
777
- readonly GREY: "grey";
778
- readonly GUARDIAN: "guardian";
779
- readonly GUTHIXIAN: "guthixian";
780
- readonly HARPOON: "harpoon";
781
- readonly HEALER: "healer";
782
- readonly HELLCAT: "hellcat";
783
- readonly HELPER: "helper";
784
- readonly HERBOLOGIST: "herbologist";
785
- readonly HERO: "hero";
786
- readonly HOLY: "holy";
787
- readonly HOARDER: "hoarder";
788
- readonly HUNTER: "hunter";
789
- readonly IGNITOR: "ignitor";
790
- readonly ILLUSIONIST: "illusionist";
791
- readonly IMP: "imp";
792
- readonly INFANTRY: "infantry";
793
- readonly INQUISITOR: "inquisitor";
794
- readonly IRON: "iron";
795
- readonly JADE: "jade";
796
- readonly JUSTICIAR: "justiciar";
797
- readonly KANDARIN: "kandarin";
798
- readonly KARAMJAN: "karamjan";
799
- readonly KHARIDIAN: "kharidian";
800
- readonly KITTEN: "kitten";
801
- readonly KNIGHT: "knight";
802
- readonly LABOURER: "labourer";
803
- readonly LAW: "law";
804
- readonly LEADER: "leader";
805
- readonly LEARNER: "learner";
806
- readonly LEGACY: "legacy";
807
- readonly LEGEND: "legend";
808
- readonly LEGIONNAIRE: "legionnaire";
809
- readonly LIEUTENANT: "lieutenant";
810
- readonly LOOTER: "looter";
811
- readonly LUMBERJACK: "lumberjack";
812
- readonly MAGIC: "magic";
813
- readonly MAGICIAN: "magician";
814
- readonly MAJOR: "major";
815
- readonly MAPLE: "maple";
816
- readonly MARSHAL: "marshal";
817
- readonly MASTER: "master";
818
- readonly MAXED: "maxed";
819
- readonly MEDIATOR: "mediator";
820
- readonly MEDIC: "medic";
821
- readonly MENTOR: "mentor";
822
- readonly MEMBER: "member";
823
- readonly MERCHANT: "merchant";
824
- readonly MIND: "mind";
825
- readonly MINER: "miner";
826
- readonly MINION: "minion";
827
- readonly MISTHALINIAN: "misthalinian";
828
- readonly MITHRIL: "mithril";
829
- readonly MODERATOR: "moderator";
830
- readonly MONARCH: "monarch";
831
- readonly MORYTANIAN: "morytanian";
832
- readonly MYSTIC: "mystic";
833
- readonly MYTH: "myth";
834
- readonly NATURAL: "natural";
835
- readonly NATURE: "nature";
836
- readonly NECROMANCER: "necromancer";
837
- readonly NINJA: "ninja";
838
- readonly NOBLE: "noble";
839
- readonly NOVICE: "novice";
840
- readonly NURSE: "nurse";
841
- readonly OAK: "oak";
842
- readonly OFFICER: "officer";
843
- readonly ONYX: "onyx";
844
- readonly OPAL: "opal";
845
- readonly ORACLE: "oracle";
846
- readonly ORANGE: "orange";
847
- readonly OWNER: "owner";
848
- readonly PAGE: "page";
849
- readonly PALADIN: "paladin";
850
- readonly PAWN: "pawn";
851
- readonly PILGRIM: "pilgrim";
852
- readonly PINE: "pine";
853
- readonly PINK: "pink";
854
- readonly PREFECT: "prefect";
855
- readonly PRIEST: "priest";
856
- readonly PRIVATE: "private";
857
- readonly PRODIGY: "prodigy";
858
- readonly PROSELYTE: "proselyte";
859
- readonly PROSPECTOR: "prospector";
860
- readonly PROTECTOR: "protector";
861
- readonly PURE: "pure";
862
- readonly PURPLE: "purple";
863
- readonly PYROMANCER: "pyromancer";
864
- readonly QUESTER: "quester";
865
- readonly RACER: "racer";
866
- readonly RAIDER: "raider";
867
- readonly RANGER: "ranger";
868
- readonly RECORD_CHASER: "record_chaser";
869
- readonly RECRUIT: "recruit";
870
- readonly RECRUITER: "recruiter";
871
- readonly RED_TOPAZ: "red_topaz";
872
- readonly RED: "red";
873
- readonly ROGUE: "rogue";
874
- readonly RUBY: "ruby";
875
- readonly RUNE: "rune";
876
- readonly RUNECRAFTER: "runecrafter";
877
- readonly SAGE: "sage";
878
- readonly SAPPHIRE: "sapphire";
879
- readonly SARADOMINIST: "saradominist";
880
- readonly SAVIOUR: "saviour";
881
- readonly SCAVENGER: "scavenger";
882
- readonly SCHOLAR: "scholar";
883
- readonly SCOURGE: "scourge";
884
- readonly SCOUT: "scout";
885
- readonly SCRIBE: "scribe";
886
- readonly SEER: "seer";
887
- readonly SENATOR: "senator";
888
- readonly SENTRY: "sentry";
889
- readonly SERENIST: "serenist";
890
- readonly SERGEANT: "sergeant";
891
- readonly SHAMAN: "shaman";
892
- readonly SHERIFF: "sheriff";
893
- readonly SHORT_GREEN_GUY: "short_green_guy";
894
- readonly SKILLER: "skiller";
895
- readonly SKULLED: "skulled";
896
- readonly SLAYER: "slayer";
897
- readonly SMITER: "smiter";
898
- readonly SMITH: "smith";
899
- readonly SMUGGLER: "smuggler";
900
- readonly SNIPER: "sniper";
901
- readonly SOUL: "soul";
902
- readonly SPECIALIST: "specialist";
903
- readonly SPEED_RUNNER: "speed_runner";
904
- readonly SPELLCASTER: "spellcaster";
905
- readonly SQUIRE: "squire";
906
- readonly STAFF: "staff";
907
- readonly STEEL: "steel";
908
- readonly STRIDER: "strider";
909
- readonly STRIKER: "striker";
910
- readonly SUMMONER: "summoner";
911
- readonly SUPERIOR: "superior";
912
- readonly SUPERVISOR: "supervisor";
913
- readonly TEACHER: "teacher";
914
- readonly TEMPLAR: "templar";
915
- readonly THERAPIST: "therapist";
916
- readonly THIEF: "thief";
917
- readonly TIRANNIAN: "tirannian";
918
- readonly TRIALIST: "trialist";
919
- readonly TRICKSTER: "trickster";
920
- readonly TZKAL: "tzkal";
921
- readonly TZTOK: "tztok";
922
- readonly UNHOLY: "unholy";
923
- readonly VAGRANT: "vagrant";
924
- readonly VANGUARD: "vanguard";
925
- readonly WALKER: "walker";
926
- readonly WANDERER: "wanderer";
927
- readonly WARDEN: "warden";
928
- readonly WARLOCK: "warlock";
929
- readonly WARRIOR: "warrior";
930
- readonly WATER: "water";
931
- readonly WILD: "wild";
932
- readonly WILLOW: "willow";
933
- readonly WILY: "wily";
934
- readonly WINTUMBER: "wintumber";
935
- readonly WITCH: "witch";
936
- readonly WIZARD: "wizard";
937
- readonly WORKER: "worker";
938
- readonly WRATH: "wrath";
939
- readonly XERICIAN: "xerician";
940
- readonly YELLOW: "yellow";
941
- readonly YEW: "yew";
942
- readonly ZAMORAKIAN: "zamorakian";
943
- readonly ZAROSIAN: "zarosian";
944
- readonly ZEALOT: "zealot";
945
- readonly ZENYTE: "zenyte";
946
- };
947
- 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
+
948
312
  declare const Country: {
949
313
  readonly AD: "AD";
950
314
  readonly AE: "AE";
@@ -1200,629 +564,888 @@ declare const Country: {
1200
564
  readonly ZW: "ZW";
1201
565
  };
1202
566
  type Country = (typeof Country)[keyof typeof Country];
1203
- declare const ActivityType: {
1204
- readonly JOINED: "joined";
1205
- readonly LEFT: "left";
1206
- readonly CHANGED_ROLE: "changed_role";
1207
- };
1208
- type ActivityType = (typeof ActivityType)[keyof typeof ActivityType];
1209
567
 
1210
- type Achievement = Omit<Prisma_Base_Achievement, 'threshold' | 'accuracy'> & {
1211
- threshold: number;
1212
- accuracy: number | null;
1213
- };
1214
- type Record = Omit<Prisma_Base_Record, 'value'> & {
1215
- value: number;
1216
- };
1217
- type Snapshot = Omit<Prisma_Base_Snapshot, 'overallExperience'> & {
1218
- overallExperience: number;
1219
- };
1220
- type Player = Omit<Prisma_Base_Player, 'exp' | 'latestSnapshotId'> & {
1221
- exp: number;
1222
- };
1223
- type Group = Omit<Prisma_Base_Group, 'creatorIpHash'>;
1224
- type Competition = Omit<Prisma_Base_Competition, 'creatorIpHash'>;
1225
- type NameChange = Omit<Prisma_Base_NameChange, 'reviewContext'> & {
1226
- 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";
1227
574
  };
1228
- type GroupSocialLinks = Omit<Prisma_Base_GroupSocialLinks, 'id' | 'groupId' | 'createdAt' | 'updatedAt'>;
1229
-
1230
- interface AchievementTemplate {
1231
- name: string;
1232
- metric: Metric;
1233
- measure?: string;
1234
- thresholds: number[];
1235
- getCurrentValue?: (snapshot: Snapshot, threshold: number) => number;
1236
- }
1237
- interface AchievementDefinition {
1238
- name: string;
1239
- metric: Metric;
1240
- measure: string;
1241
- threshold: number;
1242
- validate: (snapshot: Snapshot) => boolean;
1243
- getCurrentValue: (snapshot: Snapshot) => number;
1244
- }
1245
- interface ExtendedAchievement extends Achievement {
1246
- measure: string;
1247
- }
1248
- interface ExtendedAchievementWithPlayer extends ExtendedAchievement {
1249
- player: Player;
1250
- }
1251
- interface AchievementProgress extends Omit<ExtendedAchievement, 'createdAt'> {
1252
- createdAt: Date | null;
1253
- currentValue: number;
1254
- absoluteProgress: number;
1255
- relativeProgress: number;
1256
- }
575
+ type Period = (typeof Period)[keyof typeof Period];
1257
576
 
1258
- interface MeasuredDeltaProgress {
1259
- start: number;
1260
- end: number;
1261
- gained: number;
1262
- }
1263
- interface SkillDelta {
1264
- metric: Skill;
1265
- ehp: MeasuredDeltaProgress;
1266
- rank: MeasuredDeltaProgress;
1267
- level: MeasuredDeltaProgress;
1268
- experience: MeasuredDeltaProgress;
1269
- }
1270
- interface BossDelta {
1271
- metric: Boss;
1272
- ehb: MeasuredDeltaProgress;
1273
- rank: MeasuredDeltaProgress;
1274
- kills: MeasuredDeltaProgress;
1275
- }
1276
- interface ActivityDelta {
1277
- metric: Activity;
1278
- rank: MeasuredDeltaProgress;
1279
- score: MeasuredDeltaProgress;
1280
- }
1281
- interface ComputedMetricDelta {
1282
- metric: ComputedMetric;
1283
- rank: MeasuredDeltaProgress;
1284
- value: MeasuredDeltaProgress;
1285
- }
1286
- interface PlayerDeltasMap {
1287
- skills: MapOf<Skill, SkillDelta>;
1288
- bosses: MapOf<Boss, BossDelta>;
1289
- activities: MapOf<Activity, ActivityDelta>;
1290
- computed: MapOf<ComputedMetric, ComputedMetricDelta>;
1291
- }
1292
- interface DeltaLeaderboardEntry {
1293
- player: Player;
1294
- playerId: number;
1295
- startDate: Date;
1296
- endDate: Date;
1297
- gained: number;
1298
- }
1299
- interface DeltaGroupLeaderboardEntry {
1300
- player: Player;
1301
- startDate: Date;
1302
- endDate: Date;
1303
- data: {
1304
- start: number;
1305
- end: number;
1306
- gained: number;
1307
- };
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"
1308
587
  }
1309
588
 
1310
- type SnapshotFragment = Omit<Snapshot, 'id'>;
1311
- interface SkillValue {
1312
- metric: Skill;
1313
- rank: number;
1314
- level: number;
1315
- experience: number;
1316
- ehp: number;
1317
- }
1318
- interface BossValue {
1319
- metric: Boss;
1320
- rank: number;
1321
- kills: number;
1322
- ehb: number;
1323
- }
1324
- interface ActivityValue {
1325
- metric: Activity;
1326
- rank: number;
1327
- score: number;
1328
- }
1329
- interface ComputedMetricValue {
1330
- metric: ComputedMetric;
1331
- rank: number;
1332
- value: number;
1333
- }
1334
- interface MetricLeaders {
1335
- skills: MapOf<Skill, Omit<SkillValue, 'ehp'> & {
1336
- player: Player | null;
1337
- }>;
1338
- bosses: MapOf<Boss, Omit<BossValue, 'ehb'> & {
1339
- player: Player | null;
1340
- }>;
1341
- activities: MapOf<Activity, ActivityValue & {
1342
- player: Player | null;
1343
- }>;
1344
- computed: MapOf<ComputedMetric, ComputedMetricValue & {
1345
- 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;
1346
1173
  }>;
1347
1174
  }
1348
- 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 {
1349
1207
  id: number;
1350
1208
  playerId: number;
1351
1209
  createdAt: Date;
1352
1210
  importedAt: Date | null;
1353
1211
  data: {
1354
- skills: MapOf<Skill, SkillValue>;
1355
- bosses: MapOf<Boss, BossValue>;
1356
- activities: MapOf<Activity, ActivityValue>;
1357
- computed: MapOf<ComputedMetric, ComputedMetricValue>;
1212
+ skills: Record<Skill, SkillData>;
1213
+ bosses: Record<Boss, BossData>;
1214
+ activities: Record<Activity, ActivityData>;
1215
+ computed: Record<ComputedMetric, ComputeMetricData>;
1358
1216
  };
1359
1217
  }
1360
1218
 
1361
- interface GroupListItem extends Omit<Group, 'verificationHash'> {
1362
- memberCount: number;
1363
- }
1364
- interface GroupDetails extends GroupListItem {
1365
- socialLinks: GroupSocialLinks;
1366
- memberships: MembershipWithPlayer[];
1367
- roleOrders: GroupRoleOrder[];
1368
- }
1369
- interface MembershipWithGroup extends Membership {
1370
- group: GroupListItem;
1371
- }
1372
- interface MembershipWithPlayer extends Membership {
1373
- 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
+ }>;
1374
1259
  }
1375
- interface MemberInput {
1376
- username: string;
1377
- 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;
1378
1270
  }
1379
- interface GroupHiscoresSkillItem {
1271
+ interface GroupHiscoresSkillData {
1380
1272
  type: 'skill';
1381
1273
  rank: number;
1382
1274
  level: number;
1383
1275
  experience: number;
1384
1276
  }
1385
- interface GroupHiscoresBossItem {
1277
+ interface GroupHiscoresBossData {
1386
1278
  type: 'boss';
1387
1279
  rank: number;
1388
1280
  kills: number;
1389
1281
  }
1390
- interface GroupHiscoresActivityItem {
1282
+ interface GroupHiscoresActivityData {
1391
1283
  type: 'activity';
1392
1284
  rank: number;
1393
1285
  score: number;
1394
1286
  }
1395
- interface GroupHiscoresComputedMetricItem {
1287
+ interface GroupHiscoresComputedMetricData {
1396
1288
  type: 'computed';
1397
1289
  rank: number;
1398
1290
  value: number;
1399
1291
  }
1400
- interface GroupHiscoresEntry {
1401
- player: Player;
1402
- data: GroupHiscoresSkillItem | GroupHiscoresBossItem | GroupHiscoresActivityItem | GroupHiscoresComputedMetricItem;
1403
- }
1404
- interface GroupStatistics {
1405
- maxedCombatCount: number;
1406
- maxedTotalCount: number;
1407
- maxed200msCount: number;
1408
- averageStats: FormattedSnapshot;
1409
- metricLeaders: MetricLeaders;
1410
- }
1411
- type MemberActivityWithPlayer = MemberActivity & {
1412
- player: Player;
1413
- };
1414
1292
 
1415
- type CleanCompetition = Omit<Competition, 'verificationHash'>;
1416
- type CleanParticipation = Omit<Participation, 'startSnapshotId' | 'endSnapshotId'>;
1417
- interface CompetitionListItem extends CleanCompetition {
1418
- group?: GroupListItem;
1419
- participantCount: number;
1420
- }
1421
- interface CompetitionDetails extends CompetitionListItem {
1422
- participations: ParticipationWithPlayerAndProgress[];
1423
- }
1424
- interface CompetitionWithParticipations extends CompetitionListItem {
1425
- participations: ParticipationWithPlayer[];
1426
- }
1427
- interface ParticipationWithCompetition extends CleanParticipation {
1428
- competition: CompetitionListItem;
1429
- }
1430
- interface ParticipationWithPlayer extends CleanParticipation {
1431
- player: Player;
1432
- }
1433
- interface ParticipationWithPlayerAndProgress extends ParticipationWithPlayer {
1434
- progress: MeasuredDeltaProgress;
1435
- levels: MeasuredDeltaProgress;
1436
- }
1437
- interface ParticipationWithCompetitionAndStandings extends ParticipationWithCompetition {
1438
- progress: MeasuredDeltaProgress;
1439
- levels: MeasuredDeltaProgress;
1440
- rank: number;
1441
- }
1442
- interface Team {
1443
- name: string;
1444
- participants: string[];
1445
- }
1446
- type Top5ProgressResult = Array<{
1447
- player: Player;
1448
- 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;
1449
1324
  value: number;
1450
- date: Date;
1451
1325
  }>;
1452
- }>;
1453
-
1454
- declare enum EfficiencyAlgorithmType {
1455
- MAIN = "main",
1456
- IRONMAN = "ironman",
1457
- ULTIMATE = "ultimate",
1458
- LVL3 = "lvl3",
1459
- F2P = "f2p",
1460
- F2P_LVL3 = "f2p_lvl3",
1461
- F2P_IRONMAN = "f2p_ironman",
1462
- F2P_LVL3_IRONMAN = "f2p_lvl3_ironman",
1463
- DEF1 = "def1"
1464
- }
1465
- interface SkillMetaMethod {
1466
- rate: number;
1467
- realRate?: number;
1468
- startExp: number;
1469
- description: string;
1470
- }
1471
- interface SkillMetaConfig {
1472
- skill: Skill;
1473
- methods: Array<SkillMetaMethod>;
1474
- bonuses: Bonus[];
1475
- }
1476
- interface BossMetaConfig {
1477
- boss: Boss;
1478
- rate: number;
1479
- }
1480
- interface Bonus {
1481
- originSkill: Skill;
1482
- bonusSkill: Skill;
1483
- startExp: number;
1484
- endExp: number;
1485
- maxBonus?: number;
1486
- end: boolean;
1487
- ratio: number;
1488
1326
  }
1489
1327
 
1490
- type DenyContext = {
1491
- reason: 'manual_review';
1492
- } | {
1493
- reason: 'old_stats_cannot_be_found';
1494
- } | {
1495
- reason: 'new_name_not_on_the_hiscores';
1496
- } | {
1497
- reason: 'negative_gains';
1498
- negativeGains: MapOf<Metric, number>;
1499
- };
1500
- type SkipContext = {
1501
- reason: 'transition_period_too_long';
1502
- maxHoursDiff: number;
1503
- hoursDiff: number;
1504
- } | {
1505
- reason: 'excessive_gains';
1506
- ehpDiff: number;
1507
- ehbDiff: number;
1508
- hoursDiff: number;
1509
- } | {
1510
- reason: 'total_level_too_low';
1511
- minTotalLevel: number;
1512
- totalLevel: number;
1513
- };
1514
- type NameChangeDetails = {
1515
- nameChange: NameChange;
1516
- data?: {
1517
- isNewOnHiscores: boolean;
1518
- isOldOnHiscores: boolean;
1519
- isNewTracked: boolean;
1520
- hasNegativeGains: boolean;
1521
- negativeGains: MapOf<Metric, number> | null;
1522
- timeDiff: number;
1523
- hoursDiff: number;
1524
- ehpDiff: number;
1525
- ehbDiff: number;
1526
- oldStats: FormattedSnapshot;
1527
- newStats: FormattedSnapshot | null;
1528
- };
1529
- };
1530
- type NameChangeWithPlayer = NameChange & {
1531
- player: Player;
1532
- };
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
+ */
1533
1334
 
1534
- interface PlayerDetails extends Player {
1535
- combatLevel: number;
1536
- archive: PlayerArchive | null;
1537
- latestSnapshot: FormattedSnapshot | null;
1538
- annotations: PlayerAnnotation[];
1539
- }
1540
- interface FlaggedPlayerReviewContext {
1541
- previous: FormattedSnapshot;
1542
- rejected: FormattedSnapshot;
1543
- negativeGains: boolean;
1544
- excessiveGains: boolean;
1545
- possibleRollback: boolean;
1546
- excessiveGainsReversed: boolean;
1547
- data: {
1548
- stackableGainedRatio: number;
1549
- previousEHP: number;
1550
- previousEHB: number;
1551
- previousRank: number;
1552
- rejectedEHP: number;
1553
- rejectedEHB: number;
1554
- rejectedRank: number;
1555
- };
1335
+ interface GroupStatisticsResponse {
1336
+ maxedCombatCount: number;
1337
+ maxedTotalCount: number;
1338
+ maxed200msCount: number;
1339
+ averageStats: SnapshotResponse;
1340
+ metricLeaders: GroupMetricLeadersResponse;
1556
1341
  }
1557
- type PlayerArchiveWithPlayer = PlayerArchive & {
1558
- player: Player;
1559
- };
1560
-
1561
- type RecordLeaderboardEntry = Record & {
1562
- player: Player;
1563
- };
1564
1342
 
1565
- type MapOf<K extends keyof any, T> = {
1566
- [P in K]: T;
1567
- };
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
+ */
1568
1349
 
1569
- declare enum CompetitionStatus {
1570
- UPCOMING = "upcoming",
1571
- ONGOING = "ongoing",
1572
- FINISHED = "finished"
1573
- }
1574
- declare enum CompetitionCSVTableType {
1575
- TEAM = "team",
1576
- TEAMS = "teams",
1577
- PARTICIPANTS = "participants"
1578
- }
1579
- declare const CompetitionTypeProps: MapOf<CompetitionType, {
1580
- name: string;
1581
- }>;
1582
- declare const CompetitionStatusProps: MapOf<CompetitionStatus, {
1583
- name: string;
1584
- }>;
1585
- declare const COMPETITION_TYPES: ("classic" | "team")[];
1586
- declare const COMPETITION_STATUSES: CompetitionStatus[];
1587
- declare function isCompetitionType(typeString: string): typeString is CompetitionType;
1588
- declare function isCompetitionStatus(statusString: string): statusString is CompetitionStatus;
1350
+ type MemberActivityResponse = MemberActivity;
1589
1351
 
1590
- interface CountryDetails {
1591
- code: Country;
1592
- name: string;
1593
- }
1594
- declare const CountryProps: MapOf<Country, CountryDetails>;
1595
- 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")[];
1596
- declare function isCountry(countryCodeString: string): countryCodeString is Country;
1597
- declare function findCountry(countryIdentifier: string): CountryDetails | undefined;
1598
- declare function findCountryByName(countryName: string): CountryDetails | undefined;
1599
- 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
+ */
1600
1358
 
1601
- declare const MAX_LEVEL = 99;
1602
- declare const MAX_VIRTUAL_LEVEL = 126;
1603
- declare const MAX_SKILL_EXP = 200000000;
1604
- declare const SKILL_EXP_AT_99 = 13034431;
1605
- declare const CAPPED_MAX_TOTAL_XP: number;
1606
- declare function getExpForLevel(level: number): number;
1607
- declare function getLevel(exp: number, virtual?: boolean): number;
1608
- declare function getCombatLevel(attack: number, strength: number, defence: number, ranged: number, magic: number, hitpoints: number, prayer: number): number;
1359
+ type NameChangeResponse = NameChange;
1609
1360
 
1610
- 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")[];
1611
- declare const PRIVELEGED_GROUP_ROLES: GroupRole[];
1612
- type GroupRolePropsMap = MapOf<GroupRole, {
1613
- name: string;
1614
- isPriveleged: boolean;
1615
- }>;
1616
- declare const GroupRoleProps: GroupRolePropsMap;
1617
- declare function findGroupRole(roleName: string): GroupRole | null;
1618
- 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
+ */
1619
1367
 
1620
- declare enum MetricType {
1621
- SKILL = "skill",
1622
- BOSS = "boss",
1623
- ACTIVITY = "activity",
1624
- COMPUTED = "computed"
1625
- }
1626
- declare enum MetricMeasure {
1627
- EXPERIENCE = "experience",
1628
- KILLS = "kills",
1629
- SCORE = "score",
1630
- VALUE = "value"
1631
- }
1632
- interface SkillProperties {
1633
- name: string;
1634
- isCombat: boolean;
1635
- isMembers: boolean;
1636
- type: MetricType;
1637
- measure: MetricMeasure;
1638
- }
1639
- interface BossProperties {
1640
- name: string;
1641
- minimumValue: number;
1642
- isMembers: boolean;
1643
- type: MetricType;
1644
- measure: MetricMeasure;
1645
- }
1646
- interface ActivityProperties {
1647
- name: string;
1648
- minimumValue: number;
1649
- type: MetricType;
1650
- measure: MetricMeasure;
1651
- }
1652
- interface ComputedMetricProperties {
1653
- name: string;
1654
- type: MetricType;
1655
- measure: MetricMeasure;
1656
- }
1657
- declare const MetricProps: {
1658
- readonly ehp: ComputedMetricProperties;
1659
- readonly ehb: ComputedMetricProperties;
1660
- readonly league_points: ActivityProperties;
1661
- readonly bounty_hunter_hunter: ActivityProperties;
1662
- readonly bounty_hunter_rogue: ActivityProperties;
1663
- readonly clue_scrolls_all: ActivityProperties;
1664
- readonly clue_scrolls_beginner: ActivityProperties;
1665
- readonly clue_scrolls_easy: ActivityProperties;
1666
- readonly clue_scrolls_medium: ActivityProperties;
1667
- readonly clue_scrolls_hard: ActivityProperties;
1668
- readonly clue_scrolls_elite: ActivityProperties;
1669
- readonly clue_scrolls_master: ActivityProperties;
1670
- readonly last_man_standing: ActivityProperties;
1671
- readonly pvp_arena: ActivityProperties;
1672
- readonly soul_wars_zeal: ActivityProperties;
1673
- readonly guardians_of_the_rift: ActivityProperties;
1674
- readonly colosseum_glory: ActivityProperties;
1675
- readonly collections_logged: ActivityProperties;
1676
- readonly abyssal_sire: BossProperties;
1677
- readonly alchemical_hydra: BossProperties;
1678
- readonly amoxliatl: BossProperties;
1679
- readonly araxxor: BossProperties;
1680
- readonly artio: BossProperties;
1681
- readonly barrows_chests: BossProperties;
1682
- readonly bryophyta: BossProperties;
1683
- readonly callisto: BossProperties;
1684
- readonly calvarion: BossProperties;
1685
- readonly cerberus: BossProperties;
1686
- readonly chambers_of_xeric: BossProperties;
1687
- readonly chambers_of_xeric_challenge_mode: BossProperties;
1688
- readonly chaos_elemental: BossProperties;
1689
- readonly chaos_fanatic: BossProperties;
1690
- readonly commander_zilyana: BossProperties;
1691
- readonly corporeal_beast: BossProperties;
1692
- readonly crazy_archaeologist: BossProperties;
1693
- readonly dagannoth_prime: BossProperties;
1694
- readonly dagannoth_rex: BossProperties;
1695
- readonly dagannoth_supreme: BossProperties;
1696
- readonly deranged_archaeologist: BossProperties;
1697
- readonly doom_of_mokhaiotl: BossProperties;
1698
- readonly duke_sucellus: BossProperties;
1699
- readonly general_graardor: BossProperties;
1700
- readonly giant_mole: BossProperties;
1701
- readonly grotesque_guardians: BossProperties;
1702
- readonly hespori: BossProperties;
1703
- readonly kalphite_queen: BossProperties;
1704
- readonly king_black_dragon: BossProperties;
1705
- readonly kraken: BossProperties;
1706
- readonly kreearra: BossProperties;
1707
- readonly kril_tsutsaroth: BossProperties;
1708
- readonly lunar_chests: BossProperties;
1709
- readonly mimic: BossProperties;
1710
- readonly nex: BossProperties;
1711
- readonly nightmare: BossProperties;
1712
- readonly phosanis_nightmare: BossProperties;
1713
- readonly obor: BossProperties;
1714
- readonly phantom_muspah: BossProperties;
1715
- readonly sarachnis: BossProperties;
1716
- readonly scorpia: BossProperties;
1717
- readonly scurrius: BossProperties;
1718
- readonly skotizo: BossProperties;
1719
- readonly sol_heredit: BossProperties;
1720
- readonly spindel: BossProperties;
1721
- readonly tempoross: BossProperties;
1722
- readonly the_gauntlet: BossProperties;
1723
- readonly the_corrupted_gauntlet: BossProperties;
1724
- readonly the_hueycoatl: BossProperties;
1725
- readonly the_leviathan: BossProperties;
1726
- readonly the_royal_titans: BossProperties;
1727
- readonly the_whisperer: BossProperties;
1728
- readonly theatre_of_blood: BossProperties;
1729
- readonly theatre_of_blood_hard_mode: BossProperties;
1730
- readonly thermonuclear_smoke_devil: BossProperties;
1731
- readonly tombs_of_amascut: BossProperties;
1732
- readonly tombs_of_amascut_expert: BossProperties;
1733
- readonly tzkal_zuk: BossProperties;
1734
- readonly tztok_jad: BossProperties;
1735
- readonly vardorvis: BossProperties;
1736
- readonly venenatis: BossProperties;
1737
- readonly vetion: BossProperties;
1738
- readonly vorkath: BossProperties;
1739
- readonly wintertodt: BossProperties;
1740
- readonly yama: BossProperties;
1741
- readonly zalcano: BossProperties;
1742
- readonly zulrah: BossProperties;
1743
- readonly overall: SkillProperties;
1744
- readonly attack: SkillProperties;
1745
- readonly defence: SkillProperties;
1746
- readonly strength: SkillProperties;
1747
- readonly hitpoints: SkillProperties;
1748
- readonly ranged: SkillProperties;
1749
- readonly prayer: SkillProperties;
1750
- readonly magic: SkillProperties;
1751
- readonly cooking: SkillProperties;
1752
- readonly woodcutting: SkillProperties;
1753
- readonly fletching: SkillProperties;
1754
- readonly fishing: SkillProperties;
1755
- readonly firemaking: SkillProperties;
1756
- readonly crafting: SkillProperties;
1757
- readonly smithing: SkillProperties;
1758
- readonly mining: SkillProperties;
1759
- readonly herblore: SkillProperties;
1760
- readonly agility: SkillProperties;
1761
- readonly thieving: SkillProperties;
1762
- readonly slayer: SkillProperties;
1763
- readonly farming: SkillProperties;
1764
- readonly runecrafting: SkillProperties;
1765
- readonly hunter: SkillProperties;
1766
- readonly construction: SkillProperties;
1767
- };
1768
- declare const METRICS: Metric[];
1769
- declare const SKILLS: Skill[];
1770
- declare const BOSSES: Boss[];
1771
- declare const ACTIVITIES: Activity[];
1772
- declare const COMPUTED_METRICS: ComputedMetric[];
1773
- declare const REAL_SKILLS: Skill[];
1774
- declare const F2P_BOSSES: Boss[];
1775
- declare const MEMBER_SKILLS: Skill[];
1776
- declare const COMBAT_SKILLS: Skill[];
1777
- declare const REAL_METRICS: (Skill | Activity | Boss)[];
1778
- declare function findMetric(metricName: string): Metric | null;
1779
- declare function isMetric(metric: Metric | string): metric is Metric;
1780
- declare function isSkill(metric: Metric | string): metric is Skill;
1781
- declare function isActivity(metric: Metric | string): metric is Activity;
1782
- declare function isBoss(metric: Metric | string): metric is Boss;
1783
- declare function isComputedMetric(metric: Metric | string): metric is ComputedMetric;
1784
- declare function getMetricRankKey<T extends Metric>(metric: T): `${T}Rank`;
1785
- type MetricValueKey = `${Skill}Experience` | `${Boss}Kills` | `${Activity}Score` | `${ComputedMetric}Value`;
1786
- declare function getMetricValueKey(metric: Metric): MetricValueKey;
1787
- declare function getMetricMeasure(metric: Metric): MetricMeasure;
1788
- declare function getMetricName(metric: Metric): string;
1789
- declare function getMinimumValue(metric: Metric): number;
1790
- declare function getParentEfficiencyMetric(metric: Metric): "ehp" | "ehb";
1368
+ interface ParticipantHistoryResponse {
1369
+ player: PlayerResponse;
1370
+ history: Array<{
1371
+ value: number;
1372
+ date: Date;
1373
+ }>;
1374
+ }
1791
1375
 
1792
- type PeriodPropsMap = MapOf<Period, {
1793
- name: string;
1794
- milliseconds: number;
1795
- }>;
1796
- declare const PeriodProps: PeriodPropsMap;
1797
- declare const PERIODS: ("five_min" | "day" | "week" | "month" | "year")[];
1798
- declare function findPeriod(periodName: string): Period | null;
1799
- declare function isPeriod(periodString: string): periodString is Period;
1800
- declare function parsePeriodExpression(periodExpression: string): {
1801
- expression: string;
1802
- 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;
1803
1399
  };
1804
1400
 
1805
- declare const PlayerTypeProps: MapOf<PlayerType, {
1806
- name: string;
1807
- }>;
1808
- declare const PlayerBuildProps: MapOf<PlayerBuild, {
1809
- name: string;
1810
- }>;
1811
- declare const PlayerStatusProps: MapOf<PlayerStatus, {
1812
- name: string;
1813
- }>;
1814
- declare const PLAYER_TYPES: ("unknown" | "regular" | "ironman" | "hardcore" | "ultimate")[];
1815
- declare const PLAYER_BUILDS: ("main" | "f2p" | "f2p_lvl3" | "lvl3" | "zerker" | "def1" | "hp10")[];
1816
- declare const PLAYER_STATUSES: ("active" | "unranked" | "flagged" | "archived" | "banned")[];
1817
- declare function isPlayerType(typeString: string): typeString is PlayerType;
1818
- declare function isPlayerBuild(buildString: string): buildString is PlayerBuild;
1819
- declare function isPlayerStatus(statusString: string): statusString is PlayerStatus;
1820
- declare function findPlayerType(typeName: string): PlayerType | null;
1821
- 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
+ */
1822
1447
 
1823
- declare function formatNumber(num: number, withLetters?: boolean, decimalPrecision?: number): string | -1;
1824
- declare function padNumber(value: number): string;
1825
- declare function round(num: number, cases: number): number;
1448
+ type RecordResponse = Record$1;
1826
1449
 
1827
1450
  interface GenericCountMessageResponse {
1828
1451
  count: number;
@@ -1837,56 +1460,30 @@ type TimeRangeFilter = {
1837
1460
  startDate: Date;
1838
1461
  endDate: Date;
1839
1462
  };
1840
- interface BasePlayerFilter {
1841
- country?: Country;
1842
- playerType?: PlayerType;
1843
- playerBuild?: PlayerBuild;
1844
- }
1845
- /**
1846
- * Groups Client Types
1847
- */
1848
- interface GroupMemberFragment {
1849
- username: string;
1850
- role?: GroupRole;
1851
- }
1852
1463
  interface CreateGroupPayload {
1853
1464
  name: string;
1854
1465
  clanChat?: string;
1855
1466
  homeworld?: number;
1856
1467
  description?: string;
1857
- members: Array<GroupMemberFragment>;
1468
+ members: Array<{
1469
+ username: string;
1470
+ role?: GroupRole;
1471
+ }>;
1858
1472
  }
1859
1473
  type EditGroupPayload = Partial<CreateGroupPayload> & {
1860
1474
  bannerImage?: string;
1861
1475
  profileImage?: string;
1862
- socialLinks?: Partial<GroupSocialLinks>;
1863
- roleOrders?: Array<GroupRoleOrder>;
1864
- };
1865
- interface CreateGroupResponse {
1866
- group: GroupDetails;
1867
- verificationCode: string;
1868
- }
1869
- type ChangeMemberRolePayload = Required<GroupMemberFragment>;
1870
- type GetGroupGainsFilter = {
1871
- metric: Metric;
1872
- } & TimeRangeFilter;
1873
- interface GroupRecordsFilter {
1874
- metric: Metric;
1875
- period: Period;
1876
- }
1877
- /**
1878
- * Competitions Client Types
1879
- */
1880
- interface CompetitionsSearchFilter {
1881
- title?: string;
1882
- metric?: Metric;
1883
- type?: CompetitionType;
1884
- status?: CompetitionStatus;
1885
- }
1886
- type CompetitionDetailsCSVParams = {
1887
- previewMetric?: Metric;
1888
- teamName?: string;
1889
- 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
+ }>;
1890
1487
  };
1891
1488
  type CreateCompetitionPayload = {
1892
1489
  title: string;
@@ -1898,7 +1495,7 @@ type CreateCompetitionPayload = {
1898
1495
  } & ({
1899
1496
  participants: string[];
1900
1497
  } | {
1901
- teams: Team[];
1498
+ teams: CompetitionTeam[];
1902
1499
  });
1903
1500
  type EditCompetitionPayload = {
1904
1501
  title?: string;
@@ -1906,76 +1503,88 @@ type EditCompetitionPayload = {
1906
1503
  startsAt?: Date;
1907
1504
  endsAt?: Date;
1908
1505
  participants?: string[];
1909
- teams?: Team[];
1910
- };
1911
- type CreateCompetitionResponse = {
1912
- competition: CompetitionWithParticipations;
1913
- verificationCode: string;
1914
- };
1915
- /**
1916
- * Name Changes Client Types
1917
- */
1918
- type NameChangesSearchFilter = {
1919
- username?: string;
1920
- status?: NameChangeStatus;
1506
+ teams?: CompetitionTeam[];
1921
1507
  };
1922
- /**
1923
- * Record Client Types
1924
- */
1925
- interface RecordLeaderboardFilter extends BasePlayerFilter {
1926
- metric: Metric;
1927
- period: Period;
1928
- }
1929
- /**
1930
- * Player Client Types
1931
- */
1932
- interface PlayerCompetitionsFilter {
1933
- status?: CompetitionStatus;
1934
- }
1935
- interface PlayerCompetitionStandingsFilter {
1936
- status: Exclude<CompetitionStatus, CompetitionStatus.UPCOMING>;
1937
- }
1938
- interface PlayerRecordsFilter {
1939
- period: Period | string;
1940
- metric: Metric;
1941
- }
1942
- interface AssertPlayerTypeResponse {
1943
- player: Player;
1944
- changed: boolean;
1945
- }
1946
- interface GetPlayerGainsResponse {
1947
- startsAt: Date;
1948
- endsAt: Date;
1949
- data: PlayerDeltasMap;
1950
- }
1951
- /**
1952
- * Efficiency Client Types
1953
- */
1954
- type EfficiencyAlgorithmTypeUnion = `${EfficiencyAlgorithmType}`;
1955
- interface EfficiencyLeaderboardsFilter extends BasePlayerFilter {
1956
- metric: typeof Metric.EHP | typeof Metric.EHB | 'ehp+ehb';
1957
- }
1958
- /**
1959
- * Delta Client Types
1960
- */
1961
- interface DeltaLeaderboardFilter extends BasePlayerFilter {
1962
- metric: Metric;
1963
- period: Period | string;
1508
+
1509
+ interface PaginationOptions {
1510
+ limit?: number;
1511
+ offset?: number;
1964
1512
  }
1965
1513
 
1966
- declare class BaseAPIClient {
1967
- private headers;
1968
- private baseUrl;
1969
- constructor(headers: object, baseUrl: string);
1970
- private buildParams;
1971
- private fetch;
1972
- private request;
1973
- private requestText;
1974
- postRequest<T>(path: string, body?: unknown): Promise<T>;
1975
- putRequest<T>(path: string, body?: unknown): Promise<T>;
1976
- deleteRequest<T>(path: string, body?: unknown): Promise<T>;
1977
- getRequest<T>(path: string, params?: unknown): Promise<T>;
1978
- 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>;
1979
1588
  }
1980
1589
 
1981
1590
  declare class DeltasClient extends BaseAPIClient {
@@ -1983,12 +1592,41 @@ declare class DeltasClient extends BaseAPIClient {
1983
1592
  * Fetches the current top leaderboard for a specific metric, period, playerType, playerBuild and country.
1984
1593
  * @returns A list of deltas, with their respective players, values and dates included.
1985
1594
  */
1986
- 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
+ }[]>;
1987
1607
  }
1988
1608
 
1989
- interface PaginationOptions {
1990
- limit?: number;
1991
- 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[]>;
1992
1630
  }
1993
1631
 
1994
1632
  declare class GroupsClient extends BaseAPIClient {
@@ -1996,22 +1634,25 @@ declare class GroupsClient extends BaseAPIClient {
1996
1634
  * Searches for groups that match a partial name.
1997
1635
  * @returns A list of groups.
1998
1636
  */
1999
- searchGroups(name: string, pagination?: PaginationOptions): Promise<GroupListItem[]>;
1637
+ searchGroups(name: string, pagination?: PaginationOptions): Promise<GroupResponse[]>;
2000
1638
  /**
2001
1639
  * Fetches a group's details, including a list of membership objects.
2002
1640
  * @returns A group details object.
2003
1641
  */
2004
- getGroupDetails(id: number): Promise<GroupDetails>;
1642
+ getGroupDetails(id: number): Promise<GroupDetailsResponse>;
2005
1643
  /**
2006
1644
  * Creates a new group.
2007
1645
  * @returns The newly created group, and the verification code that authorizes future changes to it.
2008
1646
  */
2009
- createGroup(payload: CreateGroupPayload): Promise<CreateGroupResponse>;
1647
+ createGroup(payload: CreateGroupPayload): Promise<{
1648
+ group: GroupDetailsResponse;
1649
+ verificationCode: string;
1650
+ }>;
2010
1651
  /**
2011
1652
  * Edits an existing group.
2012
1653
  * @returns The updated group.
2013
1654
  */
2014
- editGroup(id: number, payload: EditGroupPayload, verificationCode: string): Promise<GroupDetails>;
1655
+ editGroup(id: number, payload: EditGroupPayload, verificationCode: string): Promise<GroupDetailsResponse>;
2015
1656
  /**
2016
1657
  * Deletes an existing group.
2017
1658
  * @returns A confirmation message.
@@ -2021,7 +1662,10 @@ declare class GroupsClient extends BaseAPIClient {
2021
1662
  * Adds all (valid) given usernames (and roles) to a group, ignoring duplicates.
2022
1663
  * @returns The number of members added and a confirmation message.
2023
1664
  */
2024
- 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>;
2025
1669
  /**
2026
1670
  * Remove all given usernames from a group, ignoring usernames that aren't members.
2027
1671
  * @returns The number of members removed and a confirmation message.
@@ -2031,7 +1675,12 @@ declare class GroupsClient extends BaseAPIClient {
2031
1675
  * Changes a player's role in a given group.
2032
1676
  * @returns The updated membership, with player included.
2033
1677
  */
2034
- 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
+ }>;
2035
1684
  /**
2036
1685
  * Adds an "update" request to the queue, for each outdated group member.
2037
1686
  * @returns The number of players to be updated and a confirmation message.
@@ -2041,38 +1690,56 @@ declare class GroupsClient extends BaseAPIClient {
2041
1690
  * Fetches all of the groups's competitions
2042
1691
  * @returns A list of competitions.
2043
1692
  */
2044
- getGroupCompetitions(id: number, pagination?: PaginationOptions): Promise<CompetitionListItem[]>;
2045
- 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
+ }[]>;
2046
1702
  /**
2047
1703
  * Fetches a group members' latest achievements.
2048
1704
  * @returns A list of achievements.
2049
1705
  */
2050
- getGroupAchievements(id: number, pagination?: PaginationOptions): Promise<ExtendedAchievementWithPlayer[]>;
1706
+ getGroupAchievements(id: number, pagination?: PaginationOptions): Promise<(AchievementResponse & {
1707
+ player: PlayerResponse;
1708
+ })[]>;
2051
1709
  /**
2052
1710
  * Fetches a group's record leaderboard for a specific metric and period.
2053
1711
  * @returns A list of records, including their respective players.
2054
1712
  */
2055
- 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
+ })[]>;
2056
1719
  /**
2057
1720
  * Fetches a group's hiscores for a specific metric.
2058
1721
  * @returns A list of hiscores entries (value, rank), including their respective players.
2059
1722
  */
2060
- getGroupHiscores(id: number, metric: Metric, pagination?: PaginationOptions): Promise<GroupHiscoresEntry[]>;
1723
+ getGroupHiscores(id: number, metric: Metric, pagination?: PaginationOptions): Promise<GroupHiscoresEntryResponse[]>;
2061
1724
  /**
2062
1725
  * Fetches a group members' latest name changes.
2063
1726
  * @returns A list of name change (approved) requests.
2064
1727
  */
2065
- getGroupNameChanges(id: number, pagination?: PaginationOptions): Promise<NameChangeWithPlayer[]>;
1728
+ getGroupNameChanges(id: number, pagination?: PaginationOptions): Promise<NameChange & {
1729
+ player: PlayerResponse;
1730
+ }>;
2066
1731
  /**
2067
1732
  * Fetches a group's general statistics.
2068
1733
  * @returns An object with a few statistic values and an average stats snapshot.
2069
1734
  */
2070
- getGroupStatistics(id: number): Promise<GroupStatistics>;
1735
+ getGroupStatistics(id: number): Promise<GroupStatisticsResponse>;
2071
1736
  /**
2072
1737
  * Fetches a group's activity.
2073
1738
  * @returns A list of a group's (join, leave and role changed) activity.
2074
1739
  */
2075
- getGroupActivity(id: number, pagination?: PaginationOptions): Promise<MemberActivityWithPlayer[]>;
1740
+ getGroupActivity(id: number, pagination?: PaginationOptions): Promise<(MemberActivity & {
1741
+ player: PlayerResponse;
1742
+ })[]>;
2076
1743
  /**
2077
1744
  * Fetches the groups's member list in CSV format.
2078
1745
  * @returns A string containing the CSV content.
@@ -2080,72 +1747,106 @@ declare class GroupsClient extends BaseAPIClient {
2080
1747
  getMembersCSV(id: number): Promise<string>;
2081
1748
  }
2082
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
+
2083
1766
  declare class PlayersClient extends BaseAPIClient {
2084
1767
  /**
2085
1768
  * Searches players by partial username.
2086
1769
  * @returns A list of players.
2087
1770
  */
2088
- searchPlayers(partialUsername: string, pagination?: PaginationOptions): Promise<Player[]>;
1771
+ searchPlayers(partialUsername: string, pagination?: PaginationOptions): Promise<PlayerResponse[]>;
2089
1772
  /**
2090
1773
  * Updates/tracks a player.
2091
1774
  * @returns The player's new details, including the latest snapshot.
2092
1775
  */
2093
- updatePlayer(username: string): Promise<PlayerDetails>;
1776
+ updatePlayer(username: string): Promise<PlayerDetailsResponse>;
2094
1777
  /**
2095
1778
  * Asserts (and attempts to fix, if necessary) a player's game-mode type.
2096
1779
  * @returns The updated player, and an indication of whether the type was changed.
2097
1780
  */
2098
- assertPlayerType(username: string): Promise<AssertPlayerTypeResponse>;
1781
+ assertPlayerType(username: string): Promise<{
1782
+ player: PlayerResponse;
1783
+ changed: boolean;
1784
+ }>;
2099
1785
  /**
2100
1786
  * Fetches a player's details.
2101
1787
  * @returns The player's details, including the latest snapshot.
2102
1788
  */
2103
- getPlayerDetails(username: string): Promise<PlayerDetails>;
1789
+ getPlayerDetails(username: string): Promise<PlayerDetailsResponse>;
2104
1790
  /**
2105
1791
  * Fetches a player's details by ID.
2106
1792
  * @returns The player's details, including the latest snapshot.
2107
1793
  */
2108
- getPlayerDetailsById(id: number): Promise<PlayerDetails>;
1794
+ getPlayerDetailsById(id: number): Promise<PlayerDetailsResponse>;
2109
1795
  /**
2110
1796
  * Fetches a player's current achievements.
2111
1797
  * @returns A list of achievements.
2112
1798
  */
2113
- getPlayerAchievements(username: string): Promise<ExtendedAchievement[]>;
1799
+ getPlayerAchievements(username: string): Promise<AchievementResponse[]>;
2114
1800
  /**
2115
1801
  * Fetches a player's current achievement progress.
2116
1802
  * @returns A list of achievements (completed or otherwise), with their respective relative/absolute progress percentage.
2117
1803
  */
2118
- getPlayerAchievementProgress(username: string): Promise<AchievementProgress[]>;
1804
+ getPlayerAchievementProgress(username: string): Promise<AchievementProgressResponse[]>;
2119
1805
  /**
2120
1806
  * Fetches all of the player's competition participations.
2121
1807
  * @returns A list of participations, with the respective competition included.
2122
1808
  */
2123
- 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
+ })[]>;
2124
1814
  /**
2125
1815
  * Fetches all of the player's competition participations' standings.
2126
1816
  * @returns A list of participations, with the respective competition, rank and progress included.
2127
1817
  */
2128
- getPlayerCompetitionStandings(username: string, filter: PlayerCompetitionsFilter): Promise<ParticipationWithCompetitionAndStandings[]>;
1818
+ getPlayerCompetitionStandings(username: string, filter: {
1819
+ status?: CompetitionStatus;
1820
+ }): Promise<PlayerCompetitionStandingResponse[]>;
2129
1821
  /**
2130
1822
  * Fetches all of the player's group memberships.
2131
1823
  * @returns A list of memberships, with the respective group included.
2132
1824
  */
2133
- getPlayerGroups(username: string, pagination?: PaginationOptions): Promise<MembershipWithGroup[]>;
1825
+ getPlayerGroups(username: string, pagination?: PaginationOptions): Promise<(Membership & {
1826
+ player: PlayerResponse;
1827
+ })[]>;
2134
1828
  /**
2135
1829
  * Fetches a player's gains, for a specific period or time range, as a [metric: data] map.
2136
1830
  * @returns A map of each metric's gained data.
2137
1831
  */
2138
- 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
+ }>;
2139
1837
  /**
2140
1838
  * Fetches all of the player's records.
2141
1839
  * @returns A list of records.
2142
1840
  */
2143
- getPlayerRecords(username: string, options?: PlayerRecordsFilter): Promise<Record[]>;
1841
+ getPlayerRecords(username: string, options?: {
1842
+ period: Period | string;
1843
+ metric: Metric;
1844
+ }): Promise<Record$1[]>;
2144
1845
  /**
2145
1846
  * Fetches all of the player's past snapshots.
2146
1847
  * @returns A list of snapshots.
2147
1848
  */
2148
- getPlayerSnapshots(username: string, filter: TimeRangeFilter, pagination?: PaginationOptions): Promise<FormattedSnapshot[]>;
1849
+ getPlayerSnapshots(username: string, filter: TimeRangeFilter, pagination?: PaginationOptions): Promise<SnapshotResponse[]>;
2149
1850
  /**
2150
1851
  * Fetches all of the player's past snapshots' timeline.
2151
1852
  * @returns A list of timeseries data (value, rank, date)
@@ -2164,7 +1865,9 @@ declare class PlayersClient extends BaseAPIClient {
2164
1865
  * Fetches all of archived players that previously held this username.
2165
1866
  * @returns A list of player archives.
2166
1867
  */
2167
- getPlayerArchives(username: string): Promise<PlayerArchiveWithPlayer[]>;
1868
+ getPlayerArchives(username: string): Promise<(PlayerArchive & {
1869
+ player: PlayerResponse;
1870
+ })[]>;
2168
1871
  }
2169
1872
 
2170
1873
  declare class RecordsClient extends BaseAPIClient {
@@ -2172,118 +1875,1682 @@ declare class RecordsClient extends BaseAPIClient {
2172
1875
  * Fetches the current records leaderboard for a specific metric, period, playerType, playerBuild and country.
2173
1876
  * @returns A list of records, with their respective players, dates and values included.
2174
1877
  */
2175
- 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);
2176
1903
  }
2177
1904
 
2178
- declare class EfficiencyClient extends BaseAPIClient {
2179
- /**
2180
- * Fetches the current efficiency leaderboard for a specific efficiency metric, playerType, playerBuild and country.
2181
- * @returns A list of players.
2182
- */
2183
- getEfficiencyLeaderboards(filter: EfficiencyLeaderboardsFilter, pagination?: PaginationOptions): Promise<Player[]>;
2184
- /**
2185
- * Fetches the top EHP (Efficient Hours Played) rates.
2186
- * @returns A list of skilling methods and their bonus exp ratios.
2187
- */
2188
- getEHPRates(algorithmType: EfficiencyAlgorithmTypeUnion): Promise<SkillMetaConfig[]>;
2189
- /**
2190
- * Fetches the top EHB (Efficient Hours Bossed) rates.
2191
- * @returns A list of bosses and their respective "per-hour" kill rates.
2192
- */
2193
- getEHBRates(algorithmType: EfficiencyAlgorithmTypeUnion): Promise<BossMetaConfig[]>;
2194
- }
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";
2195
3534
 
2196
- declare class NameChangesClient extends BaseAPIClient {
2197
- /**
2198
- * Searches for name changes that match a name and/or status filter.
2199
- * @returns A list of name changes.
2200
- */
2201
- searchNameChanges(filter: NameChangesSearchFilter, pagination?: PaginationOptions): Promise<NameChange[]>;
2202
- /**
2203
- * Submits a name change request between two usernames (old and new).
2204
- * @returns A pending name change request, to be reviewed and resolved at a later date.
2205
- */
2206
- submitNameChange(oldName: string, newName: string): Promise<NameChange>;
2207
- }
3535
+ declare const PeriodProps: Record<Period, {
3536
+ name: string;
3537
+ milliseconds: number;
3538
+ }>;
3539
+ declare function isPeriod(periodString: string): periodString is Period;
2208
3540
 
2209
- declare class CompetitionsClient extends BaseAPIClient {
2210
- /**
2211
- * Searches for competitions that match a title, type, metric and status filter.
2212
- * @returns A list of competitions.
2213
- */
2214
- searchCompetitions(filter: CompetitionsSearchFilter, pagination?: PaginationOptions): Promise<CompetitionListItem[]>;
2215
- /**
2216
- * Fetches the competition's full details, including all the participants and their progress.
2217
- * @returns A competition with a list of participants.
2218
- */
2219
- getCompetitionDetails(id: number, previewMetric?: Metric): Promise<CompetitionDetails>;
2220
- /**
2221
- * Fetches the competition's participant list in CSV format.
2222
- * @returns A string containing the CSV content.
2223
- */
2224
- getCompetitionDetailsCSV(id: number, params?: CompetitionDetailsCSVParams): Promise<string>;
2225
- /**
2226
- * Fetches all the values (exp, kc, etc) in chronological order within the bounds
2227
- * of the competition, for the top 5 participants.
2228
- * @returns A list of competition progress objects, including the player and their value history over time.
2229
- */
2230
- getCompetitionTopHistory(id: number, previewMetric?: Metric): Promise<Top5ProgressResult>;
2231
- /**
2232
- * Creates a new competition.
2233
- * @returns The newly created competition, and the verification code that authorizes future changes to it.
2234
- */
2235
- createCompetition(payload: CreateCompetitionPayload): Promise<CreateCompetitionResponse>;
2236
- /**
2237
- * Edits an existing competition.
2238
- * @returns The updated competition.
2239
- */
2240
- editCompetition(id: number, payload: EditCompetitionPayload, verificationCode: string): Promise<CompetitionWithParticipations>;
2241
- /**
2242
- * Deletes an existing competition.
2243
- * @returns A confirmation message.
2244
- */
2245
- deleteCompetition(id: number, verificationCode: string): Promise<GenericMessageResponse>;
2246
- /**
2247
- * Adds all (valid) given participants to a competition, ignoring duplicates.
2248
- * @returns The number of participants added and a confirmation message.
2249
- */
2250
- addParticipants(id: number, participants: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
2251
- /**
2252
- * Remove all given usernames from a competition, ignoring usernames that aren't competing.
2253
- * @returns The number of participants removed and a confirmation message.
2254
- */
2255
- removeParticipants(id: number, participants: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
2256
- /**
2257
- * Adds all (valid) given teams to a team competition, ignoring duplicates.
2258
- * @returns The number of participants added and a confirmation message.
2259
- */
2260
- addTeams(id: number, teams: Team[], verificationCode: string): Promise<GenericCountMessageResponse>;
2261
- /**
2262
- * Remove all given team names from a competition, ignoring names that don't exist.
2263
- * @returns The number of participants removed and a confirmation message.
2264
- */
2265
- removeTeams(id: number, teamNames: string[], verificationCode: string): Promise<GenericCountMessageResponse>;
2266
- /**
2267
- * Adds an "update" request to the queue, for each outdated competition participant.
2268
- * @returns The number of players to be updated and a confirmation message.
2269
- */
2270
- updateAll(id: number, verificationCode: string): Promise<GenericCountMessageResponse>;
2271
- }
3541
+ declare const PlayerBuildProps: Record<PlayerBuild, {
3542
+ name: string;
3543
+ }>;
3544
+ declare function isPlayerBuild(buildString: string): buildString is PlayerBuild;
2272
3545
 
2273
- interface WOMClientOptions {
2274
- apiKey?: string;
2275
- userAgent?: string;
2276
- baseAPIUrl?: string;
2277
- }
2278
- declare class WOMClient extends BaseAPIClient {
2279
- deltas: DeltasClient;
2280
- groups: GroupsClient;
2281
- players: PlayersClient;
2282
- records: RecordsClient;
2283
- efficiency: EfficiencyClient;
2284
- nameChanges: NameChangesClient;
2285
- competitions: CompetitionsClient;
2286
- constructor(options?: WOMClientOptions);
2287
- }
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;
2288
3555
 
2289
- 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 };