-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathindex.ts
2244 lines (2073 loc) · 64.9 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { PlatformId } from "@fightmegg/riot-rate-limiter";
import { RedisOptions } from "ioredis";
export type Leaves<T> = T extends object
? {
[K in keyof T]: `${Exclude<K, symbol>}${Leaves<T[K]> extends never
? ""
: `.${Leaves<T[K]>}`}`;
}[keyof T]
: never;
export namespace RiotAPITypes {
export interface Config {
debug?: boolean;
cache?: {
cacheType: "local" | "ioredis";
client?: RedisOptions | string;
ttls?: {
byMethod: { [key: string]: number };
};
};
}
export interface RequestOptions {
id: string;
priority?: number;
expiration?: number;
params?: { [key: string]: string | number | number[] | undefined };
body?: object;
method?: "POST" | "GET" | "PUT";
headers?: { [key: string]: string };
}
export enum QUEUE {
RANKED_SOLO_5x5 = "RANKED_SOLO_5x5",
RANKED_TFT = "RANKED_TFT",
RANKED_FLEX_SR = "RANKED_FLEX_SR",
RANKED_FLEX_TT = "RANKED_FLEX_TT",
}
export enum TIER {
CHALLENGER = "CHALLENGER",
GRANDMASTER = "GRANDMASTER",
MASTER = "MASTER",
DIAMOND = "DIAMOND",
EMERALD = "EMERALD",
PLATINUM = "PLATINUM",
GOLD = "GOLD",
SILVER = "SILVER",
BRONZE = "BRONZE",
IRON = "IRON",
}
export enum TFT_TIER {
DIAMOND = "DIAMOND",
PLATINUM = "PLATINUM",
GOLD = "GOLD",
SILVER = "SILVER",
BRONZE = "BRONZE",
IRON = "IRON",
}
export enum DIVISION {
I = "I",
II = "II",
III = "III",
IV = "IV",
}
export enum VAL_QUEUE {
COMPETITIVE = "competitive",
UNRATED = "unrated",
SPIKERUSH = "spikerush",
TOURNAMENTMODE = "tournamentmode",
DEATHMATCH = "deathmatch",
ONEFA = "onefa",
GGTEAM = "ggteam",
}
export type VALCluster =
| PlatformId.AP
| PlatformId.BR
| PlatformId.EU
| PlatformId.KR
| PlatformId.LATAM
| PlatformId.NA
| PlatformId.ESPORTS;
export type LORCluster =
| PlatformId.AMERICAS
| PlatformId.ASIA
| PlatformId.EUROPE
| PlatformId.SEA
| PlatformId.APAC;
export type TFTCluster =
| PlatformId.AMERICAS
| PlatformId.ASIA
| PlatformId.EUROPE
| PlatformId.SEA;
export type Cluster =
| PlatformId.EUROPE
| PlatformId.AMERICAS
| PlatformId.ASIA
| PlatformId.SEA
| PlatformId.ESPORTS;
export type LoLRegion =
| PlatformId.BR1
| PlatformId.EUNE1
| PlatformId.EUW1
| PlatformId.JP1
| PlatformId.KR
| PlatformId.LA1
| PlatformId.LA2
| PlatformId.NA1
| PlatformId.OC1
| PlatformId.RU
| PlatformId.TR1
| PlatformId.PH2
| PlatformId.SG2
| PlatformId.TH2
| PlatformId.TW2
| PlatformId.VN2;
export namespace METHOD_KEY {
export namespace ACCOUNT {
export const GET_BY_PUUID = "ACCOUNT.GET_BY_PUUID";
export const GET_BY_RIOT_ID = "ACCOUNT.GET_BY_RIOT_ID";
export const GET_BY_ACCESS_TOKEN = "ACCOUNT.GET_BY_ACCESS_TOKEN";
export const GET_ACTIVE_SHARD_FOR_PLAYER =
"ACCOUNT.GET_ACTIVE_SHARD_FOR_PLAYER";
}
export namespace CHAMPION_MASTERY {
export const GET_ALL_CHAMPIONS = "CHAMPION_MASTERY.GET_ALL_CHAMPIONS";
export const GET_CHAMPION_MASTERY =
"CHAMPION_MASTERY.GET_CHAMPION_MASTERY";
export const GET_TOP_CHAMPIONS = "CHAMPION_MASTERY.GET_TOP_CHAMPIONS";
export const GET_CHAMPION_MASTERY_SCORE =
"CHAMPION_MASTERY.GET_CHAMPION_MASTERY_SCORE";
}
export namespace CHAMPION {
export const GET_CHAMPION_ROTATIONS = "CHAMPION.GET_CHAMPION_ROTATIONS";
}
export namespace CLASH {
export const GET_PLAYERS_BY_SUMMONER = "CLASH.GET_PLAYERS_BY_SUMMONER";
export const GET_TEAM = "CLASH.GET_TEAM";
export const GET_TOURNAMENTS = "CLASH.GET_TOURNAMENTS";
export const GET_TOURNAMENT = "CLASH.GET_TOURNAMENT";
export const GET_TOURNAMENT_TEAM = "CLASH.GET_TOURNAMENT_TEAM";
}
export namespace LEAGUE_EXP {
export const GET_LEAGUE_ENTRIES = "LEAGUE_EXP.GET_LEAGUE_ENTRIES";
}
export namespace LEAGUE {
export const GET_CHALLENGER_BY_QUEUE = "LEAGUE.GET_CHALLENGER_BY_QUEUE";
export const GET_ENTRIES_BY_SUMMONER = "LEAGUE.GET_ENTRIES_BY_SUMMONER";
export const GET_ALL_ENTRIES = "LEAGUE.GET_ALL_ENTRIES";
export const GET_GRANDMASTER_BY_QUEUE = "LEAGUE.GET_GRANDMASTER_BY_QUEUE";
export const GET_LEAGUE_BY_ID = "LEAGUE.GET_LEAGUE_BY_ID";
export const GET_MASTER_BY_QUEUE = "LEAGUE.GET_MASTER_BY_QUEUE";
}
export namespace LOL_CHALLENGES {
export const GET_CONFIG = "LOL_CHALLENGES.GET_CONFIG";
export const GET_PERCENTILES = "LOL_CHALLENGES.GET_PERCENTILES";
export const GET_CONFIG_BY_ID = "LOL_CHALLENGES.GET_CONFIG_BY_ID";
export const GET_LEADERBOARD_BY_ID =
"LOL_CHALLENGES.GET_LEADERBOARD_BY_ID";
export const GET_PERCENTILES_BY_ID =
"LOL_CHALLENGES.GET_PERCENTILES_BY_ID";
export const GET_PLAYER_DATA_BY_PUUID =
"LOL_CHALLENGES.GET_PLAYER_DATA_BY_PUUID";
}
export namespace LOL_STATUS {
export const GET_PLATFORM_DATA = "LOL_STATUS.GET_PLATFORM_DATA";
}
export namespace LOR_DECK {
export const GET_DECKS_FOR_PLAYER = "LOR_DECK.GET_DECKS_FOR_PLAYER";
export const POST_CREATE_DECK_FOR_PLAYER =
"LOR_DECK.POST_CREATE_DECK_FOR_PLAYER";
}
export namespace LOR_INVENTORY {
export const GET_CARDS_OWNED_BY_PLAYER =
"LOR_INVENTORY.GET_CARDS_OWNED_BY_PLAYER";
}
export namespace LOR_MATCH {
export const GET_MATCH_IDS_BY_PUUID = "LOR_MATCH.GET_MATCH_IDS_BY_PUUID";
export const GET_MATCH_BY_ID = "LOR_MATCH.GET_MATCH_BY_ID";
}
export namespace LOR_RANKED {
export const GET_MASTER_TIER = "LOR_RANKED.GET_MASTER_TIER";
}
export namespace LOR_STATUS_V1 {
export const GET_PLATFORM_DATA = "LOR_STATUS_V1.GET_PLATFORM_DATA";
}
export namespace MATCH_V5 {
export const GET_IDS_BY_PUUID = "MATCH_V5.GET_IDS_BY_PUUID";
export const GET_MATCH_BY_ID = "MATCH_V5.GET_MATCH_BY_ID";
export const GET_MATCH_TIMELINE_BY_ID =
"MATCH_V5.GET_MATCH_TIMELINE_BY_ID";
}
export namespace SPECTATOR_TFT_V5 {
export const GET_GAME_BY_PUUID = "SPECTATOR_TFT_V5.GET_GAME_BY_PUUID";
export const GET_FEATURED_GAMES = "SPECTATOR_TFT_V5.GET_FEATURED_GAMES";
}
export namespace SPECTATOR {
export const GET_GAME_BY_SUMMONER_ID =
"SPECTATOR.GET_GAME_BY_SUMMONER_ID";
export const GET_FEATURED_GAMES = "SPECTATOR.GET_FEATURED_GAMES";
}
export namespace SUMMONER {
export const GET_BY_RSO_PUUID = "SUMMONER.GET_BY_RSO_PUUID";
export const GET_BY_ACCOUNT_ID = "SUMMONER.GET_BY_ACCOUNT_ID";
export const GET_BY_PUUID = "SUMMONER.GET_BY_PUUID";
export const GET_BY_SUMMONER_ID = "SUMMONER.GET_BY_SUMMONER_ID";
export const GET_BY_ACCESS_TOKEN = "SUMMONER.GET_BY_ACCESS_TOKEN";
}
export namespace TFT_LEAGUE {
export const GET_CHALLENGER = "TFT_LEAGUE.GET_CHALLENGER";
export const GET_ENTRIES_BY_SUMMONER =
"TFT_LEAGUE.GET_ENTRIES_BY_SUMMONER";
export const GET_ALL_ENTRIES = "TFT_LEAGUE.GET_ALL_ENTRIES";
export const GET_GRANDMASTER = "TFT_LEAGUE.GET_GRANDMASTER";
export const GET_LEAGUE_BY_ID = "TFT_LEAGUE.GET_LEAGUE_BY_ID";
export const GET_MASTER = "TFT_LEAGUE.GET_MASTER";
export const GET_TOP_RATED_LADDER_BY_QUEUE =
"TFT_LEAGUE.GET_TOP_RATED_LADDER_BY_QUEUE";
}
export namespace TFT_MATCH {
export const GET_MATCH_IDS_BY_PUUID = "TFT_MATCH.GET_MATCH_IDS_BY_PUUID";
export const GET_MATCH_BY_ID = "TFT_MATCH.GET_MATCH_BY_ID";
}
export namespace TFT_STATUS_V1 {
export const GET_PLATFORM_DATA = "TFT_STATUS_V1.GET_PLATFORM_DATA";
}
export namespace TFT_SUMMONER {
export const GET_BY_ACCOUNT_ID = "TFT_SUMMONER.GET_BY_ACCOUNT_ID";
export const GET_BY_ACCESS_TOKEN = "TFT_SUMMONER.GET_BY_ACCESS_TOKEN";
export const GET_BY_PUUID = "TFT_SUMMONER.GET_BY_PUUID";
export const GET_BY_SUMMONER_ID = "TFT_SUMMONER.GET_BY_SUMMONER_ID";
}
export namespace TOURNAMENT_STUB_V5 {
export const POST_CREATE_CODES = "TOURNAMENT_STUB_V5.POST_CREATE_CODES";
export const GET_TOURNAMENT_BY_CODE =
"TOURNAMENT_STUB_V5.GET_TOURNAMENT_BY_CODE";
export const GET_LOBBY_EVENTS_BY_TOURNAMENT_CODE =
"TOURNAMENT_STUB_V5.GET_LOBBY_EVENTS_BY_TOURNAMENT_CODE";
export const POST_CREATE_PROVIDER =
"TOURNAMENT_STUB_V5.POST_CREATE_PROVIDER";
export const POST_CREATE_TOURNAMENT =
"TOURNAMENT_STUB_V5.POST_CREATE_TOURNAMENT";
}
export namespace TOURNAMENT_V5 {
export const POST_CREATE_CODES = "TOURNAMENT_V5.POST_CREATE_CODES";
export const GET_TOURNAMENT_BY_CODE =
"TOURNAMENT_V5.GET_TOURNAMENT_BY_CODE";
export const PUT_TOURNAMENT_CODE = "TOURNAMENT_V5.PUT_TOURNAMENT_CODE";
export const GET_TOURNAMENT_GAME_DETAILS =
"TOURNAMENT_V5.GET_TOURNAMENT_GAME_DETAILS";
export const GET_LOBBY_EVENTS_BY_TOURNAMENT_CODE =
"TOURNAMENT_V5.GET_LOBBY_EVENTS_BY_TOURNAMENT_CODE";
export const POST_CREATE_PROVIDER = "TOURNAMENT_V5.POST_CREATE_PROVIDER";
export const POST_CREATE_TOURNAMENT =
"TOURNAMENT_V5.POST_CREATE_TOURNAMENT";
}
export namespace VAL_CONTENT {
export const GET_CONTENT = "VAL_CONTENT.GET_CONTENT";
}
export namespace VAL_MATCH {
export const GET_MATCH_BY_ID = "VAL_MATCH.GET_MATCH_BY_ID";
export const GET_MATCHLIST_BY_PUUID = "VAL_MATCH.GET_MATCHLIST_BY_PUUID";
export const GET_RECENT_MATCHES_BY_QUEUE =
"VAL_MATCH.GET_RECENT_MATCHES_BY_QUEUE";
}
export namespace VAL_RANKED {
export const GET_LEADERBOARD_BY_QUEUE =
"VAL_RANKED.GET_LEADERBOARD_BY_QUEUE";
}
export namespace VAL_STATUS_V1 {
export const GET_PLATFORM_DATA = "VAL_STATUS_V1.GET_PLATFORM_DATA";
}
}
export namespace Account {
export interface AccountDTO {
puuid: string;
gameName?: string;
tagLine?: string;
}
export interface ActiveShardDTO {
puuid: string;
game: string;
activeShard: string;
}
}
export namespace ChampionMastery {
export interface ChampionMasteryDTO {
championPointsUntilNextLevel: number;
chestGranted: boolean;
championId: number;
lastPlayTime: number;
championLevel: number;
summonerId: string;
championPoints: number;
championPointsSinceLastLevel: number;
tokensEarned: number;
}
}
export namespace Champion {
export interface ChampionInfoDTO {
maxNewPlayerLevel: number;
freeChampionIdsForNewPlayers: number[];
freeChampionIds: number[];
}
}
export namespace Clash {
export interface PlayerDTO {
summonerId: string;
teamId: string;
position:
| "UNSELECTED"
| "FILL"
| "TOP"
| "JUNGLE"
| "MIDDLE"
| "BOTTOM"
| "UTILITY";
role: "CAPTAIN" | "MEMBER";
}
export interface TeamDTO {
id: string;
tournamentId: number;
name: string;
iconId: number;
tier: number;
captain: string; // SummonerId of Captain
abbreviation: string;
players: Clash.PlayerDTO[] /** Team members. */;
}
export interface TournamentPhaseDTO {
id: number;
registrationTime: number;
startTime: number;
cancelled: boolean;
}
export interface TournamentDTO {
id: number;
themeId: number;
nameKey: string;
nameKeySecondary: string;
schedule: Clash.TournamentPhaseDTO[];
}
}
export namespace League {
export interface MiniSeriesDTO {
losses: number;
progress: string;
target: number;
wins: number;
}
export interface LeagueEntryDTO {
leagueId: string;
summonerId: string;
queueType: string;
tier: string;
rank: string;
leaguePoints: number;
wins: number;
losses: number;
hotStreak: boolean;
veteran: boolean;
freshBlood: boolean;
inactive: boolean;
miniSeries?: League.MiniSeriesDTO | null;
}
export interface LeagueItemDTO {
freshBlood: boolean;
wins: number;
miniSeries?: League.MiniSeriesDTO | null;
inactive: boolean;
veteran: boolean;
hotStreak: boolean;
rank: string;
leaguePoints: number;
losses: number;
summonerId: string;
}
export interface LeagueListDTO {
leagueId: string;
entries: League.LeagueItemDTO[];
tier: string;
name: string;
queue: string;
}
}
export namespace LolChallenges {
export enum lolChallengeState {
DISABLED = "DISABLED", // Not visible and not calculated
HIDDEN = "HIDDEN", // visible but calculated
ENABLED = "ENABLED", // visible and calculated
ARCHIVED = "ARCHIVED", // visible, but not calculated
}
export enum lolChallengeTracking {
LIFETIME = "LIFETIME", // stats are incremented without reset
SEASON = "SEASON", // stats are accumulated by season and reset at the beginning of new season
}
export enum lolChallengeCategory {
VETERANCY = "VETERANCY",
IMAGINATION = "IMAGINATION",
COLLECTION = "COLLECTION",
EXPERTISE = "EXPERTISE",
TEAMWORK = "TEAMWORK",
}
export interface ChallengePoints {
level: TIER;
current: number;
max: number;
percentile: number;
}
export interface ChallengeInfo {
challengeId: number;
percentile: number;
level: TIER;
value: number;
achievedTime: number;
}
export interface PlayerClientPreferences {
bannerAccent: string;
title: string;
challengeIds: number[];
crestBorder: string;
prestigeCrestBorderLevel: number;
}
export interface ChallengeConfigInfoDTO {
id: number;
localizedNames: Record<string, Record<string, string>>;
state: lolChallengeState;
tracking: lolChallengeTracking;
startTimestamp: number;
endTimestamp: number;
leaderboard: boolean;
thresholds: Record<string, number>;
}
export type ChallengePercentiles = Record<TIER, number>;
export type ChallengePercentilesMap = Record<number, ChallengePercentiles>;
export interface ApexPlayerInfoDTO {
puuid: string;
value: number;
position: number;
}
export interface PlayerInfoDTO {
totalPoints: ChallengePoints;
categoryPoints: Record<lolChallengeCategory, ChallengePoints>;
challenges: ChallengeInfo[];
preferences: PlayerClientPreferences;
}
}
export namespace LolStatus {
export interface PlatformDataDTO {
id: string;
name: string;
locales: string[];
maintenances: LolStatus.StatusDTO[];
incidents: LolStatus.StatusDTO[];
}
export interface StatusDTO {
id: number;
maintenance_status: "scheduled" | "in_progress" | "complete";
incident_severity: "info" | "warning" | "critical";
titles: LolStatus.ContentDTO[];
updates: LolStatus.UpdateDTO[];
created_at: string;
archive_at: string;
updated_at: string;
platforms: (
| "windows"
| "macos"
| "android"
| "ios"
| "ps4"
| "xbone"
| "switch"
)[];
}
export interface ContentDTO {
locale: string;
content: string;
}
export interface UpdateDTO {
id: number;
author: string;
publish: boolean;
publish_locations: ("riotclient" | "riotstatus" | "game")[];
translations: LolStatus.ContentDTO[];
created_at: string;
updated_at: string;
}
}
export namespace LorDeck {
export interface DeckDTO {
id: string;
name: string;
code: string;
}
export interface NewDeckDTO {
name: string;
code: string;
}
}
export namespace LorInventory {
export interface CardDTO {
code: string;
count: string;
}
}
export namespace LorMatch {
export interface PlayerDTO {
puuid: string;
deck_id: string;
deck_code: string;
factions: string[];
game_outcome: string;
order_of_play: number;
}
export interface MatchDTO {
metadata: {
data_version: string;
match_id: string;
participants: string[];
};
info: {
game_mode: "Constructed" | "Expeditions" | "Tutorial";
game_type:
| "Ranked"
| "Normal"
| "AI"
| "Tutorial"
| "Singleton"
| "StandardGauntlet";
game_start_time_utc: string;
game_version: string;
players: LorMatch.PlayerDTO[];
total_turn_count: number;
};
}
}
export namespace LorRanked {
export interface PlayerDTO {
name: string;
rank: number;
lp: number;
}
export interface LeaderboardDTO {
/** A list of players in Master tier. */
players: LorRanked.PlayerDTO[];
}
}
export namespace MatchV5 {
export enum MatchType {
Ranked = "ranked",
Normal = "normal",
Tourney = "tourney",
Tutorial = "tutorial",
}
export interface StatPerksDTO {
defense: number;
flex: number;
offense: number;
}
export interface SelectionDTO {
perk: number;
var1: number;
var2: number;
var3: number;
}
export interface StyleDTO {
description: string;
selections: SelectionDTO[];
style: number;
}
export interface PerksDTO {
statPerks: StatPerksDTO;
styles: StyleDTO[];
}
export interface ChallengesDTO {
"12AssistStreakCount": number;
abilityUses: number;
acesBefore15Minutes: number;
alliedJungleMonsterKills: number;
baronBuffGoldAdvantageOverThreshold: number;
baronTakedowns: number;
blastConeOppositeOpponentCount: number;
bountyGold: number;
buffsStolen: number;
completeSupportQuestInTime: number;
controlWardTimeCoverageInRiverOrEnemyHalf: number;
controlWardsPlaced: number;
damagePerMinute: number;
damageTakenOnTeamPercentage: number;
dancedWithRiftHerald: number;
deathsByEnemyChamps: number;
dodgeSkillShotsSmallWindow: number;
doubleAces: number;
dragonTakedowns: number;
earliestBaron: number;
earlyLaningPhaseGoldExpAdvantage: number;
effectiveHealAndShielding: number;
elderDragonKillsWithOpposingSoul: number;
elderDragonMultikills: number;
enemyChampionImmobilizations: number;
enemyJungleMonsterKills: number;
epicMonsterKillsNearEnemyJungler: number;
epicMonsterKillsWithin30SecondsOfSpawn: number;
epicMonsterSteals: number;
epicMonsterStolenWithoutSmite: number;
firstTurretKilled: number;
firstTurretKilledTime: number;
flawlessAces: number;
fullTeamTakedown: number;
gameLength: number;
getTakedownsInAllLanesEarlyJungleAsLaner: number;
goldPerMinute: number;
hadOpenNexus: number;
immobilizeAndKillWithAlly: number;
initialBuffCount: number;
initialCrabCount: number;
jungleCsBefore10Minutes: number;
junglerTakedownsNearDamagedEpicMonster: number;
kTurretsDestroyedBeforePlatesFall: number;
kda: number;
killAfterHiddenWithAlly: number;
killParticipation: number;
killedChampTookFullTeamDamageSurvived: number;
killingSprees: number;
killsNearEnemyTurret: number;
killsOnOtherLanesEarlyJungleAsLaner: number;
killsOnRecentlyHealedByAramPack: number;
killsUnderOwnTurret: number;
killsWithHelpFromEpicMonster: number;
knockEnemyIntoTeamAndKill: number;
landSkillShotsEarlyGame: number;
laneMinionsFirst10Minutes: number;
laningPhaseGoldExpAdvantage: number;
legendaryCount: number;
legendaryItemUsed: number[];
lostAnInhibitor: number;
maxCsAdvantageOnLaneOpponent: number;
maxKillDeficit: number;
maxLevelLeadLaneOpponent: number;
mejaisFullStackInTime: number;
moreEnemyJungleThanOpponent: number;
multiKillOneSpell: number;
multiTurretRiftHeraldCount: number;
multikills: number;
multikillsAfterAggressiveFlash: number;
outerTurretExecutesBefore10Minutes: number;
outnumberedKills: number;
outnumberedNexusKill: number;
perfectDragonSoulsTaken: number;
perfectGame: number;
pickKillWithAlly: number;
playedChampSelectPosition: number;
poroExplosions: number;
quickCleanse: number;
quickFirstTurret: number;
quickSoloKills: number;
riftHeraldTakedowns: number;
saveAllyFromDeath: number;
scuttleCrabKills: number;
skillshotsDodged: number;
skillshotsHit: number;
snowballsHit: number;
soloBaronKills: number;
soloKills: number;
soloTurretsLategame: number;
stealthWardsPlaced: number;
survivedSingleDigitHpCount: number;
survivedThreeImmobilizesInFight: number;
takedownOnFirstTurret: number;
takedowns: number;
takedownsAfterGainingLevelAdvantage: number;
takedownsBeforeJungleMinionSpawn: number;
takedownsFirstXMinutes: number;
takedownsInAlcove: number;
takedownsInEnemyFountain: number;
teamBaronKills: number;
teamDamagePercentage: number;
teamElderDragonKills: number;
teamRiftHeraldKills: number;
tookLargeDamageSurvived: number;
turretPlatesTaken: number;
turretTakedowns: number;
turretsTakenWithRiftHerald: number;
twentyMinionsIn3SecondsCount: number;
twoWardsOneSweeperCount: number;
unseenRecalls: number;
visionScoreAdvantageLaneOpponent: number;
visionScorePerMinute: number;
wardTakedowns: number;
wardTakedownsBefore20M: number;
wardsGuarded: number;
}
export interface ParticipantDTO {
assists: number;
baronKills: number;
bountyLevel: number;
challenges: ChallengesDTO;
champExperience: number;
champLevel: number;
championId: number;
championName: string;
championTransform: number;
consumablesPurchased: number;
damageDealtToBuildings: number;
damageDealtToObjectives: number;
damageDealtToTurrets: number;
damageSelfMitigated: number;
deaths: number;
detectorWardsPlaced: number;
doubleKills: number;
dragonKills: number;
firstBloodAssist: boolean;
firstBloodKill: boolean;
firstTowerAssist: boolean;
firstTowerKill: boolean;
gameEndedInEarlySurrender: boolean;
gameEndedInSurrender: boolean;
goldEarned: number;
goldSpent: number;
individualPosition: string;
inhibitorKills: number;
inhibitorTakedowns: number;
inhibitorsLost: number;
item0: number;
item1: number;
item2: number;
item3: number;
item4: number;
item5: number;
item6: number;
itemsPurchased: number;
killingSprees: number;
kills: number;
lane: string;
largestCriticalStrike: number;
largestKillingSpree: number;
largestMultiKill: number;
longestTimeSpentLiving: number;
magicDamageDealt: number;
magicDamageDealtToChampions: number;
magicDamageTaken: number;
neutralMinionsKilled: number;
nexusKills: number;
nexusLost: number;
nexusTakedowns: number;
objectivesStolen: number;
objectivesStolenAssists: number;
participantId: number;
pentaKills: number;
perks: PerksDTO;
physicalDamageDealt: number;
physicalDamageDealtToChampions: number;
physicalDamageTaken: number;
profileIcon: number;
puuid: string;
quadraKills: number;
riotIdName: string;
riotIdTagline: string;
role: string;
sightWardsBoughtInGame: number;
spell1Casts: number;
spell2Casts: number;
spell3Casts: number;
spell4Casts: number;
summoner1Casts: number;
summoner1Id: number;
summoner2Casts: number;
summoner2Id: number;
summonerId: string;
summonerLevel: number;
summonerName: string;
teamEarlySurrendered: boolean;
teamId: number;
teamPosition: string;
timeCCingOthers: number;
timePlayed: number;
totalDamageDealt: number;
totalDamageDealtToChampions: number;
totalDamageShieldedOnTeammates: number;
totalDamageTaken: number;
totalHeal: number;
totalHealsOnTeammates: number;
totalMinionsKilled: number;
totalTimeCCDealt: number;
totalTimeSpentDead: number;
totalUnitsHealed: number;
tripleKills: number;
trueDamageDealt: number;
trueDamageDealtToChampions: number;
trueDamageTaken: number;
turretKills: number;
turretTakedowns: number;
turretsLost: number;
unrealKills: number;
visionScore: number;
visionWardsBoughtInGame: number;
wardsKilled: number;
wardsPlaced: number;
win: boolean;
}
export interface ObjectivesStatsDTO {
first: boolean;
kills: number;
}
export interface ObjectivesDTO {
baron: ObjectivesStatsDTO;
champion: ObjectivesStatsDTO;
dragon: ObjectivesStatsDTO;
inhibitor: ObjectivesStatsDTO;
riftHerald: ObjectivesStatsDTO;
tower: ObjectivesStatsDTO;
}
export interface BanDTO {
championId: number;
pickTurn: number;
}
export interface TeamDTO {
bans: BanDTO[];
objectives: ObjectivesDTO;
teamId: number;
win: boolean;
}
export interface MatchInfoDTO {
endOfGameResult: string;
gameCreation: number;
gameDuration: number;
gameId: number;
gameMode: string;
gameName: string;
gameEndTimestamp: number;
gameStartTimestamp: number;
gameType: string;
gameVersion: string;
mapId: number;
participants: ParticipantDTO[];
platformId: string;
queueId: number;
teams: TeamDTO[];
tournamentCode: string;
}
export interface MetadataDTO {
dataVersion: string;
matchId: string;
participants: string[];
}
export interface MatchDTO {
metadata: MetadataDTO;
info: MatchInfoDTO;
}
export interface MatchTimelineParticipantDTO {
participantId: number;
puuid: string;
}
export interface PositionDTO {
x: number;
y: number;
}
export interface ParticipantFrameDTO {
championStats: { [key: string]: number };
currentGold: number;
damageStats: { [key: string]: number };
goldPerSecond: number;
jungleMinionsKilled: number;
level: number;
minionsKilled: number;
participantId: number;
position: PositionDTO;
timeEnemySpentControlled: number;
totalGold: number;
xp: number;
}
export interface VictimDamageDTO {
basic: boolean;
magicDamage: number;
name: string;
participantId: number;
physicalDamage: number;
spellName: string;
spellSlot: number;
trueDamage: number;
type: string;
}
export interface EventDTO {
realTimestamp?: number;
timestamp: number;
type: string;
itemId?: number;
participantId?: number;
levelUpType?: string;
skillSlot?: number;
creatorId?: number;
wardType?: string;
level?: number;
bounty?: number;
killStreakLength?: number;
killerId?: number;
position?: PositionDTO;
victimDamageDealt?: string[];
victimDamageReceived?: string[];
victimId?: number;
killType?: string;
afterId?: number;
beforeId?: number;
goldGain?: number;
assistingParticipantIds?: number[];
laneType?: string;
teamId?: number;
killerTeamId?: number;
monsterSubType?: string;
monsterType?: string;
buildingType?: string;
towerType?: string;
transformType?: string;
multiKillLength?: number;
gameId?: number;
winningTeam?: number;
}
export interface FrameDTO {
events: EventDTO[];
participantFrames: { [key: string]: ParticipantFrameDTO };
timestamp: number;
}