@rotesblatt/api-client 1.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/README.md +349 -0
- package/dist/api.d.ts +2306 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +862 -0
- package/generated/typescript/api.ts +1368 -0
- package/package.json +42 -0
|
@@ -0,0 +1,1368 @@
|
|
|
1
|
+
import { makeApi, Zodios, type ZodiosOptions } from "@zodios/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
type LeagueDetails = {
|
|
5
|
+
queueType: string;
|
|
6
|
+
tier: string;
|
|
7
|
+
division: string;
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
lastUpdated: string;
|
|
10
|
+
entries: Array<league_v4_LeagueItemDTO>;
|
|
11
|
+
};
|
|
12
|
+
type league_v4_LeagueItemDTO = {
|
|
13
|
+
freshBlood: boolean;
|
|
14
|
+
wins: number;
|
|
15
|
+
miniSeries?: league_v4_MiniSeriesDTO | undefined;
|
|
16
|
+
inactive: boolean;
|
|
17
|
+
veteran: boolean;
|
|
18
|
+
hotStreak: boolean;
|
|
19
|
+
rank?: string | undefined;
|
|
20
|
+
leaguePoints: number;
|
|
21
|
+
losses: number;
|
|
22
|
+
puuid: string;
|
|
23
|
+
summonerId?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
type league_v4_MiniSeriesDTO = {
|
|
26
|
+
losses: number;
|
|
27
|
+
progress: string;
|
|
28
|
+
target: number;
|
|
29
|
+
wins: number;
|
|
30
|
+
};
|
|
31
|
+
type AccountInfo = {
|
|
32
|
+
generalInfo: {
|
|
33
|
+
puuid: string;
|
|
34
|
+
summonerName: string;
|
|
35
|
+
tagLine: string;
|
|
36
|
+
profileIconId: number;
|
|
37
|
+
revisionDate: number;
|
|
38
|
+
summonerLevel: number;
|
|
39
|
+
lastUpdated: string;
|
|
40
|
+
};
|
|
41
|
+
leagueEntries: Array<league_v4_LeagueEntryDTO>;
|
|
42
|
+
currentGame: spectator_v5_CurrentGameInfo | null;
|
|
43
|
+
};
|
|
44
|
+
type league_v4_LeagueEntryDTO = {
|
|
45
|
+
leagueId?: string | undefined;
|
|
46
|
+
puuid: string;
|
|
47
|
+
queueType: string;
|
|
48
|
+
tier?: string | undefined;
|
|
49
|
+
rank?: string | undefined;
|
|
50
|
+
leaguePoints: number;
|
|
51
|
+
wins: number;
|
|
52
|
+
losses: number;
|
|
53
|
+
hotStreak: boolean;
|
|
54
|
+
veteran: boolean;
|
|
55
|
+
freshBlood: boolean;
|
|
56
|
+
inactive: boolean;
|
|
57
|
+
miniSeries?: league_v4_MiniSeriesDTO | undefined;
|
|
58
|
+
summonerId?: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
type spectator_v5_CurrentGameInfo = {
|
|
61
|
+
gameId: number;
|
|
62
|
+
gameType: string;
|
|
63
|
+
gameStartTime: number;
|
|
64
|
+
mapId: number;
|
|
65
|
+
gameLength: number;
|
|
66
|
+
platformId: string;
|
|
67
|
+
gameMode: string;
|
|
68
|
+
bannedChampions: Array<spectator_v5_BannedChampion>;
|
|
69
|
+
gameQueueConfigId?: number | undefined;
|
|
70
|
+
observers: spectator_v5_Observer;
|
|
71
|
+
participants: Array<spectator_v5_CurrentGameParticipant>;
|
|
72
|
+
};
|
|
73
|
+
type spectator_v5_BannedChampion = {
|
|
74
|
+
pickTurn: number;
|
|
75
|
+
championId: number;
|
|
76
|
+
teamId: number;
|
|
77
|
+
};
|
|
78
|
+
type spectator_v5_Observer = {
|
|
79
|
+
encryptionKey: string;
|
|
80
|
+
};
|
|
81
|
+
type spectator_v5_CurrentGameParticipant = {
|
|
82
|
+
championId: number;
|
|
83
|
+
perks?: spectator_v5_Perks | undefined;
|
|
84
|
+
profileIconId: number;
|
|
85
|
+
bot: boolean;
|
|
86
|
+
teamId: number;
|
|
87
|
+
puuid: string | null;
|
|
88
|
+
spell1Id: number;
|
|
89
|
+
spell2Id: number;
|
|
90
|
+
gameCustomizationObjects: Array<spectator_v5_GameCustomizationObject>;
|
|
91
|
+
riotId?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
type spectator_v5_Perks = {
|
|
94
|
+
perkIds: Array<number>;
|
|
95
|
+
perkStyle: number;
|
|
96
|
+
perkSubStyle: number;
|
|
97
|
+
};
|
|
98
|
+
type spectator_v5_GameCustomizationObject = {
|
|
99
|
+
category: string;
|
|
100
|
+
content: string;
|
|
101
|
+
};
|
|
102
|
+
type league_v4_LeagueListDTO = {
|
|
103
|
+
leagueId?: string | undefined;
|
|
104
|
+
entries: Array<league_v4_LeagueItemDTO>;
|
|
105
|
+
tier: string;
|
|
106
|
+
name?: string | undefined;
|
|
107
|
+
queue: string;
|
|
108
|
+
};
|
|
109
|
+
type match_v5_MatchDto = {
|
|
110
|
+
metadata: match_v5_MetadataDto;
|
|
111
|
+
info: match_v5_InfoDto;
|
|
112
|
+
};
|
|
113
|
+
type match_v5_MetadataDto = {
|
|
114
|
+
dataVersion: string;
|
|
115
|
+
matchId: string;
|
|
116
|
+
participants: Array<string>;
|
|
117
|
+
};
|
|
118
|
+
type match_v5_InfoDto = {
|
|
119
|
+
endOfGameResult?: string | undefined;
|
|
120
|
+
gameCreation: number;
|
|
121
|
+
gameDuration: number;
|
|
122
|
+
gameEndTimestamp?: number | undefined;
|
|
123
|
+
gameId: number;
|
|
124
|
+
gameMode: string;
|
|
125
|
+
gameName: string;
|
|
126
|
+
gameStartTimestamp: number;
|
|
127
|
+
gameType: string;
|
|
128
|
+
gameVersion: string;
|
|
129
|
+
mapId: number;
|
|
130
|
+
participants: Array<match_v5_ParticipantDto>;
|
|
131
|
+
platformId: string;
|
|
132
|
+
queueId: number;
|
|
133
|
+
teams: Array<match_v5_TeamDto>;
|
|
134
|
+
tournamentCode?: string | undefined;
|
|
135
|
+
gameModeMutators?: Array<string> | undefined;
|
|
136
|
+
};
|
|
137
|
+
type match_v5_ParticipantDto = {
|
|
138
|
+
allInPings?: number | undefined;
|
|
139
|
+
assistMePings?: number | undefined;
|
|
140
|
+
assists: number;
|
|
141
|
+
baronKills: number;
|
|
142
|
+
bountyLevel?: number | undefined;
|
|
143
|
+
champExperience: number;
|
|
144
|
+
champLevel: number;
|
|
145
|
+
championId: number;
|
|
146
|
+
championName: string;
|
|
147
|
+
commandPings?: number | undefined;
|
|
148
|
+
championTransform: number;
|
|
149
|
+
consumablesPurchased: number;
|
|
150
|
+
challenges?: match_v5_ChallengesDto | undefined;
|
|
151
|
+
damageDealtToBuildings?: number | undefined;
|
|
152
|
+
damageDealtToObjectives: number;
|
|
153
|
+
damageDealtToTurrets: number;
|
|
154
|
+
damageSelfMitigated: number;
|
|
155
|
+
deaths: number;
|
|
156
|
+
detectorWardsPlaced: number;
|
|
157
|
+
doubleKills: number;
|
|
158
|
+
dragonKills: number;
|
|
159
|
+
eligibleForProgression?: boolean | undefined;
|
|
160
|
+
enemyMissingPings?: number | undefined;
|
|
161
|
+
enemyVisionPings?: number | undefined;
|
|
162
|
+
firstBloodAssist: boolean;
|
|
163
|
+
firstBloodKill: boolean;
|
|
164
|
+
firstTowerAssist: boolean;
|
|
165
|
+
firstTowerKill: boolean;
|
|
166
|
+
gameEndedInEarlySurrender: boolean;
|
|
167
|
+
gameEndedInSurrender: boolean;
|
|
168
|
+
holdPings?: number | undefined;
|
|
169
|
+
getBackPings?: number | undefined;
|
|
170
|
+
goldEarned: number;
|
|
171
|
+
goldSpent: number;
|
|
172
|
+
individualPosition: string;
|
|
173
|
+
inhibitorKills: number;
|
|
174
|
+
inhibitorTakedowns?: number | undefined;
|
|
175
|
+
inhibitorsLost?: number | undefined;
|
|
176
|
+
item0: number;
|
|
177
|
+
item1: number;
|
|
178
|
+
item2: number;
|
|
179
|
+
item3: number;
|
|
180
|
+
item4: number;
|
|
181
|
+
item5: number;
|
|
182
|
+
item6: number;
|
|
183
|
+
itemsPurchased: number;
|
|
184
|
+
killingSprees: number;
|
|
185
|
+
kills: number;
|
|
186
|
+
lane: string;
|
|
187
|
+
largestCriticalStrike: number;
|
|
188
|
+
largestKillingSpree: number;
|
|
189
|
+
largestMultiKill: number;
|
|
190
|
+
longestTimeSpentLiving: number;
|
|
191
|
+
magicDamageDealt: number;
|
|
192
|
+
magicDamageDealtToChampions: number;
|
|
193
|
+
magicDamageTaken: number;
|
|
194
|
+
missions?: match_v5_MissionsDto | undefined;
|
|
195
|
+
neutralMinionsKilled: number;
|
|
196
|
+
needVisionPings?: number | undefined;
|
|
197
|
+
nexusKills: number;
|
|
198
|
+
nexusTakedowns?: number | undefined;
|
|
199
|
+
nexusLost?: number | undefined;
|
|
200
|
+
objectivesStolen: number;
|
|
201
|
+
objectivesStolenAssists: number;
|
|
202
|
+
onMyWayPings?: number | undefined;
|
|
203
|
+
participantId: number;
|
|
204
|
+
playerScore0?: number | undefined;
|
|
205
|
+
playerScore1?: number | undefined;
|
|
206
|
+
playerScore2?: number | undefined;
|
|
207
|
+
playerScore3?: number | undefined;
|
|
208
|
+
playerScore4?: number | undefined;
|
|
209
|
+
playerScore5?: number | undefined;
|
|
210
|
+
playerScore6?: number | undefined;
|
|
211
|
+
playerScore7?: number | undefined;
|
|
212
|
+
playerScore8?: number | undefined;
|
|
213
|
+
playerScore9?: number | undefined;
|
|
214
|
+
playerScore10?: number | undefined;
|
|
215
|
+
playerScore11?: number | undefined;
|
|
216
|
+
pentaKills: number;
|
|
217
|
+
perks: match_v5_PerksDto;
|
|
218
|
+
physicalDamageDealt: number;
|
|
219
|
+
physicalDamageDealtToChampions: number;
|
|
220
|
+
physicalDamageTaken: number;
|
|
221
|
+
placement?: number | undefined;
|
|
222
|
+
playerAugment1?: number | undefined;
|
|
223
|
+
playerAugment2?: number | undefined;
|
|
224
|
+
playerAugment3?: number | undefined;
|
|
225
|
+
playerAugment4?: number | undefined;
|
|
226
|
+
playerSubteamId?: number | undefined;
|
|
227
|
+
pushPings?: number | undefined;
|
|
228
|
+
profileIcon: number;
|
|
229
|
+
puuid: string;
|
|
230
|
+
quadraKills: number;
|
|
231
|
+
riotIdGameName?: string | undefined;
|
|
232
|
+
riotIdTagline?: string | undefined;
|
|
233
|
+
role: string;
|
|
234
|
+
sightWardsBoughtInGame: number;
|
|
235
|
+
spell1Casts: number;
|
|
236
|
+
spell2Casts: number;
|
|
237
|
+
spell3Casts: number;
|
|
238
|
+
spell4Casts: number;
|
|
239
|
+
subteamPlacement?: number | undefined;
|
|
240
|
+
summoner1Casts: number;
|
|
241
|
+
summoner1Id: number;
|
|
242
|
+
summoner2Casts: number;
|
|
243
|
+
summoner2Id: number;
|
|
244
|
+
summonerId: string;
|
|
245
|
+
summonerLevel: number;
|
|
246
|
+
summonerName: string;
|
|
247
|
+
teamEarlySurrendered: boolean;
|
|
248
|
+
teamId: number;
|
|
249
|
+
teamPosition: string;
|
|
250
|
+
timeCCingOthers: number;
|
|
251
|
+
timePlayed: number;
|
|
252
|
+
totalAllyJungleMinionsKilled?: number | undefined;
|
|
253
|
+
totalDamageDealt: number;
|
|
254
|
+
totalDamageDealtToChampions: number;
|
|
255
|
+
totalDamageShieldedOnTeammates: number;
|
|
256
|
+
totalDamageTaken: number;
|
|
257
|
+
totalEnemyJungleMinionsKilled?: number | undefined;
|
|
258
|
+
totalHeal: number;
|
|
259
|
+
totalHealsOnTeammates: number;
|
|
260
|
+
totalMinionsKilled: number;
|
|
261
|
+
totalTimeCCDealt: number;
|
|
262
|
+
totalTimeSpentDead: number;
|
|
263
|
+
totalUnitsHealed: number;
|
|
264
|
+
tripleKills: number;
|
|
265
|
+
trueDamageDealt: number;
|
|
266
|
+
trueDamageDealtToChampions: number;
|
|
267
|
+
trueDamageTaken: number;
|
|
268
|
+
turretKills: number;
|
|
269
|
+
turretTakedowns?: number | undefined;
|
|
270
|
+
turretsLost?: number | undefined;
|
|
271
|
+
unrealKills: number;
|
|
272
|
+
visionScore: number;
|
|
273
|
+
visionClearedPings?: number | undefined;
|
|
274
|
+
visionWardsBoughtInGame: number;
|
|
275
|
+
wardsKilled: number;
|
|
276
|
+
wardsPlaced: number;
|
|
277
|
+
win: boolean;
|
|
278
|
+
baitPings?: number | undefined;
|
|
279
|
+
dangerPings?: number | undefined;
|
|
280
|
+
basicPings?: number | undefined;
|
|
281
|
+
playerAugment5?: number | undefined;
|
|
282
|
+
playerAugment6?: number | undefined;
|
|
283
|
+
riotIdName?: string | undefined;
|
|
284
|
+
retreatPings?: number | undefined;
|
|
285
|
+
championSkinId?: number | undefined;
|
|
286
|
+
};
|
|
287
|
+
type match_v5_ChallengesDto = Partial<{
|
|
288
|
+
"12AssistStreakCount": number;
|
|
289
|
+
baronBuffGoldAdvantageOverThreshold: number;
|
|
290
|
+
controlWardTimeCoverageInRiverOrEnemyHalf: number;
|
|
291
|
+
earliestBaron: number;
|
|
292
|
+
earliestDragonTakedown: number;
|
|
293
|
+
earliestElderDragon: number;
|
|
294
|
+
earlyLaningPhaseGoldExpAdvantage: number;
|
|
295
|
+
fasterSupportQuestCompletion: 0 | 1;
|
|
296
|
+
fastestLegendary: number;
|
|
297
|
+
hadAfkTeammate: 0 | 1;
|
|
298
|
+
highestChampionDamage: number;
|
|
299
|
+
highestCrowdControlScore: 0 | 1;
|
|
300
|
+
highestWardKills: 0 | 1;
|
|
301
|
+
junglerKillsEarlyJungle: number;
|
|
302
|
+
killsOnLanersEarlyJungleAsJungler: number;
|
|
303
|
+
laningPhaseGoldExpAdvantage: 0 | 1;
|
|
304
|
+
legendaryCount: number;
|
|
305
|
+
maxCsAdvantageOnLaneOpponent: number;
|
|
306
|
+
maxLevelLeadLaneOpponent: number;
|
|
307
|
+
mostWardsDestroyedOneSweeper: number;
|
|
308
|
+
mythicItemUsed: number;
|
|
309
|
+
playedChampSelectPosition: 0 | 1;
|
|
310
|
+
soloTurretsLategame: number;
|
|
311
|
+
takedownsFirst25Minutes: number;
|
|
312
|
+
teleportTakedowns: number;
|
|
313
|
+
thirdInhibitorDestroyedTime: number;
|
|
314
|
+
threeWardsOneSweeperCount: number;
|
|
315
|
+
visionScoreAdvantageLaneOpponent: number;
|
|
316
|
+
InfernalScalePickup: number;
|
|
317
|
+
fistBumpParticipation: number;
|
|
318
|
+
voidMonsterKill: number;
|
|
319
|
+
abilityUses: number;
|
|
320
|
+
acesBefore15Minutes: number;
|
|
321
|
+
alliedJungleMonsterKills: number;
|
|
322
|
+
baronTakedowns: number;
|
|
323
|
+
blastConeOppositeOpponentCount: number;
|
|
324
|
+
bountyGold: number;
|
|
325
|
+
buffsStolen: number;
|
|
326
|
+
completeSupportQuestInTime: number;
|
|
327
|
+
controlWardsPlaced: number;
|
|
328
|
+
damagePerMinute: number;
|
|
329
|
+
damageTakenOnTeamPercentage: number;
|
|
330
|
+
dancedWithRiftHerald: number;
|
|
331
|
+
deathsByEnemyChamps: number;
|
|
332
|
+
dodgeSkillShotsSmallWindow: number;
|
|
333
|
+
doubleAces: number;
|
|
334
|
+
dragonTakedowns: number;
|
|
335
|
+
legendaryItemUsed: Array<number>;
|
|
336
|
+
effectiveHealAndShielding: number;
|
|
337
|
+
elderDragonKillsWithOpposingSoul: number;
|
|
338
|
+
elderDragonMultikills: number;
|
|
339
|
+
enemyChampionImmobilizations: number;
|
|
340
|
+
enemyJungleMonsterKills: number;
|
|
341
|
+
epicMonsterKillsNearEnemyJungler: number;
|
|
342
|
+
epicMonsterKillsWithin30SecondsOfSpawn: number;
|
|
343
|
+
epicMonsterSteals: number;
|
|
344
|
+
epicMonsterStolenWithoutSmite: number;
|
|
345
|
+
firstTurretKilled: number;
|
|
346
|
+
firstTurretKilledTime: number;
|
|
347
|
+
flawlessAces: number;
|
|
348
|
+
fullTeamTakedown: number;
|
|
349
|
+
gameLength: number;
|
|
350
|
+
getTakedownsInAllLanesEarlyJungleAsLaner: number;
|
|
351
|
+
goldPerMinute: number;
|
|
352
|
+
hadOpenNexus: number;
|
|
353
|
+
immobilizeAndKillWithAlly: number;
|
|
354
|
+
initialBuffCount: number;
|
|
355
|
+
initialCrabCount: number;
|
|
356
|
+
jungleCsBefore10Minutes: number;
|
|
357
|
+
junglerTakedownsNearDamagedEpicMonster: number;
|
|
358
|
+
kda: number;
|
|
359
|
+
killAfterHiddenWithAlly: number;
|
|
360
|
+
killedChampTookFullTeamDamageSurvived: number;
|
|
361
|
+
killingSprees: number;
|
|
362
|
+
killParticipation: number;
|
|
363
|
+
killsNearEnemyTurret: number;
|
|
364
|
+
killsOnOtherLanesEarlyJungleAsLaner: number;
|
|
365
|
+
killsOnRecentlyHealedByAramPack: number;
|
|
366
|
+
killsUnderOwnTurret: number;
|
|
367
|
+
killsWithHelpFromEpicMonster: number;
|
|
368
|
+
knockEnemyIntoTeamAndKill: number;
|
|
369
|
+
kTurretsDestroyedBeforePlatesFall: number;
|
|
370
|
+
landSkillShotsEarlyGame: number;
|
|
371
|
+
laneMinionsFirst10Minutes: number;
|
|
372
|
+
lostAnInhibitor: number;
|
|
373
|
+
maxKillDeficit: number;
|
|
374
|
+
mejaisFullStackInTime: number;
|
|
375
|
+
moreEnemyJungleThanOpponent: number;
|
|
376
|
+
multiKillOneSpell: number;
|
|
377
|
+
multikills: number;
|
|
378
|
+
multikillsAfterAggressiveFlash: number;
|
|
379
|
+
multiTurretRiftHeraldCount: number;
|
|
380
|
+
outerTurretExecutesBefore10Minutes: number;
|
|
381
|
+
outnumberedKills: number;
|
|
382
|
+
outnumberedNexusKill: number;
|
|
383
|
+
perfectDragonSoulsTaken: number;
|
|
384
|
+
perfectGame: number;
|
|
385
|
+
pickKillWithAlly: number;
|
|
386
|
+
poroExplosions: number;
|
|
387
|
+
quickCleanse: number;
|
|
388
|
+
quickFirstTurret: number;
|
|
389
|
+
quickSoloKills: number;
|
|
390
|
+
riftHeraldTakedowns: number;
|
|
391
|
+
saveAllyFromDeath: number;
|
|
392
|
+
scuttleCrabKills: number;
|
|
393
|
+
shortestTimeToAceFromFirstTakedown: number;
|
|
394
|
+
skillshotsDodged: number;
|
|
395
|
+
skillshotsHit: number;
|
|
396
|
+
snowballsHit: number;
|
|
397
|
+
soloBaronKills: number;
|
|
398
|
+
SWARM_DefeatAatrox: number;
|
|
399
|
+
SWARM_DefeatBriar: number;
|
|
400
|
+
SWARM_DefeatMiniBosses: number;
|
|
401
|
+
SWARM_EvolveWeapon: number;
|
|
402
|
+
SWARM_Have3Passives: number;
|
|
403
|
+
SWARM_KillEnemy: number;
|
|
404
|
+
SWARM_PickupGold: number;
|
|
405
|
+
SWARM_ReachLevel50: number;
|
|
406
|
+
SWARM_Survive15Min: number;
|
|
407
|
+
SWARM_WinWith5EvolvedWeapons: number;
|
|
408
|
+
soloKills: number;
|
|
409
|
+
stealthWardsPlaced: number;
|
|
410
|
+
survivedSingleDigitHpCount: number;
|
|
411
|
+
survivedThreeImmobilizesInFight: number;
|
|
412
|
+
takedownOnFirstTurret: number;
|
|
413
|
+
takedowns: number;
|
|
414
|
+
takedownsAfterGainingLevelAdvantage: number;
|
|
415
|
+
takedownsBeforeJungleMinionSpawn: number;
|
|
416
|
+
takedownsFirstXMinutes: number;
|
|
417
|
+
takedownsInAlcove: number;
|
|
418
|
+
takedownsInEnemyFountain: number;
|
|
419
|
+
teamBaronKills: number;
|
|
420
|
+
teamDamagePercentage: number;
|
|
421
|
+
teamElderDragonKills: number;
|
|
422
|
+
teamRiftHeraldKills: number;
|
|
423
|
+
tookLargeDamageSurvived: number;
|
|
424
|
+
turretPlatesTaken: number;
|
|
425
|
+
turretsTakenWithRiftHerald: number;
|
|
426
|
+
turretTakedowns: number;
|
|
427
|
+
twentyMinionsIn3SecondsCount: number;
|
|
428
|
+
twoWardsOneSweeperCount: number;
|
|
429
|
+
unseenRecalls: number;
|
|
430
|
+
visionScorePerMinute: number;
|
|
431
|
+
wardsGuarded: number;
|
|
432
|
+
wardTakedowns: number;
|
|
433
|
+
wardTakedownsBefore20M: number;
|
|
434
|
+
HealFromMapSources: number;
|
|
435
|
+
}>;
|
|
436
|
+
type match_v5_MissionsDto = Partial<{
|
|
437
|
+
playerScore0: number;
|
|
438
|
+
playerScore1: number;
|
|
439
|
+
playerScore2: number;
|
|
440
|
+
playerScore3: number;
|
|
441
|
+
playerScore4: number;
|
|
442
|
+
playerScore5: number;
|
|
443
|
+
playerScore6: number;
|
|
444
|
+
playerScore7: number;
|
|
445
|
+
playerScore8: number;
|
|
446
|
+
playerScore9: number;
|
|
447
|
+
playerScore10: number;
|
|
448
|
+
playerScore11: number;
|
|
449
|
+
}>;
|
|
450
|
+
type match_v5_PerksDto = {
|
|
451
|
+
statPerks: match_v5_PerkStatsDto;
|
|
452
|
+
styles: Array<match_v5_PerkStyleDto>;
|
|
453
|
+
};
|
|
454
|
+
type match_v5_PerkStatsDto = {
|
|
455
|
+
defense: number;
|
|
456
|
+
flex: number;
|
|
457
|
+
offense: number;
|
|
458
|
+
};
|
|
459
|
+
type match_v5_PerkStyleDto = {
|
|
460
|
+
description: string;
|
|
461
|
+
selections: Array<match_v5_PerkStyleSelectionDto>;
|
|
462
|
+
style: number;
|
|
463
|
+
};
|
|
464
|
+
type match_v5_PerkStyleSelectionDto = {
|
|
465
|
+
perk: number;
|
|
466
|
+
var1: number;
|
|
467
|
+
var2: number;
|
|
468
|
+
var3: number;
|
|
469
|
+
};
|
|
470
|
+
type match_v5_TeamDto = {
|
|
471
|
+
bans: Array<match_v5_BanDto>;
|
|
472
|
+
objectives: match_v5_ObjectivesDto;
|
|
473
|
+
teamId: number;
|
|
474
|
+
win: boolean;
|
|
475
|
+
feats?: match_v5_FeatsDto | undefined;
|
|
476
|
+
};
|
|
477
|
+
type match_v5_BanDto = {
|
|
478
|
+
championId: number;
|
|
479
|
+
pickTurn: number;
|
|
480
|
+
};
|
|
481
|
+
type match_v5_ObjectivesDto = {
|
|
482
|
+
baron: match_v5_ObjectiveDto;
|
|
483
|
+
champion: match_v5_ObjectiveDto;
|
|
484
|
+
dragon: match_v5_ObjectiveDto;
|
|
485
|
+
horde?: match_v5_ObjectiveDto | undefined;
|
|
486
|
+
inhibitor: match_v5_ObjectiveDto;
|
|
487
|
+
riftHerald: match_v5_ObjectiveDto;
|
|
488
|
+
tower: match_v5_ObjectiveDto;
|
|
489
|
+
atakhan?: match_v5_ObjectiveDto | undefined;
|
|
490
|
+
};
|
|
491
|
+
type match_v5_ObjectiveDto = {
|
|
492
|
+
first: boolean;
|
|
493
|
+
kills: number;
|
|
494
|
+
};
|
|
495
|
+
type match_v5_FeatsDto = Partial<{
|
|
496
|
+
EPIC_MONSTER_KILL: match_v5_FeatDto;
|
|
497
|
+
FIRST_BLOOD: match_v5_FeatDto;
|
|
498
|
+
FIRST_TURRET: match_v5_FeatDto;
|
|
499
|
+
}>;
|
|
500
|
+
type match_v5_FeatDto = Partial<{
|
|
501
|
+
featState: number;
|
|
502
|
+
}>;
|
|
503
|
+
|
|
504
|
+
const league_v4_MiniSeriesDTO: z.ZodType<league_v4_MiniSeriesDTO> = z
|
|
505
|
+
.object({
|
|
506
|
+
losses: z.number().int(),
|
|
507
|
+
progress: z.string(),
|
|
508
|
+
target: z.number().int(),
|
|
509
|
+
wins: z.number().int(),
|
|
510
|
+
})
|
|
511
|
+
.passthrough();
|
|
512
|
+
const league_v4_LeagueEntryDTO: z.ZodType<league_v4_LeagueEntryDTO> = z
|
|
513
|
+
.object({
|
|
514
|
+
leagueId: z.string().optional(),
|
|
515
|
+
puuid: z.string(),
|
|
516
|
+
queueType: z.string(),
|
|
517
|
+
tier: z.string().optional(),
|
|
518
|
+
rank: z.string().optional(),
|
|
519
|
+
leaguePoints: z.number().int(),
|
|
520
|
+
wins: z.number().int(),
|
|
521
|
+
losses: z.number().int(),
|
|
522
|
+
hotStreak: z.boolean(),
|
|
523
|
+
veteran: z.boolean(),
|
|
524
|
+
freshBlood: z.boolean(),
|
|
525
|
+
inactive: z.boolean(),
|
|
526
|
+
miniSeries: league_v4_MiniSeriesDTO.optional(),
|
|
527
|
+
summonerId: z.string().optional(),
|
|
528
|
+
})
|
|
529
|
+
.passthrough();
|
|
530
|
+
const spectator_v5_BannedChampion: z.ZodType<spectator_v5_BannedChampion> = z
|
|
531
|
+
.object({
|
|
532
|
+
pickTurn: z.number().int(),
|
|
533
|
+
championId: z.number().int(),
|
|
534
|
+
teamId: z.number().int(),
|
|
535
|
+
})
|
|
536
|
+
.passthrough();
|
|
537
|
+
const spectator_v5_Observer: z.ZodType<spectator_v5_Observer> = z
|
|
538
|
+
.object({ encryptionKey: z.string() })
|
|
539
|
+
.passthrough();
|
|
540
|
+
const spectator_v5_Perks: z.ZodType<spectator_v5_Perks> = z
|
|
541
|
+
.object({
|
|
542
|
+
perkIds: z.array(z.number().int()),
|
|
543
|
+
perkStyle: z.number().int(),
|
|
544
|
+
perkSubStyle: z.number().int(),
|
|
545
|
+
})
|
|
546
|
+
.passthrough();
|
|
547
|
+
const spectator_v5_GameCustomizationObject: z.ZodType<spectator_v5_GameCustomizationObject> =
|
|
548
|
+
z.object({ category: z.string(), content: z.string() }).passthrough();
|
|
549
|
+
const spectator_v5_CurrentGameParticipant: z.ZodType<spectator_v5_CurrentGameParticipant> =
|
|
550
|
+
z
|
|
551
|
+
.object({
|
|
552
|
+
championId: z.number().int(),
|
|
553
|
+
perks: spectator_v5_Perks.optional(),
|
|
554
|
+
profileIconId: z.number().int(),
|
|
555
|
+
bot: z.boolean(),
|
|
556
|
+
teamId: z.number().int(),
|
|
557
|
+
puuid: z.union([z.string(), z.null()]),
|
|
558
|
+
spell1Id: z.number().int(),
|
|
559
|
+
spell2Id: z.number().int(),
|
|
560
|
+
gameCustomizationObjects: z.array(spectator_v5_GameCustomizationObject),
|
|
561
|
+
riotId: z.string().optional(),
|
|
562
|
+
})
|
|
563
|
+
.passthrough();
|
|
564
|
+
const spectator_v5_CurrentGameInfo: z.ZodType<spectator_v5_CurrentGameInfo> = z
|
|
565
|
+
.object({
|
|
566
|
+
gameId: z.number().int(),
|
|
567
|
+
gameType: z.string(),
|
|
568
|
+
gameStartTime: z.number().int(),
|
|
569
|
+
mapId: z.number().int(),
|
|
570
|
+
gameLength: z.number().int(),
|
|
571
|
+
platformId: z.string(),
|
|
572
|
+
gameMode: z.string(),
|
|
573
|
+
bannedChampions: z.array(spectator_v5_BannedChampion),
|
|
574
|
+
gameQueueConfigId: z.number().int().optional(),
|
|
575
|
+
observers: spectator_v5_Observer,
|
|
576
|
+
participants: z.array(spectator_v5_CurrentGameParticipant),
|
|
577
|
+
})
|
|
578
|
+
.passthrough();
|
|
579
|
+
const AccountInfo: z.ZodType<AccountInfo> = z
|
|
580
|
+
.object({
|
|
581
|
+
generalInfo: z
|
|
582
|
+
.object({
|
|
583
|
+
puuid: z.string(),
|
|
584
|
+
summonerName: z.string(),
|
|
585
|
+
tagLine: z.string(),
|
|
586
|
+
profileIconId: z.number().int(),
|
|
587
|
+
revisionDate: z.number().int(),
|
|
588
|
+
summonerLevel: z.number().int(),
|
|
589
|
+
lastUpdated: z.string(),
|
|
590
|
+
})
|
|
591
|
+
.passthrough(),
|
|
592
|
+
leagueEntries: z.array(league_v4_LeagueEntryDTO),
|
|
593
|
+
currentGame: z.union([spectator_v5_CurrentGameInfo, z.null()]),
|
|
594
|
+
})
|
|
595
|
+
.passthrough();
|
|
596
|
+
const validationError = z
|
|
597
|
+
.object({
|
|
598
|
+
message: z.string(),
|
|
599
|
+
statusCode: z.number().int(),
|
|
600
|
+
details: z.array(
|
|
601
|
+
z
|
|
602
|
+
.object({
|
|
603
|
+
type: z.string(),
|
|
604
|
+
value: z.string(),
|
|
605
|
+
msg: z.string(),
|
|
606
|
+
path: z.string(),
|
|
607
|
+
location: z.string(),
|
|
608
|
+
})
|
|
609
|
+
.passthrough()
|
|
610
|
+
),
|
|
611
|
+
})
|
|
612
|
+
.passthrough();
|
|
613
|
+
const simpleError = z.object({ message: z.string() }).passthrough();
|
|
614
|
+
const simpleInternalError = z.object({ message: z.string() }).passthrough();
|
|
615
|
+
const league_v4_LeagueItemDTO: z.ZodType<league_v4_LeagueItemDTO> = z
|
|
616
|
+
.object({
|
|
617
|
+
freshBlood: z.boolean(),
|
|
618
|
+
wins: z.number().int(),
|
|
619
|
+
miniSeries: league_v4_MiniSeriesDTO.optional(),
|
|
620
|
+
inactive: z.boolean(),
|
|
621
|
+
veteran: z.boolean(),
|
|
622
|
+
hotStreak: z.boolean(),
|
|
623
|
+
rank: z.string().optional(),
|
|
624
|
+
leaguePoints: z.number().int(),
|
|
625
|
+
losses: z.number().int(),
|
|
626
|
+
puuid: z.string(),
|
|
627
|
+
summonerId: z.string().optional(),
|
|
628
|
+
})
|
|
629
|
+
.passthrough();
|
|
630
|
+
const LeagueDetails: z.ZodType<LeagueDetails> = z
|
|
631
|
+
.object({
|
|
632
|
+
queueType: z.string(),
|
|
633
|
+
tier: z.string(),
|
|
634
|
+
division: z.string(),
|
|
635
|
+
name: z.string().optional(),
|
|
636
|
+
lastUpdated: z.string(),
|
|
637
|
+
entries: z.array(league_v4_LeagueItemDTO),
|
|
638
|
+
})
|
|
639
|
+
.passthrough();
|
|
640
|
+
const match_v5_MetadataDto: z.ZodType<match_v5_MetadataDto> = z
|
|
641
|
+
.object({
|
|
642
|
+
dataVersion: z.string(),
|
|
643
|
+
matchId: z.string(),
|
|
644
|
+
participants: z.array(z.string()),
|
|
645
|
+
})
|
|
646
|
+
.passthrough();
|
|
647
|
+
const match_v5_ChallengesDto: z.ZodType<match_v5_ChallengesDto> = z
|
|
648
|
+
.object({
|
|
649
|
+
"12AssistStreakCount": z.number().int(),
|
|
650
|
+
baronBuffGoldAdvantageOverThreshold: z.number().int(),
|
|
651
|
+
controlWardTimeCoverageInRiverOrEnemyHalf: z.number(),
|
|
652
|
+
earliestBaron: z.number(),
|
|
653
|
+
earliestDragonTakedown: z.number(),
|
|
654
|
+
earliestElderDragon: z.number(),
|
|
655
|
+
earlyLaningPhaseGoldExpAdvantage: z.number(),
|
|
656
|
+
fasterSupportQuestCompletion: z.union([z.literal(0), z.literal(1)]),
|
|
657
|
+
fastestLegendary: z.number(),
|
|
658
|
+
hadAfkTeammate: z.union([z.literal(0), z.literal(1)]),
|
|
659
|
+
highestChampionDamage: z.number().int(),
|
|
660
|
+
highestCrowdControlScore: z.union([z.literal(0), z.literal(1)]),
|
|
661
|
+
highestWardKills: z.union([z.literal(0), z.literal(1)]),
|
|
662
|
+
junglerKillsEarlyJungle: z.number().int(),
|
|
663
|
+
killsOnLanersEarlyJungleAsJungler: z.number().int(),
|
|
664
|
+
laningPhaseGoldExpAdvantage: z.union([z.literal(0), z.literal(1)]),
|
|
665
|
+
legendaryCount: z.number().int(),
|
|
666
|
+
maxCsAdvantageOnLaneOpponent: z.number(),
|
|
667
|
+
maxLevelLeadLaneOpponent: z.number().int(),
|
|
668
|
+
mostWardsDestroyedOneSweeper: z.number().int(),
|
|
669
|
+
mythicItemUsed: z.number().int(),
|
|
670
|
+
playedChampSelectPosition: z.union([z.literal(0), z.literal(1)]),
|
|
671
|
+
soloTurretsLategame: z.number().int(),
|
|
672
|
+
takedownsFirst25Minutes: z.number().int(),
|
|
673
|
+
teleportTakedowns: z.number().int(),
|
|
674
|
+
thirdInhibitorDestroyedTime: z.number(),
|
|
675
|
+
threeWardsOneSweeperCount: z.number().int(),
|
|
676
|
+
visionScoreAdvantageLaneOpponent: z.number(),
|
|
677
|
+
InfernalScalePickup: z.number().int(),
|
|
678
|
+
fistBumpParticipation: z.number().int(),
|
|
679
|
+
voidMonsterKill: z.number().int(),
|
|
680
|
+
abilityUses: z.number().int(),
|
|
681
|
+
acesBefore15Minutes: z.number().int(),
|
|
682
|
+
alliedJungleMonsterKills: z.number(),
|
|
683
|
+
baronTakedowns: z.number().int(),
|
|
684
|
+
blastConeOppositeOpponentCount: z.number().int(),
|
|
685
|
+
bountyGold: z.number(),
|
|
686
|
+
buffsStolen: z.number().int(),
|
|
687
|
+
completeSupportQuestInTime: z.number().int(),
|
|
688
|
+
controlWardsPlaced: z.number().int(),
|
|
689
|
+
damagePerMinute: z.number(),
|
|
690
|
+
damageTakenOnTeamPercentage: z.number(),
|
|
691
|
+
dancedWithRiftHerald: z.number().int(),
|
|
692
|
+
deathsByEnemyChamps: z.number().int(),
|
|
693
|
+
dodgeSkillShotsSmallWindow: z.number().int(),
|
|
694
|
+
doubleAces: z.number().int(),
|
|
695
|
+
dragonTakedowns: z.number().int(),
|
|
696
|
+
legendaryItemUsed: z.array(z.number().int()),
|
|
697
|
+
effectiveHealAndShielding: z.number(),
|
|
698
|
+
elderDragonKillsWithOpposingSoul: z.number().int(),
|
|
699
|
+
elderDragonMultikills: z.number().int(),
|
|
700
|
+
enemyChampionImmobilizations: z.number().int(),
|
|
701
|
+
enemyJungleMonsterKills: z.number(),
|
|
702
|
+
epicMonsterKillsNearEnemyJungler: z.number().int(),
|
|
703
|
+
epicMonsterKillsWithin30SecondsOfSpawn: z.number().int(),
|
|
704
|
+
epicMonsterSteals: z.number().int(),
|
|
705
|
+
epicMonsterStolenWithoutSmite: z.number().int(),
|
|
706
|
+
firstTurretKilled: z.number(),
|
|
707
|
+
firstTurretKilledTime: z.number(),
|
|
708
|
+
flawlessAces: z.number().int(),
|
|
709
|
+
fullTeamTakedown: z.number().int(),
|
|
710
|
+
gameLength: z.number(),
|
|
711
|
+
getTakedownsInAllLanesEarlyJungleAsLaner: z.number().int(),
|
|
712
|
+
goldPerMinute: z.number(),
|
|
713
|
+
hadOpenNexus: z.number().int(),
|
|
714
|
+
immobilizeAndKillWithAlly: z.number().int(),
|
|
715
|
+
initialBuffCount: z.number().int(),
|
|
716
|
+
initialCrabCount: z.number().int(),
|
|
717
|
+
jungleCsBefore10Minutes: z.number(),
|
|
718
|
+
junglerTakedownsNearDamagedEpicMonster: z.number().int(),
|
|
719
|
+
kda: z.number(),
|
|
720
|
+
killAfterHiddenWithAlly: z.number().int(),
|
|
721
|
+
killedChampTookFullTeamDamageSurvived: z.number().int(),
|
|
722
|
+
killingSprees: z.number().int(),
|
|
723
|
+
killParticipation: z.number(),
|
|
724
|
+
killsNearEnemyTurret: z.number().int(),
|
|
725
|
+
killsOnOtherLanesEarlyJungleAsLaner: z.number().int(),
|
|
726
|
+
killsOnRecentlyHealedByAramPack: z.number().int(),
|
|
727
|
+
killsUnderOwnTurret: z.number().int(),
|
|
728
|
+
killsWithHelpFromEpicMonster: z.number().int(),
|
|
729
|
+
knockEnemyIntoTeamAndKill: z.number().int(),
|
|
730
|
+
kTurretsDestroyedBeforePlatesFall: z.number().int(),
|
|
731
|
+
landSkillShotsEarlyGame: z.number().int(),
|
|
732
|
+
laneMinionsFirst10Minutes: z.number().int(),
|
|
733
|
+
lostAnInhibitor: z.number().int(),
|
|
734
|
+
maxKillDeficit: z.number().int(),
|
|
735
|
+
mejaisFullStackInTime: z.number().int(),
|
|
736
|
+
moreEnemyJungleThanOpponent: z.number(),
|
|
737
|
+
multiKillOneSpell: z.number().int(),
|
|
738
|
+
multikills: z.number().int(),
|
|
739
|
+
multikillsAfterAggressiveFlash: z.number().int(),
|
|
740
|
+
multiTurretRiftHeraldCount: z.number().int(),
|
|
741
|
+
outerTurretExecutesBefore10Minutes: z.number().int(),
|
|
742
|
+
outnumberedKills: z.number().int(),
|
|
743
|
+
outnumberedNexusKill: z.number().int(),
|
|
744
|
+
perfectDragonSoulsTaken: z.number().int(),
|
|
745
|
+
perfectGame: z.number().int(),
|
|
746
|
+
pickKillWithAlly: z.number().int(),
|
|
747
|
+
poroExplosions: z.number().int(),
|
|
748
|
+
quickCleanse: z.number().int(),
|
|
749
|
+
quickFirstTurret: z.number().int(),
|
|
750
|
+
quickSoloKills: z.number().int(),
|
|
751
|
+
riftHeraldTakedowns: z.number().int(),
|
|
752
|
+
saveAllyFromDeath: z.number().int(),
|
|
753
|
+
scuttleCrabKills: z.number().int(),
|
|
754
|
+
shortestTimeToAceFromFirstTakedown: z.number(),
|
|
755
|
+
skillshotsDodged: z.number().int(),
|
|
756
|
+
skillshotsHit: z.number().int(),
|
|
757
|
+
snowballsHit: z.number().int(),
|
|
758
|
+
soloBaronKills: z.number().int(),
|
|
759
|
+
SWARM_DefeatAatrox: z.number().int(),
|
|
760
|
+
SWARM_DefeatBriar: z.number().int(),
|
|
761
|
+
SWARM_DefeatMiniBosses: z.number().int(),
|
|
762
|
+
SWARM_EvolveWeapon: z.number().int(),
|
|
763
|
+
SWARM_Have3Passives: z.number().int(),
|
|
764
|
+
SWARM_KillEnemy: z.number().int(),
|
|
765
|
+
SWARM_PickupGold: z.number(),
|
|
766
|
+
SWARM_ReachLevel50: z.number().int(),
|
|
767
|
+
SWARM_Survive15Min: z.number().int(),
|
|
768
|
+
SWARM_WinWith5EvolvedWeapons: z.number().int(),
|
|
769
|
+
soloKills: z.number().int(),
|
|
770
|
+
stealthWardsPlaced: z.number().int(),
|
|
771
|
+
survivedSingleDigitHpCount: z.number().int(),
|
|
772
|
+
survivedThreeImmobilizesInFight: z.number().int(),
|
|
773
|
+
takedownOnFirstTurret: z.number().int(),
|
|
774
|
+
takedowns: z.number().int(),
|
|
775
|
+
takedownsAfterGainingLevelAdvantage: z.number().int(),
|
|
776
|
+
takedownsBeforeJungleMinionSpawn: z.number().int(),
|
|
777
|
+
takedownsFirstXMinutes: z.number().int(),
|
|
778
|
+
takedownsInAlcove: z.number().int(),
|
|
779
|
+
takedownsInEnemyFountain: z.number().int(),
|
|
780
|
+
teamBaronKills: z.number().int(),
|
|
781
|
+
teamDamagePercentage: z.number(),
|
|
782
|
+
teamElderDragonKills: z.number().int(),
|
|
783
|
+
teamRiftHeraldKills: z.number().int(),
|
|
784
|
+
tookLargeDamageSurvived: z.number().int(),
|
|
785
|
+
turretPlatesTaken: z.number().int(),
|
|
786
|
+
turretsTakenWithRiftHerald: z.number().int(),
|
|
787
|
+
turretTakedowns: z.number().int(),
|
|
788
|
+
twentyMinionsIn3SecondsCount: z.number().int(),
|
|
789
|
+
twoWardsOneSweeperCount: z.number().int(),
|
|
790
|
+
unseenRecalls: z.number().int(),
|
|
791
|
+
visionScorePerMinute: z.number(),
|
|
792
|
+
wardsGuarded: z.number().int(),
|
|
793
|
+
wardTakedowns: z.number().int(),
|
|
794
|
+
wardTakedownsBefore20M: z.number().int(),
|
|
795
|
+
HealFromMapSources: z.number(),
|
|
796
|
+
})
|
|
797
|
+
.partial()
|
|
798
|
+
.passthrough();
|
|
799
|
+
const match_v5_MissionsDto: z.ZodType<match_v5_MissionsDto> = z
|
|
800
|
+
.object({
|
|
801
|
+
playerScore0: z.number(),
|
|
802
|
+
playerScore1: z.number(),
|
|
803
|
+
playerScore2: z.number(),
|
|
804
|
+
playerScore3: z.number(),
|
|
805
|
+
playerScore4: z.number(),
|
|
806
|
+
playerScore5: z.number(),
|
|
807
|
+
playerScore6: z.number(),
|
|
808
|
+
playerScore7: z.number(),
|
|
809
|
+
playerScore8: z.number(),
|
|
810
|
+
playerScore9: z.number(),
|
|
811
|
+
playerScore10: z.number(),
|
|
812
|
+
playerScore11: z.number(),
|
|
813
|
+
})
|
|
814
|
+
.partial()
|
|
815
|
+
.passthrough();
|
|
816
|
+
const match_v5_PerkStatsDto: z.ZodType<match_v5_PerkStatsDto> = z
|
|
817
|
+
.object({
|
|
818
|
+
defense: z.number().int(),
|
|
819
|
+
flex: z.number().int(),
|
|
820
|
+
offense: z.number().int(),
|
|
821
|
+
})
|
|
822
|
+
.passthrough();
|
|
823
|
+
const match_v5_PerkStyleSelectionDto: z.ZodType<match_v5_PerkStyleSelectionDto> =
|
|
824
|
+
z
|
|
825
|
+
.object({
|
|
826
|
+
perk: z.number().int(),
|
|
827
|
+
var1: z.number().int(),
|
|
828
|
+
var2: z.number().int(),
|
|
829
|
+
var3: z.number().int(),
|
|
830
|
+
})
|
|
831
|
+
.passthrough();
|
|
832
|
+
const match_v5_PerkStyleDto: z.ZodType<match_v5_PerkStyleDto> = z
|
|
833
|
+
.object({
|
|
834
|
+
description: z.string(),
|
|
835
|
+
selections: z.array(match_v5_PerkStyleSelectionDto),
|
|
836
|
+
style: z.number().int(),
|
|
837
|
+
})
|
|
838
|
+
.passthrough();
|
|
839
|
+
const match_v5_PerksDto: z.ZodType<match_v5_PerksDto> = z
|
|
840
|
+
.object({
|
|
841
|
+
statPerks: match_v5_PerkStatsDto,
|
|
842
|
+
styles: z.array(match_v5_PerkStyleDto),
|
|
843
|
+
})
|
|
844
|
+
.passthrough();
|
|
845
|
+
const match_v5_ParticipantDto: z.ZodType<match_v5_ParticipantDto> = z
|
|
846
|
+
.object({
|
|
847
|
+
allInPings: z.number().int().optional(),
|
|
848
|
+
assistMePings: z.number().int().optional(),
|
|
849
|
+
assists: z.number().int(),
|
|
850
|
+
baronKills: z.number().int(),
|
|
851
|
+
bountyLevel: z.number().int().optional(),
|
|
852
|
+
champExperience: z.number().int(),
|
|
853
|
+
champLevel: z.number().int(),
|
|
854
|
+
championId: z.number().int(),
|
|
855
|
+
championName: z.string(),
|
|
856
|
+
commandPings: z.number().int().optional(),
|
|
857
|
+
championTransform: z.number().int(),
|
|
858
|
+
consumablesPurchased: z.number().int(),
|
|
859
|
+
challenges: match_v5_ChallengesDto.optional(),
|
|
860
|
+
damageDealtToBuildings: z.number().int().optional(),
|
|
861
|
+
damageDealtToObjectives: z.number().int(),
|
|
862
|
+
damageDealtToTurrets: z.number().int(),
|
|
863
|
+
damageSelfMitigated: z.number().int(),
|
|
864
|
+
deaths: z.number().int(),
|
|
865
|
+
detectorWardsPlaced: z.number().int(),
|
|
866
|
+
doubleKills: z.number().int(),
|
|
867
|
+
dragonKills: z.number().int(),
|
|
868
|
+
eligibleForProgression: z.boolean().optional(),
|
|
869
|
+
enemyMissingPings: z.number().int().optional(),
|
|
870
|
+
enemyVisionPings: z.number().int().optional(),
|
|
871
|
+
firstBloodAssist: z.boolean(),
|
|
872
|
+
firstBloodKill: z.boolean(),
|
|
873
|
+
firstTowerAssist: z.boolean(),
|
|
874
|
+
firstTowerKill: z.boolean(),
|
|
875
|
+
gameEndedInEarlySurrender: z.boolean(),
|
|
876
|
+
gameEndedInSurrender: z.boolean(),
|
|
877
|
+
holdPings: z.number().int().optional(),
|
|
878
|
+
getBackPings: z.number().int().optional(),
|
|
879
|
+
goldEarned: z.number().int(),
|
|
880
|
+
goldSpent: z.number().int(),
|
|
881
|
+
individualPosition: z.string(),
|
|
882
|
+
inhibitorKills: z.number().int(),
|
|
883
|
+
inhibitorTakedowns: z.number().int().optional(),
|
|
884
|
+
inhibitorsLost: z.number().int().optional(),
|
|
885
|
+
item0: z.number().int(),
|
|
886
|
+
item1: z.number().int(),
|
|
887
|
+
item2: z.number().int(),
|
|
888
|
+
item3: z.number().int(),
|
|
889
|
+
item4: z.number().int(),
|
|
890
|
+
item5: z.number().int(),
|
|
891
|
+
item6: z.number().int(),
|
|
892
|
+
itemsPurchased: z.number().int(),
|
|
893
|
+
killingSprees: z.number().int(),
|
|
894
|
+
kills: z.number().int(),
|
|
895
|
+
lane: z.string(),
|
|
896
|
+
largestCriticalStrike: z.number().int(),
|
|
897
|
+
largestKillingSpree: z.number().int(),
|
|
898
|
+
largestMultiKill: z.number().int(),
|
|
899
|
+
longestTimeSpentLiving: z.number().int(),
|
|
900
|
+
magicDamageDealt: z.number().int(),
|
|
901
|
+
magicDamageDealtToChampions: z.number().int(),
|
|
902
|
+
magicDamageTaken: z.number().int(),
|
|
903
|
+
missions: match_v5_MissionsDto.optional(),
|
|
904
|
+
neutralMinionsKilled: z.number().int(),
|
|
905
|
+
needVisionPings: z.number().int().optional(),
|
|
906
|
+
nexusKills: z.number().int(),
|
|
907
|
+
nexusTakedowns: z.number().int().optional(),
|
|
908
|
+
nexusLost: z.number().int().optional(),
|
|
909
|
+
objectivesStolen: z.number().int(),
|
|
910
|
+
objectivesStolenAssists: z.number().int(),
|
|
911
|
+
onMyWayPings: z.number().int().optional(),
|
|
912
|
+
participantId: z.number().int(),
|
|
913
|
+
playerScore0: z.number().optional(),
|
|
914
|
+
playerScore1: z.number().optional(),
|
|
915
|
+
playerScore2: z.number().optional(),
|
|
916
|
+
playerScore3: z.number().optional(),
|
|
917
|
+
playerScore4: z.number().optional(),
|
|
918
|
+
playerScore5: z.number().optional(),
|
|
919
|
+
playerScore6: z.number().optional(),
|
|
920
|
+
playerScore7: z.number().optional(),
|
|
921
|
+
playerScore8: z.number().optional(),
|
|
922
|
+
playerScore9: z.number().optional(),
|
|
923
|
+
playerScore10: z.number().optional(),
|
|
924
|
+
playerScore11: z.number().optional(),
|
|
925
|
+
pentaKills: z.number().int(),
|
|
926
|
+
perks: match_v5_PerksDto,
|
|
927
|
+
physicalDamageDealt: z.number().int(),
|
|
928
|
+
physicalDamageDealtToChampions: z.number().int(),
|
|
929
|
+
physicalDamageTaken: z.number().int(),
|
|
930
|
+
placement: z.number().int().optional(),
|
|
931
|
+
playerAugment1: z.number().int().optional(),
|
|
932
|
+
playerAugment2: z.number().int().optional(),
|
|
933
|
+
playerAugment3: z.number().int().optional(),
|
|
934
|
+
playerAugment4: z.number().int().optional(),
|
|
935
|
+
playerSubteamId: z.number().int().optional(),
|
|
936
|
+
pushPings: z.number().int().optional(),
|
|
937
|
+
profileIcon: z.number().int(),
|
|
938
|
+
puuid: z.string(),
|
|
939
|
+
quadraKills: z.number().int(),
|
|
940
|
+
riotIdGameName: z.string().optional(),
|
|
941
|
+
riotIdTagline: z.string().optional(),
|
|
942
|
+
role: z.string(),
|
|
943
|
+
sightWardsBoughtInGame: z.number().int(),
|
|
944
|
+
spell1Casts: z.number().int(),
|
|
945
|
+
spell2Casts: z.number().int(),
|
|
946
|
+
spell3Casts: z.number().int(),
|
|
947
|
+
spell4Casts: z.number().int(),
|
|
948
|
+
subteamPlacement: z.number().int().optional(),
|
|
949
|
+
summoner1Casts: z.number().int(),
|
|
950
|
+
summoner1Id: z.number().int(),
|
|
951
|
+
summoner2Casts: z.number().int(),
|
|
952
|
+
summoner2Id: z.number().int(),
|
|
953
|
+
summonerId: z.string(),
|
|
954
|
+
summonerLevel: z.number().int(),
|
|
955
|
+
summonerName: z.string(),
|
|
956
|
+
teamEarlySurrendered: z.boolean(),
|
|
957
|
+
teamId: z.number().int(),
|
|
958
|
+
teamPosition: z.string(),
|
|
959
|
+
timeCCingOthers: z.number().int(),
|
|
960
|
+
timePlayed: z.number().int(),
|
|
961
|
+
totalAllyJungleMinionsKilled: z.number().int().optional(),
|
|
962
|
+
totalDamageDealt: z.number().int(),
|
|
963
|
+
totalDamageDealtToChampions: z.number().int(),
|
|
964
|
+
totalDamageShieldedOnTeammates: z.number().int(),
|
|
965
|
+
totalDamageTaken: z.number().int(),
|
|
966
|
+
totalEnemyJungleMinionsKilled: z.number().int().optional(),
|
|
967
|
+
totalHeal: z.number().int(),
|
|
968
|
+
totalHealsOnTeammates: z.number().int(),
|
|
969
|
+
totalMinionsKilled: z.number().int(),
|
|
970
|
+
totalTimeCCDealt: z.number().int(),
|
|
971
|
+
totalTimeSpentDead: z.number().int(),
|
|
972
|
+
totalUnitsHealed: z.number().int(),
|
|
973
|
+
tripleKills: z.number().int(),
|
|
974
|
+
trueDamageDealt: z.number().int(),
|
|
975
|
+
trueDamageDealtToChampions: z.number().int(),
|
|
976
|
+
trueDamageTaken: z.number().int(),
|
|
977
|
+
turretKills: z.number().int(),
|
|
978
|
+
turretTakedowns: z.number().int().optional(),
|
|
979
|
+
turretsLost: z.number().int().optional(),
|
|
980
|
+
unrealKills: z.number().int(),
|
|
981
|
+
visionScore: z.number().int(),
|
|
982
|
+
visionClearedPings: z.number().int().optional(),
|
|
983
|
+
visionWardsBoughtInGame: z.number().int(),
|
|
984
|
+
wardsKilled: z.number().int(),
|
|
985
|
+
wardsPlaced: z.number().int(),
|
|
986
|
+
win: z.boolean(),
|
|
987
|
+
baitPings: z.number().int().optional(),
|
|
988
|
+
dangerPings: z.number().int().optional(),
|
|
989
|
+
basicPings: z.number().int().optional(),
|
|
990
|
+
playerAugment5: z.number().int().optional(),
|
|
991
|
+
playerAugment6: z.number().int().optional(),
|
|
992
|
+
riotIdName: z.string().optional(),
|
|
993
|
+
retreatPings: z.number().int().optional(),
|
|
994
|
+
championSkinId: z.number().int().optional(),
|
|
995
|
+
})
|
|
996
|
+
.passthrough();
|
|
997
|
+
const match_v5_BanDto: z.ZodType<match_v5_BanDto> = z
|
|
998
|
+
.object({ championId: z.number().int(), pickTurn: z.number().int() })
|
|
999
|
+
.passthrough();
|
|
1000
|
+
const match_v5_ObjectiveDto: z.ZodType<match_v5_ObjectiveDto> = z
|
|
1001
|
+
.object({ first: z.boolean(), kills: z.number().int() })
|
|
1002
|
+
.passthrough();
|
|
1003
|
+
const match_v5_ObjectivesDto: z.ZodType<match_v5_ObjectivesDto> = z
|
|
1004
|
+
.object({
|
|
1005
|
+
baron: match_v5_ObjectiveDto,
|
|
1006
|
+
champion: match_v5_ObjectiveDto,
|
|
1007
|
+
dragon: match_v5_ObjectiveDto,
|
|
1008
|
+
horde: match_v5_ObjectiveDto.optional(),
|
|
1009
|
+
inhibitor: match_v5_ObjectiveDto,
|
|
1010
|
+
riftHerald: match_v5_ObjectiveDto,
|
|
1011
|
+
tower: match_v5_ObjectiveDto,
|
|
1012
|
+
atakhan: match_v5_ObjectiveDto.optional(),
|
|
1013
|
+
})
|
|
1014
|
+
.passthrough();
|
|
1015
|
+
const match_v5_FeatDto: z.ZodType<match_v5_FeatDto> = z
|
|
1016
|
+
.object({ featState: z.number().int() })
|
|
1017
|
+
.partial()
|
|
1018
|
+
.passthrough();
|
|
1019
|
+
const match_v5_FeatsDto: z.ZodType<match_v5_FeatsDto> = z
|
|
1020
|
+
.object({
|
|
1021
|
+
EPIC_MONSTER_KILL: match_v5_FeatDto,
|
|
1022
|
+
FIRST_BLOOD: match_v5_FeatDto,
|
|
1023
|
+
FIRST_TURRET: match_v5_FeatDto,
|
|
1024
|
+
})
|
|
1025
|
+
.partial()
|
|
1026
|
+
.passthrough();
|
|
1027
|
+
const match_v5_TeamDto: z.ZodType<match_v5_TeamDto> = z
|
|
1028
|
+
.object({
|
|
1029
|
+
bans: z.array(match_v5_BanDto),
|
|
1030
|
+
objectives: match_v5_ObjectivesDto,
|
|
1031
|
+
teamId: z.number().int(),
|
|
1032
|
+
win: z.boolean(),
|
|
1033
|
+
feats: match_v5_FeatsDto.optional(),
|
|
1034
|
+
})
|
|
1035
|
+
.passthrough();
|
|
1036
|
+
const match_v5_InfoDto: z.ZodType<match_v5_InfoDto> = z
|
|
1037
|
+
.object({
|
|
1038
|
+
endOfGameResult: z.string().optional(),
|
|
1039
|
+
gameCreation: z.number().int(),
|
|
1040
|
+
gameDuration: z.number().int(),
|
|
1041
|
+
gameEndTimestamp: z.number().int().optional(),
|
|
1042
|
+
gameId: z.number().int(),
|
|
1043
|
+
gameMode: z.string(),
|
|
1044
|
+
gameName: z.string(),
|
|
1045
|
+
gameStartTimestamp: z.number().int(),
|
|
1046
|
+
gameType: z.string(),
|
|
1047
|
+
gameVersion: z.string(),
|
|
1048
|
+
mapId: z.number().int(),
|
|
1049
|
+
participants: z.array(match_v5_ParticipantDto),
|
|
1050
|
+
platformId: z.string(),
|
|
1051
|
+
queueId: z.number().int(),
|
|
1052
|
+
teams: z.array(match_v5_TeamDto),
|
|
1053
|
+
tournamentCode: z.string().optional(),
|
|
1054
|
+
gameModeMutators: z.array(z.string()).optional(),
|
|
1055
|
+
})
|
|
1056
|
+
.passthrough();
|
|
1057
|
+
const match_v5_MatchDto: z.ZodType<match_v5_MatchDto> = z
|
|
1058
|
+
.object({ metadata: match_v5_MetadataDto, info: match_v5_InfoDto })
|
|
1059
|
+
.passthrough();
|
|
1060
|
+
const league_v4_LeagueListDTO: z.ZodType<league_v4_LeagueListDTO> = z
|
|
1061
|
+
.object({
|
|
1062
|
+
leagueId: z.string().optional(),
|
|
1063
|
+
entries: z.array(league_v4_LeagueItemDTO),
|
|
1064
|
+
tier: z.string(),
|
|
1065
|
+
name: z.string().optional(),
|
|
1066
|
+
queue: z.string(),
|
|
1067
|
+
})
|
|
1068
|
+
.passthrough();
|
|
1069
|
+
|
|
1070
|
+
export const schemas = {
|
|
1071
|
+
league_v4_MiniSeriesDTO,
|
|
1072
|
+
league_v4_LeagueEntryDTO,
|
|
1073
|
+
spectator_v5_BannedChampion,
|
|
1074
|
+
spectator_v5_Observer,
|
|
1075
|
+
spectator_v5_Perks,
|
|
1076
|
+
spectator_v5_GameCustomizationObject,
|
|
1077
|
+
spectator_v5_CurrentGameParticipant,
|
|
1078
|
+
spectator_v5_CurrentGameInfo,
|
|
1079
|
+
AccountInfo,
|
|
1080
|
+
validationError,
|
|
1081
|
+
simpleError,
|
|
1082
|
+
simpleInternalError,
|
|
1083
|
+
league_v4_LeagueItemDTO,
|
|
1084
|
+
LeagueDetails,
|
|
1085
|
+
match_v5_MetadataDto,
|
|
1086
|
+
match_v5_ChallengesDto,
|
|
1087
|
+
match_v5_MissionsDto,
|
|
1088
|
+
match_v5_PerkStatsDto,
|
|
1089
|
+
match_v5_PerkStyleSelectionDto,
|
|
1090
|
+
match_v5_PerkStyleDto,
|
|
1091
|
+
match_v5_PerksDto,
|
|
1092
|
+
match_v5_ParticipantDto,
|
|
1093
|
+
match_v5_BanDto,
|
|
1094
|
+
match_v5_ObjectiveDto,
|
|
1095
|
+
match_v5_ObjectivesDto,
|
|
1096
|
+
match_v5_FeatDto,
|
|
1097
|
+
match_v5_FeatsDto,
|
|
1098
|
+
match_v5_TeamDto,
|
|
1099
|
+
match_v5_InfoDto,
|
|
1100
|
+
match_v5_MatchDto,
|
|
1101
|
+
league_v4_LeagueListDTO,
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
const endpoints = makeApi([
|
|
1105
|
+
{
|
|
1106
|
+
method: "get",
|
|
1107
|
+
path: "/account/:region/:puuid",
|
|
1108
|
+
alias: "getAccountRegionPuuid",
|
|
1109
|
+
description: `Retrieve Riot account details using the encrypted summoner ID for a specific region`,
|
|
1110
|
+
requestFormat: "json",
|
|
1111
|
+
parameters: [
|
|
1112
|
+
{
|
|
1113
|
+
name: "region",
|
|
1114
|
+
type: "Path",
|
|
1115
|
+
schema: z.string(),
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
name: "puuid",
|
|
1119
|
+
type: "Path",
|
|
1120
|
+
schema: z.string(),
|
|
1121
|
+
},
|
|
1122
|
+
],
|
|
1123
|
+
response: AccountInfo,
|
|
1124
|
+
errors: [
|
|
1125
|
+
{
|
|
1126
|
+
status: 400,
|
|
1127
|
+
description: `Bad Request - Invalid input parameters`,
|
|
1128
|
+
schema: validationError,
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
status: 404,
|
|
1132
|
+
description: `Not Found - Account not found for the given parameters`,
|
|
1133
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
status: 500,
|
|
1137
|
+
description: `Internal Server Error - An unexpected error occurred`,
|
|
1138
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1139
|
+
},
|
|
1140
|
+
],
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
method: "get",
|
|
1144
|
+
path: "/account/:region/:summonerName/:tagLine",
|
|
1145
|
+
alias: "getAccountRegionSummonerNameTagLine",
|
|
1146
|
+
description: `Retrieve Riot account details using the summoner name and tag line for a specific region`,
|
|
1147
|
+
requestFormat: "json",
|
|
1148
|
+
parameters: [
|
|
1149
|
+
{
|
|
1150
|
+
name: "region",
|
|
1151
|
+
type: "Path",
|
|
1152
|
+
schema: z.string(),
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
name: "summonerName",
|
|
1156
|
+
type: "Path",
|
|
1157
|
+
schema: z.string(),
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
name: "tagLine",
|
|
1161
|
+
type: "Path",
|
|
1162
|
+
schema: z.string(),
|
|
1163
|
+
},
|
|
1164
|
+
],
|
|
1165
|
+
response: AccountInfo,
|
|
1166
|
+
errors: [
|
|
1167
|
+
{
|
|
1168
|
+
status: 400,
|
|
1169
|
+
description: `Bad Request - Invalid input parameters`,
|
|
1170
|
+
schema: validationError,
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
status: 404,
|
|
1174
|
+
description: `Not Found - Account not found for the given parameters`,
|
|
1175
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
status: 500,
|
|
1179
|
+
description: `Internal Server Error - An unexpected error occurred`,
|
|
1180
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1181
|
+
},
|
|
1182
|
+
],
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
method: "get",
|
|
1186
|
+
path: "/leagues/:region/:queue/:tier/:division",
|
|
1187
|
+
alias: "getLeaguesRegionQueueTierDivision",
|
|
1188
|
+
description: `Retrieve Riot league entries for a specific region, queue type, tier, and division`,
|
|
1189
|
+
requestFormat: "json",
|
|
1190
|
+
parameters: [
|
|
1191
|
+
{
|
|
1192
|
+
name: "region",
|
|
1193
|
+
type: "Path",
|
|
1194
|
+
schema: z.string(),
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
name: "queue",
|
|
1198
|
+
type: "Path",
|
|
1199
|
+
schema: z.string(),
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
name: "tier",
|
|
1203
|
+
type: "Path",
|
|
1204
|
+
schema: z.string(),
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
name: "division",
|
|
1208
|
+
type: "Path",
|
|
1209
|
+
schema: z.string(),
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
name: "count",
|
|
1213
|
+
type: "Query",
|
|
1214
|
+
schema: z.number().int().optional(),
|
|
1215
|
+
},
|
|
1216
|
+
],
|
|
1217
|
+
response: z.array(LeagueDetails),
|
|
1218
|
+
errors: [
|
|
1219
|
+
{
|
|
1220
|
+
status: 400,
|
|
1221
|
+
description: `Bad Request - Invalid input parameters`,
|
|
1222
|
+
schema: validationError,
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
status: 500,
|
|
1226
|
+
description: `Internal Server Error - An unexpected error occurred while processing the request.`,
|
|
1227
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1228
|
+
},
|
|
1229
|
+
],
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
method: "get",
|
|
1233
|
+
path: "/matches/:region/:puuid",
|
|
1234
|
+
alias: "getMatchesRegionPuuid",
|
|
1235
|
+
description: `Retrieve a list of Riot match details for a specific player using their encrypted PUUID and region`,
|
|
1236
|
+
requestFormat: "json",
|
|
1237
|
+
parameters: [
|
|
1238
|
+
{
|
|
1239
|
+
name: "region",
|
|
1240
|
+
type: "Path",
|
|
1241
|
+
schema: z.string(),
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
name: "puuid",
|
|
1245
|
+
type: "Path",
|
|
1246
|
+
schema: z.string(),
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
name: "start",
|
|
1250
|
+
type: "Query",
|
|
1251
|
+
schema: z.number().int().gte(0).optional().default(0),
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
name: "count",
|
|
1255
|
+
type: "Query",
|
|
1256
|
+
schema: z.number().int().gte(1).optional().default(10),
|
|
1257
|
+
},
|
|
1258
|
+
],
|
|
1259
|
+
response: z.array(match_v5_MatchDto),
|
|
1260
|
+
errors: [
|
|
1261
|
+
{
|
|
1262
|
+
status: 400,
|
|
1263
|
+
description: `Bad Request - Invalid input parameters`,
|
|
1264
|
+
schema: validationError,
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
status: 404,
|
|
1268
|
+
description: `Not Found - No matches found for the given parameters`,
|
|
1269
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
status: 500,
|
|
1273
|
+
description: `Internal Server Error - Failed to retrieve match details for the specified parameters.`,
|
|
1274
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1275
|
+
},
|
|
1276
|
+
],
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
method: "get",
|
|
1280
|
+
path: "/matches/match-ids/:region/:puuid",
|
|
1281
|
+
alias: "getMatchesmatchIdsRegionPuuid",
|
|
1282
|
+
description: `Retrieve a list of Riot match IDs for a specific player using their encrypted PUUID and region`,
|
|
1283
|
+
requestFormat: "json",
|
|
1284
|
+
parameters: [
|
|
1285
|
+
{
|
|
1286
|
+
name: "region",
|
|
1287
|
+
type: "Path",
|
|
1288
|
+
schema: z.string(),
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
name: "puuid",
|
|
1292
|
+
type: "Path",
|
|
1293
|
+
schema: z.string(),
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
name: "start",
|
|
1297
|
+
type: "Query",
|
|
1298
|
+
schema: z.number().int().gte(0).optional().default(0),
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
name: "count",
|
|
1302
|
+
type: "Query",
|
|
1303
|
+
schema: z.number().int().gte(1).optional().default(10),
|
|
1304
|
+
},
|
|
1305
|
+
],
|
|
1306
|
+
response: z.array(z.string()),
|
|
1307
|
+
errors: [
|
|
1308
|
+
{
|
|
1309
|
+
status: 400,
|
|
1310
|
+
description: `Bad Request - Invalid input parameters`,
|
|
1311
|
+
schema: validationError,
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
status: 404,
|
|
1315
|
+
description: `Not Found - No matches found for the given parameters`,
|
|
1316
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
status: 500,
|
|
1320
|
+
description: `Internal Server Error - Failed to retrieve match IDs for the specified parameters.`,
|
|
1321
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1322
|
+
},
|
|
1323
|
+
],
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
method: "get",
|
|
1327
|
+
path: "/matches/match/:region/:matchId",
|
|
1328
|
+
alias: "getMatchesmatchRegionMatchId",
|
|
1329
|
+
description: `Retrieve Riot match details using the match ID for a specific region`,
|
|
1330
|
+
requestFormat: "json",
|
|
1331
|
+
parameters: [
|
|
1332
|
+
{
|
|
1333
|
+
name: "region",
|
|
1334
|
+
type: "Path",
|
|
1335
|
+
schema: z.string(),
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
name: "matchId",
|
|
1339
|
+
type: "Path",
|
|
1340
|
+
schema: z.string(),
|
|
1341
|
+
},
|
|
1342
|
+
],
|
|
1343
|
+
response: match_v5_MatchDto,
|
|
1344
|
+
errors: [
|
|
1345
|
+
{
|
|
1346
|
+
status: 400,
|
|
1347
|
+
description: `Bad Request - Invalid input parameters`,
|
|
1348
|
+
schema: validationError,
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
status: 404,
|
|
1352
|
+
description: `Not Found - Match not found for the given parameters`,
|
|
1353
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
status: 500,
|
|
1357
|
+
description: `Internal Server Error - Failed to retrieve match details for the specified parameters.`,
|
|
1358
|
+
schema: z.object({ message: z.string() }).passthrough(),
|
|
1359
|
+
},
|
|
1360
|
+
],
|
|
1361
|
+
},
|
|
1362
|
+
]);
|
|
1363
|
+
|
|
1364
|
+
export const api = new Zodios(endpoints);
|
|
1365
|
+
|
|
1366
|
+
export function createApiClient(baseUrl: string, options?: ZodiosOptions) {
|
|
1367
|
+
return new Zodios(baseUrl, endpoints, options);
|
|
1368
|
+
}
|