@voxary/valorant-client 0.2.0 → 0.3.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/LICENSE +21 -21
- package/README.md +7 -5
- package/dist/index.cjs +1660 -882
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27795 -2395
- package/dist/index.d.ts +27795 -2395
- package/dist/index.js +1644 -875
- package/dist/index.js.map +1 -1
- package/package.json +72 -69
package/dist/index.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
// src/api/groups/pvp.ts
|
|
2
|
-
import { endpoints as
|
|
2
|
+
import { endpoints as e10 } from "valorant-api-types";
|
|
3
3
|
|
|
4
4
|
// src/endpoints/riot/account.ts
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
// src/endpoints/riot/shared.ts
|
|
8
8
|
var player = { token: true, entitlement: true, clientVersion: true, clientPlatform: true };
|
|
9
|
+
function withResponse(endpoint2, schema) {
|
|
10
|
+
return { ...endpoint2, responses: { "200": schema } };
|
|
11
|
+
}
|
|
12
|
+
function onSharedHost(endpoint2) {
|
|
13
|
+
return { ...endpoint2, type: "shared" };
|
|
14
|
+
}
|
|
9
15
|
|
|
10
16
|
// src/endpoints/riot/account.ts
|
|
11
17
|
var dailyTicketEndpoint = {
|
|
@@ -288,8 +294,105 @@ var bloomlinePlayerEndpoint = {
|
|
|
288
294
|
}) }
|
|
289
295
|
};
|
|
290
296
|
|
|
291
|
-
// src/endpoints/riot/
|
|
297
|
+
// src/endpoints/riot/agentSelect.ts
|
|
298
|
+
import { endpoints as e } from "valorant-api-types";
|
|
292
299
|
import { z as z2 } from "zod";
|
|
300
|
+
var agentSelect = z2.object({
|
|
301
|
+
ID: z2.string(),
|
|
302
|
+
Version: z2.number(),
|
|
303
|
+
Teams: z2.array(z2.object({
|
|
304
|
+
TeamID: z2.string(),
|
|
305
|
+
TeamNumber: z2.number(),
|
|
306
|
+
Players: z2.array(z2.object({
|
|
307
|
+
Subject: z2.string(),
|
|
308
|
+
CharacterID: z2.string(),
|
|
309
|
+
CharacterSelectionState: z2.string(),
|
|
310
|
+
PregamePlayerState: z2.string(),
|
|
311
|
+
CompetitiveTier: z2.number(),
|
|
312
|
+
PlayerIdentity: z2.object({
|
|
313
|
+
Subject: z2.string(),
|
|
314
|
+
PlayerCardID: z2.string(),
|
|
315
|
+
PlayerTitleID: z2.string(),
|
|
316
|
+
AccountLevel: z2.number(),
|
|
317
|
+
PreferredLevelBorderID: z2.string(),
|
|
318
|
+
Incognito: z2.boolean(),
|
|
319
|
+
HideAccountLevel: z2.boolean()
|
|
320
|
+
}),
|
|
321
|
+
SeasonalBadgeInfo: z2.object({
|
|
322
|
+
SeasonID: z2.string(),
|
|
323
|
+
NumberOfWins: z2.number(),
|
|
324
|
+
Rank: z2.number(),
|
|
325
|
+
LeaderboardRank: z2.number()
|
|
326
|
+
}),
|
|
327
|
+
IsCaptain: z2.boolean(),
|
|
328
|
+
PlatformType: z2.string(),
|
|
329
|
+
PremierPrestige: z2.object({})
|
|
330
|
+
}))
|
|
331
|
+
})),
|
|
332
|
+
AllyTeam: z2.object({
|
|
333
|
+
TeamID: z2.string(),
|
|
334
|
+
TeamNumber: z2.number(),
|
|
335
|
+
Players: z2.array(z2.object({
|
|
336
|
+
Subject: z2.string(),
|
|
337
|
+
CharacterID: z2.string(),
|
|
338
|
+
CharacterSelectionState: z2.string(),
|
|
339
|
+
PregamePlayerState: z2.string(),
|
|
340
|
+
CompetitiveTier: z2.number(),
|
|
341
|
+
PlayerIdentity: z2.object({
|
|
342
|
+
Subject: z2.string(),
|
|
343
|
+
PlayerCardID: z2.string(),
|
|
344
|
+
PlayerTitleID: z2.string(),
|
|
345
|
+
AccountLevel: z2.number(),
|
|
346
|
+
PreferredLevelBorderID: z2.string(),
|
|
347
|
+
Incognito: z2.boolean(),
|
|
348
|
+
HideAccountLevel: z2.boolean()
|
|
349
|
+
}),
|
|
350
|
+
SeasonalBadgeInfo: z2.object({
|
|
351
|
+
SeasonID: z2.string(),
|
|
352
|
+
NumberOfWins: z2.number(),
|
|
353
|
+
Rank: z2.number(),
|
|
354
|
+
LeaderboardRank: z2.number()
|
|
355
|
+
}),
|
|
356
|
+
IsCaptain: z2.boolean(),
|
|
357
|
+
PlatformType: z2.string(),
|
|
358
|
+
PremierPrestige: z2.object({})
|
|
359
|
+
}))
|
|
360
|
+
}),
|
|
361
|
+
EnemyTeamSize: z2.number(),
|
|
362
|
+
EnemyTeamLockCount: z2.number(),
|
|
363
|
+
PregameState: z2.string(),
|
|
364
|
+
LastUpdated: z2.string(),
|
|
365
|
+
MapID: z2.string(),
|
|
366
|
+
CastedVotes: z2.object({}),
|
|
367
|
+
MapSelectStep: z2.number(),
|
|
368
|
+
Team1: z2.string(),
|
|
369
|
+
GamePodID: z2.string(),
|
|
370
|
+
Mode: z2.string(),
|
|
371
|
+
VoiceSessionID: z2.string(),
|
|
372
|
+
MUCName: z2.string(),
|
|
373
|
+
TeamMatchToken: z2.string(),
|
|
374
|
+
QueueID: z2.string(),
|
|
375
|
+
ProvisioningFlowID: z2.string(),
|
|
376
|
+
IsRanked: z2.boolean(),
|
|
377
|
+
PhaseTimeRemainingNS: z2.number(),
|
|
378
|
+
StepTimeRemainingNS: z2.number(),
|
|
379
|
+
altModesFlagADA: z2.boolean(),
|
|
380
|
+
GameRules: z2.object({
|
|
381
|
+
AccoladesEnabled: z2.string(),
|
|
382
|
+
AllowGameModifiers: z2.string(),
|
|
383
|
+
IsOvertimeWinByTwo: z2.string(),
|
|
384
|
+
PlayOutAllRounds: z2.string(),
|
|
385
|
+
ReplayRecordMatch: z2.string(),
|
|
386
|
+
SkipMatchHistory: z2.string(),
|
|
387
|
+
TournamentMode: z2.string()
|
|
388
|
+
})
|
|
389
|
+
});
|
|
390
|
+
var selectCharacterEndpoint = withResponse(e.selectCharacterEndpoint, agentSelect);
|
|
391
|
+
var lockCharacterEndpoint = withResponse(e.lockCharacterEndpoint, agentSelect);
|
|
392
|
+
|
|
393
|
+
// src/endpoints/riot/chat.ts
|
|
394
|
+
import { endpoints as e2 } from "valorant-api-types";
|
|
395
|
+
import { z as z3 } from "zod";
|
|
293
396
|
var chatSettingsEndpoint = {
|
|
294
397
|
name: "Settings",
|
|
295
398
|
description: "Get chat settings",
|
|
@@ -297,37 +400,37 @@ var chatSettingsEndpoint = {
|
|
|
297
400
|
type: "local",
|
|
298
401
|
suffix: "chat/v1/settings",
|
|
299
402
|
riotRequirements: { localAuth: true },
|
|
300
|
-
responses: { "200":
|
|
301
|
-
bounceDockIconEnabled:
|
|
302
|
-
"chat-status-message":
|
|
303
|
-
chatFilterDisabled:
|
|
304
|
-
chatGBG:
|
|
305
|
-
chatGroupDiscord:
|
|
306
|
-
chatGroupMobile:
|
|
307
|
-
chatGroupOffline:
|
|
308
|
-
chatWindow:
|
|
309
|
-
detached:
|
|
310
|
-
height:
|
|
311
|
-
left:
|
|
312
|
-
top:
|
|
313
|
-
width:
|
|
403
|
+
responses: { "200": z3.object({
|
|
404
|
+
bounceDockIconEnabled: z3.boolean(),
|
|
405
|
+
"chat-status-message": z3.string(),
|
|
406
|
+
chatFilterDisabled: z3.boolean(),
|
|
407
|
+
chatGBG: z3.boolean(),
|
|
408
|
+
chatGroupDiscord: z3.boolean(),
|
|
409
|
+
chatGroupMobile: z3.boolean(),
|
|
410
|
+
chatGroupOffline: z3.boolean(),
|
|
411
|
+
chatWindow: z3.object({
|
|
412
|
+
detached: z3.boolean(),
|
|
413
|
+
height: z3.number(),
|
|
414
|
+
left: z3.number(),
|
|
415
|
+
top: z3.number(),
|
|
416
|
+
width: z3.number()
|
|
314
417
|
}),
|
|
315
|
-
chatWindowDockedHeight:
|
|
316
|
-
"closed-conversations":
|
|
317
|
-
"ff822fdf-71a3-54ac-814e-7ac752ba428d@eu1.pvp.net":
|
|
418
|
+
chatWindowDockedHeight: z3.number(),
|
|
419
|
+
"closed-conversations": z3.object({
|
|
420
|
+
"ff822fdf-71a3-54ac-814e-7ac752ba428d@eu1.pvp.net": z3.number()
|
|
318
421
|
}),
|
|
319
|
-
friendRequestToastsDisabled:
|
|
320
|
-
"hidden-conversations":
|
|
321
|
-
linkClickWarningEnabled:
|
|
322
|
-
messageNotificationsEnabled:
|
|
323
|
-
moreUnreadsEnabled:
|
|
324
|
-
"muted-conversations":
|
|
325
|
-
recentlyPlayedFirstOpen:
|
|
326
|
-
recentlyPlayedOpen:
|
|
327
|
-
"roster-group-collapsed":
|
|
328
|
-
showWhenTypingEnabled:
|
|
329
|
-
sortBy:
|
|
330
|
-
usePlayerPreferences:
|
|
422
|
+
friendRequestToastsDisabled: z3.boolean(),
|
|
423
|
+
"hidden-conversations": z3.object({}),
|
|
424
|
+
linkClickWarningEnabled: z3.boolean(),
|
|
425
|
+
messageNotificationsEnabled: z3.boolean(),
|
|
426
|
+
moreUnreadsEnabled: z3.boolean(),
|
|
427
|
+
"muted-conversations": z3.object({}),
|
|
428
|
+
recentlyPlayedFirstOpen: z3.boolean(),
|
|
429
|
+
recentlyPlayedOpen: z3.boolean(),
|
|
430
|
+
"roster-group-collapsed": z3.object({}),
|
|
431
|
+
showWhenTypingEnabled: z3.boolean(),
|
|
432
|
+
sortBy: z3.string(),
|
|
433
|
+
usePlayerPreferences: z3.boolean()
|
|
331
434
|
}) }
|
|
332
435
|
};
|
|
333
436
|
var chatTournamentInfoEndpoint = {
|
|
@@ -337,11 +440,26 @@ var chatTournamentInfoEndpoint = {
|
|
|
337
440
|
type: "local",
|
|
338
441
|
suffix: "chat/v6/conversations/ares-tournaments",
|
|
339
442
|
riotRequirements: { localAuth: true },
|
|
340
|
-
responses: { "200":
|
|
341
|
-
};
|
|
443
|
+
responses: { "200": z3.object({}) }
|
|
444
|
+
};
|
|
445
|
+
var chatParticipantsEndpoint = withResponse(e2.chatParticipantsEndpoint, z3.object({
|
|
446
|
+
participants: z3.array(z3.object({
|
|
447
|
+
activePlatform: z3.string().nullable(),
|
|
448
|
+
cid: z3.string(),
|
|
449
|
+
game_name: z3.string(),
|
|
450
|
+
game_tag: z3.string(),
|
|
451
|
+
isInteractionAllowed: z3.boolean(),
|
|
452
|
+
muted: z3.boolean(),
|
|
453
|
+
name: z3.string(),
|
|
454
|
+
pid: z3.string(),
|
|
455
|
+
puuid: z3.string(),
|
|
456
|
+
region: z3.string()
|
|
457
|
+
}))
|
|
458
|
+
}));
|
|
342
459
|
|
|
343
460
|
// src/endpoints/riot/contracts.ts
|
|
344
|
-
import {
|
|
461
|
+
import { endpoints as e3 } from "valorant-api-types";
|
|
462
|
+
import { z as z4 } from "zod";
|
|
345
463
|
var activeRecruitmentEventEndpoint = {
|
|
346
464
|
name: "Active Recruitment Event",
|
|
347
465
|
description: "The current agent recruitment event.",
|
|
@@ -349,29 +467,90 @@ var activeRecruitmentEventEndpoint = {
|
|
|
349
467
|
type: "pd",
|
|
350
468
|
suffix: "contracts/v1/agents/activeRecruitmentEvent",
|
|
351
469
|
riotRequirements: player,
|
|
352
|
-
responses: { "200":
|
|
353
|
-
AgentID:
|
|
354
|
-
CounterID:
|
|
355
|
-
MilestoneThreshold:
|
|
356
|
-
StartDate:
|
|
357
|
-
EndDate:
|
|
358
|
-
IsActive:
|
|
359
|
-
includedPlatforms:
|
|
360
|
-
console:
|
|
361
|
-
developmentOnly:
|
|
470
|
+
responses: { "200": z4.object({
|
|
471
|
+
AgentID: z4.string(),
|
|
472
|
+
CounterID: z4.string(),
|
|
473
|
+
MilestoneThreshold: z4.number(),
|
|
474
|
+
StartDate: z4.string(),
|
|
475
|
+
EndDate: z4.string(),
|
|
476
|
+
IsActive: z4.boolean(),
|
|
477
|
+
includedPlatforms: z4.object({
|
|
478
|
+
console: z4.object({
|
|
479
|
+
developmentOnly: z4.boolean()
|
|
362
480
|
}),
|
|
363
|
-
mobile:
|
|
364
|
-
developmentOnly:
|
|
481
|
+
mobile: z4.object({
|
|
482
|
+
developmentOnly: z4.boolean()
|
|
365
483
|
}),
|
|
366
|
-
pc:
|
|
367
|
-
developmentOnly:
|
|
484
|
+
pc: z4.object({
|
|
485
|
+
developmentOnly: z4.boolean()
|
|
368
486
|
})
|
|
369
487
|
})
|
|
370
488
|
}) }
|
|
371
489
|
};
|
|
490
|
+
var contractsEndpoint = withResponse(e3.contractsEndpoint, z4.object({
|
|
491
|
+
Version: z4.number(),
|
|
492
|
+
Subject: z4.string(),
|
|
493
|
+
Contracts: z4.array(z4.object({
|
|
494
|
+
ContractDefinitionID: z4.string(),
|
|
495
|
+
ContractProgression: z4.object({
|
|
496
|
+
Version: z4.number(),
|
|
497
|
+
TotalProgressionEarned: z4.number()
|
|
498
|
+
}),
|
|
499
|
+
ProgressionLevelReached: z4.number(),
|
|
500
|
+
ProgressionTowardsNextLevel: z4.number()
|
|
501
|
+
})),
|
|
502
|
+
ActiveRecruitmentEventProgress: z4.object({
|
|
503
|
+
AgentID: z4.string(),
|
|
504
|
+
Version: z4.number(),
|
|
505
|
+
CounterID: z4.string(),
|
|
506
|
+
ProgressionEarned: z4.number()
|
|
507
|
+
}),
|
|
508
|
+
Missions: z4.array(z4.object({
|
|
509
|
+
ID: z4.string(),
|
|
510
|
+
Objectives: z4.record(z4.string(), z4.number()),
|
|
511
|
+
Complete: z4.boolean(),
|
|
512
|
+
ExpirationTime: z4.string()
|
|
513
|
+
})),
|
|
514
|
+
MissionMetadata: z4.object({
|
|
515
|
+
WeeklyCheckpoint: z4.string(),
|
|
516
|
+
WeeklyRefillTime: z4.string()
|
|
517
|
+
}),
|
|
518
|
+
BTEMilestone: z4.number()
|
|
519
|
+
}));
|
|
520
|
+
|
|
521
|
+
// src/endpoints/riot/currentGame.ts
|
|
522
|
+
import { endpoints as e4 } from "valorant-api-types";
|
|
523
|
+
import { z as z5 } from "zod";
|
|
524
|
+
var currentGameLoadoutsEndpoint = withResponse(e4.currentGameLoadoutsEndpoint, z5.object({
|
|
525
|
+
Loadouts: z5.array(z5.object({
|
|
526
|
+
CharacterID: z5.string(),
|
|
527
|
+
Loadout: z5.object({
|
|
528
|
+
Subject: z5.string(),
|
|
529
|
+
Expressions: z5.object({
|
|
530
|
+
AESSelections: z5.array(z5.object({
|
|
531
|
+
AssetID: z5.string(),
|
|
532
|
+
TypeID: z5.string()
|
|
533
|
+
}))
|
|
534
|
+
}),
|
|
535
|
+
DynamicOptions: z5.object({}),
|
|
536
|
+
Items: z5.record(z5.string(), z5.object({
|
|
537
|
+
ID: z5.string(),
|
|
538
|
+
TypeID: z5.string(),
|
|
539
|
+
Sockets: z5.record(z5.string(), z5.object({
|
|
540
|
+
ID: z5.string(),
|
|
541
|
+
Item: z5.object({
|
|
542
|
+
ID: z5.string(),
|
|
543
|
+
TypeID: z5.string()
|
|
544
|
+
})
|
|
545
|
+
}))
|
|
546
|
+
}))
|
|
547
|
+
}),
|
|
548
|
+
Subject: z5.string()
|
|
549
|
+
}))
|
|
550
|
+
}));
|
|
372
551
|
|
|
373
552
|
// src/endpoints/riot/esports.ts
|
|
374
|
-
import { z as
|
|
553
|
+
import { z as z6 } from "zod";
|
|
375
554
|
var esportsLiveEventTimesEndpoint = {
|
|
376
555
|
name: "Esports Live Event Times",
|
|
377
556
|
description: "Live and upcoming esports matches, pick blocks and tournaments.",
|
|
@@ -379,11 +558,11 @@ var esportsLiveEventTimesEndpoint = {
|
|
|
379
558
|
type: "pd",
|
|
380
559
|
suffix: "esports-service/v2/liveEventTimes",
|
|
381
560
|
riotRequirements: player,
|
|
382
|
-
responses: { "200":
|
|
383
|
-
Tournaments:
|
|
384
|
-
ID:
|
|
385
|
-
StartTimeUTC:
|
|
386
|
-
EndTimeUTC:
|
|
561
|
+
responses: { "200": z6.object({
|
|
562
|
+
Tournaments: z6.array(z6.object({
|
|
563
|
+
ID: z6.string(),
|
|
564
|
+
StartTimeUTC: z6.string(),
|
|
565
|
+
EndTimeUTC: z6.string()
|
|
387
566
|
}))
|
|
388
567
|
}) }
|
|
389
568
|
};
|
|
@@ -394,7 +573,7 @@ var esportsUpcomingMatchesEndpoint = {
|
|
|
394
573
|
type: "pd",
|
|
395
574
|
suffix: "esports-service/v2/upcomingMatches",
|
|
396
575
|
riotRequirements: player,
|
|
397
|
-
responses: { "200":
|
|
576
|
+
responses: { "200": z6.object({}) }
|
|
398
577
|
};
|
|
399
578
|
var esportsPickemLeaguesEndpoint = {
|
|
400
579
|
name: "Esports Pickem Leagues",
|
|
@@ -403,67 +582,67 @@ var esportsPickemLeaguesEndpoint = {
|
|
|
403
582
|
type: "pd",
|
|
404
583
|
suffix: "esports-service/v1/pickem/leagues",
|
|
405
584
|
riotRequirements: player,
|
|
406
|
-
responses: { "200":
|
|
407
|
-
PickemLeagues:
|
|
408
|
-
LeagueID:
|
|
409
|
-
EldsLeagueID:
|
|
410
|
-
Tournament:
|
|
411
|
-
ID:
|
|
412
|
-
EldsTournamentID:
|
|
413
|
-
LeagueID:
|
|
414
|
-
PickBlocks:
|
|
415
|
-
ID:
|
|
416
|
-
EldsTournamentID:
|
|
417
|
-
Slug:
|
|
418
|
-
Slug:
|
|
585
|
+
responses: { "200": z6.object({
|
|
586
|
+
PickemLeagues: z6.array(z6.object({
|
|
587
|
+
LeagueID: z6.string(),
|
|
588
|
+
EldsLeagueID: z6.string(),
|
|
589
|
+
Tournament: z6.object({
|
|
590
|
+
ID: z6.string(),
|
|
591
|
+
EldsTournamentID: z6.string(),
|
|
592
|
+
LeagueID: z6.string(),
|
|
593
|
+
PickBlocks: z6.array(z6.object({
|
|
594
|
+
ID: z6.string(),
|
|
595
|
+
EldsTournamentID: z6.string(),
|
|
596
|
+
Slug: z6.object({
|
|
597
|
+
Slug: z6.string()
|
|
419
598
|
}),
|
|
420
|
-
PickOpenTime:
|
|
421
|
-
PickCloseTime:
|
|
422
|
-
State:
|
|
423
|
-
OpenLevel:
|
|
424
|
-
BlockType:
|
|
425
|
-
PickBlockElements:
|
|
426
|
-
ID:
|
|
427
|
-
PickBlockID:
|
|
428
|
-
Section:
|
|
429
|
-
ID:
|
|
430
|
-
EldsSectionID:
|
|
431
|
-
CorrectPick:
|
|
432
|
-
Entries:
|
|
433
|
-
Index:
|
|
434
|
-
Correctness:
|
|
435
|
-
ParticipantID:
|
|
436
|
-
Points:
|
|
437
|
-
Rank:
|
|
599
|
+
PickOpenTime: z6.string(),
|
|
600
|
+
PickCloseTime: z6.string(),
|
|
601
|
+
State: z6.string(),
|
|
602
|
+
OpenLevel: z6.string(),
|
|
603
|
+
BlockType: z6.string(),
|
|
604
|
+
PickBlockElements: z6.array(z6.object({
|
|
605
|
+
ID: z6.string(),
|
|
606
|
+
PickBlockID: z6.string(),
|
|
607
|
+
Section: z6.object({
|
|
608
|
+
ID: z6.string(),
|
|
609
|
+
EldsSectionID: z6.string(),
|
|
610
|
+
CorrectPick: z6.object({
|
|
611
|
+
Entries: z6.array(z6.object({
|
|
612
|
+
Index: z6.number(),
|
|
613
|
+
Correctness: z6.string(),
|
|
614
|
+
ParticipantID: z6.string(),
|
|
615
|
+
Points: z6.number(),
|
|
616
|
+
Rank: z6.number()
|
|
438
617
|
})).nullable()
|
|
439
618
|
})
|
|
440
619
|
}),
|
|
441
|
-
Match:
|
|
442
|
-
ID:
|
|
443
|
-
EldsMatchID:
|
|
444
|
-
BaselinePoints:
|
|
445
|
-
CorrectPick:
|
|
446
|
-
ResultState:
|
|
620
|
+
Match: z6.object({
|
|
621
|
+
ID: z6.string(),
|
|
622
|
+
EldsMatchID: z6.string(),
|
|
623
|
+
BaselinePoints: z6.number(),
|
|
624
|
+
CorrectPick: z6.string(),
|
|
625
|
+
ResultState: z6.string()
|
|
447
626
|
}),
|
|
448
|
-
PickOpenTime:
|
|
449
|
-
PickCloseTime:
|
|
450
|
-
State:
|
|
451
|
-
DisplayOrder:
|
|
627
|
+
PickOpenTime: z6.string(),
|
|
628
|
+
PickCloseTime: z6.string(),
|
|
629
|
+
State: z6.string(),
|
|
630
|
+
DisplayOrder: z6.number()
|
|
452
631
|
})),
|
|
453
|
-
CompletionStatus:
|
|
632
|
+
CompletionStatus: z6.string()
|
|
454
633
|
})),
|
|
455
|
-
Participants:
|
|
456
|
-
ID:
|
|
457
|
-
EldsTeamID:
|
|
634
|
+
Participants: z6.array(z6.object({
|
|
635
|
+
ID: z6.string(),
|
|
636
|
+
EldsTeamID: z6.string()
|
|
458
637
|
}))
|
|
459
638
|
}),
|
|
460
|
-
Published:
|
|
639
|
+
Published: z6.boolean()
|
|
461
640
|
}))
|
|
462
641
|
}) }
|
|
463
642
|
};
|
|
464
643
|
|
|
465
644
|
// src/endpoints/riot/local.ts
|
|
466
|
-
import { z as
|
|
645
|
+
import { z as z7 } from "zod";
|
|
467
646
|
var localLocaleEndpoint = {
|
|
468
647
|
name: "Locale",
|
|
469
648
|
description: "Get the current locale",
|
|
@@ -471,7 +650,7 @@ var localLocaleEndpoint = {
|
|
|
471
650
|
type: "local",
|
|
472
651
|
suffix: "riotclient/product-locales/products/valorant/patchlines/live",
|
|
473
652
|
riotRequirements: { localAuth: true },
|
|
474
|
-
responses: { "200":
|
|
653
|
+
responses: { "200": z7.string() }
|
|
475
654
|
};
|
|
476
655
|
var localAvailableLocalesEndpoint = {
|
|
477
656
|
name: "Available Locales",
|
|
@@ -480,7 +659,7 @@ var localAvailableLocalesEndpoint = {
|
|
|
480
659
|
type: "local",
|
|
481
660
|
suffix: "rnet-product-registry/v4/available-product-locales/products/valorant/patchlines/live",
|
|
482
661
|
riotRequirements: { localAuth: true },
|
|
483
|
-
responses: { "200":
|
|
662
|
+
responses: { "200": z7.array(z7.string()) }
|
|
484
663
|
};
|
|
485
664
|
var localRiotStatusEndpoint = {
|
|
486
665
|
name: "Riot Status",
|
|
@@ -489,7 +668,7 @@ var localRiotStatusEndpoint = {
|
|
|
489
668
|
type: "local",
|
|
490
669
|
suffix: "riot-status/v1/products/valorant/patchlines/live/deployments/{region}",
|
|
491
670
|
riotRequirements: { localAuth: true },
|
|
492
|
-
responses: { "200":
|
|
671
|
+
responses: { "200": z7.string() }
|
|
493
672
|
};
|
|
494
673
|
var localAccessTokenEndpoint = {
|
|
495
674
|
name: "Access Token",
|
|
@@ -498,11 +677,11 @@ var localAccessTokenEndpoint = {
|
|
|
498
677
|
type: "local",
|
|
499
678
|
suffix: "rso-auth/v1/authorization/access-token",
|
|
500
679
|
riotRequirements: { localAuth: true },
|
|
501
|
-
responses: { "200":
|
|
502
|
-
clientId:
|
|
503
|
-
expiry:
|
|
504
|
-
scopes:
|
|
505
|
-
token:
|
|
680
|
+
responses: { "200": z7.object({
|
|
681
|
+
clientId: z7.string(),
|
|
682
|
+
expiry: z7.number(),
|
|
683
|
+
scopes: z7.array(z7.string()),
|
|
684
|
+
token: z7.string()
|
|
506
685
|
}) }
|
|
507
686
|
};
|
|
508
687
|
var localPluginStatusEndpoint = {
|
|
@@ -512,8 +691,8 @@ var localPluginStatusEndpoint = {
|
|
|
512
691
|
type: "local",
|
|
513
692
|
suffix: "plugin-manager/v1/status",
|
|
514
693
|
riotRequirements: { localAuth: true },
|
|
515
|
-
responses: { "200":
|
|
516
|
-
state:
|
|
694
|
+
responses: { "200": z7.object({
|
|
695
|
+
state: z7.string()
|
|
517
696
|
}) }
|
|
518
697
|
};
|
|
519
698
|
var localRmsSessionEndpoint = {
|
|
@@ -523,10 +702,10 @@ var localRmsSessionEndpoint = {
|
|
|
523
702
|
type: "local",
|
|
524
703
|
suffix: "riot-messaging-service/v1/session",
|
|
525
704
|
riotRequirements: { localAuth: true },
|
|
526
|
-
responses: { "200":
|
|
527
|
-
state:
|
|
528
|
-
token:
|
|
529
|
-
tokenType:
|
|
705
|
+
responses: { "200": z7.object({
|
|
706
|
+
state: z7.string(),
|
|
707
|
+
token: z7.string(),
|
|
708
|
+
tokenType: z7.string()
|
|
530
709
|
}) }
|
|
531
710
|
};
|
|
532
711
|
var localProcessInfoEndpoint = {
|
|
@@ -536,9 +715,9 @@ var localProcessInfoEndpoint = {
|
|
|
536
715
|
type: "local",
|
|
537
716
|
suffix: "process-control/v1/process",
|
|
538
717
|
riotRequirements: { localAuth: true },
|
|
539
|
-
responses: { "200":
|
|
540
|
-
pid:
|
|
541
|
-
status:
|
|
718
|
+
responses: { "200": z7.object({
|
|
719
|
+
pid: z7.number(),
|
|
720
|
+
status: z7.string()
|
|
542
721
|
}) }
|
|
543
722
|
};
|
|
544
723
|
var localLogPathEndpoint = {
|
|
@@ -548,7 +727,7 @@ var localLogPathEndpoint = {
|
|
|
548
727
|
type: "local",
|
|
549
728
|
suffix: "product-session/v1/logs/path/VALORANT",
|
|
550
729
|
riotRequirements: { localAuth: true },
|
|
551
|
-
responses: { "200":
|
|
730
|
+
responses: { "200": z7.string() }
|
|
552
731
|
};
|
|
553
732
|
var localEulaEndpoint = {
|
|
554
733
|
name: "Eula",
|
|
@@ -557,7 +736,7 @@ var localEulaEndpoint = {
|
|
|
557
736
|
type: "local",
|
|
558
737
|
suffix: "eula/v1/agreement/content",
|
|
559
738
|
riotRequirements: { localAuth: true },
|
|
560
|
-
responses: { "200":
|
|
739
|
+
responses: { "200": z7.string() }
|
|
561
740
|
};
|
|
562
741
|
var localPrivacyPolicyEndpoint = {
|
|
563
742
|
name: "Privacy Policy",
|
|
@@ -566,11 +745,241 @@ var localPrivacyPolicyEndpoint = {
|
|
|
566
745
|
type: "local",
|
|
567
746
|
suffix: "eula/v1/privacy-policy/content",
|
|
568
747
|
riotRequirements: { localAuth: true },
|
|
569
|
-
responses: { "200":
|
|
748
|
+
responses: { "200": z7.string() }
|
|
570
749
|
};
|
|
571
750
|
|
|
751
|
+
// src/endpoints/riot/party.ts
|
|
752
|
+
import { endpoints as e5 } from "valorant-api-types";
|
|
753
|
+
import { z as z8 } from "zod";
|
|
754
|
+
var customGameTeam = z8.array(z8.object({ Subject: z8.string().describe("PUUID") }));
|
|
755
|
+
var customGameParty = z8.object({
|
|
756
|
+
ID: z8.string(),
|
|
757
|
+
MUCName: z8.string(),
|
|
758
|
+
VoiceRoomID: z8.string(),
|
|
759
|
+
Version: z8.number(),
|
|
760
|
+
ClientVersion: z8.string(),
|
|
761
|
+
Members: z8.array(z8.object({
|
|
762
|
+
Subject: z8.string(),
|
|
763
|
+
CompetitiveTier: z8.number(),
|
|
764
|
+
PlayerIdentity: z8.object({
|
|
765
|
+
Subject: z8.string(),
|
|
766
|
+
PlayerCardID: z8.string(),
|
|
767
|
+
PlayerTitleID: z8.string(),
|
|
768
|
+
AccountLevel: z8.number(),
|
|
769
|
+
PreferredLevelBorderID: z8.string(),
|
|
770
|
+
Incognito: z8.boolean(),
|
|
771
|
+
HideAccountLevel: z8.boolean()
|
|
772
|
+
}),
|
|
773
|
+
IsOwner: z8.boolean(),
|
|
774
|
+
QueueEligibleRemainingAccountLevels: z8.number(),
|
|
775
|
+
Pings: z8.array(z8.object({
|
|
776
|
+
Ping: z8.number(),
|
|
777
|
+
GamePodID: z8.string()
|
|
778
|
+
})),
|
|
779
|
+
IsReady: z8.boolean(),
|
|
780
|
+
IsModerator: z8.boolean(),
|
|
781
|
+
UseBroadcastHUD: z8.boolean(),
|
|
782
|
+
PlatformType: z8.string(),
|
|
783
|
+
PremierPrestige: z8.object({}),
|
|
784
|
+
JoinedAt: z8.string()
|
|
785
|
+
})),
|
|
786
|
+
State: z8.string(),
|
|
787
|
+
PreviousState: z8.string(),
|
|
788
|
+
StateTransitionReason: z8.string(),
|
|
789
|
+
Accessibility: z8.string(),
|
|
790
|
+
CustomGameData: z8.object({
|
|
791
|
+
Settings: z8.object({
|
|
792
|
+
Map: z8.string(),
|
|
793
|
+
Mode: z8.string(),
|
|
794
|
+
UseBots: z8.boolean(),
|
|
795
|
+
GamePod: z8.string(),
|
|
796
|
+
GameRules: z8.record(z8.string(), z8.string()).nullable(),
|
|
797
|
+
EsportsCustomLobbyName: z8.string()
|
|
798
|
+
}),
|
|
799
|
+
Membership: z8.object({
|
|
800
|
+
teamOne: customGameTeam,
|
|
801
|
+
teamTwo: customGameTeam,
|
|
802
|
+
teamSpectate: customGameTeam,
|
|
803
|
+
teamOneCoaches: customGameTeam,
|
|
804
|
+
teamTwoCoaches: customGameTeam
|
|
805
|
+
}),
|
|
806
|
+
MaxPartySize: z8.number(),
|
|
807
|
+
AutobalanceEnabled: z8.boolean(),
|
|
808
|
+
AutobalanceMinPlayers: z8.number(),
|
|
809
|
+
HasRecoveryData: z8.boolean()
|
|
810
|
+
}),
|
|
811
|
+
MatchmakingData: z8.object({
|
|
812
|
+
QueueID: z8.string(),
|
|
813
|
+
PreferredGamePods: z8.array(z8.string()),
|
|
814
|
+
SkillDisparityRRPenalty: z8.number(),
|
|
815
|
+
MaxPartySize: z8.number()
|
|
816
|
+
}),
|
|
817
|
+
QueueEntryTime: z8.string(),
|
|
818
|
+
EstimatedQueueTimeSeconds: z8.number(),
|
|
819
|
+
ErrorNotification: z8.object({
|
|
820
|
+
ErrorType: z8.string()
|
|
821
|
+
}).optional(),
|
|
822
|
+
RestrictedSeconds: z8.number(),
|
|
823
|
+
EligibleQueues: z8.array(z8.string()),
|
|
824
|
+
CheatData: z8.object({
|
|
825
|
+
GamePodOverride: z8.string(),
|
|
826
|
+
ForcePostGameProcessing: z8.boolean()
|
|
827
|
+
}),
|
|
828
|
+
InviteCode: z8.string()
|
|
829
|
+
});
|
|
830
|
+
var setCustomGameTeamEndpoint = {
|
|
831
|
+
name: "Set Custom Game Team",
|
|
832
|
+
description: "Moves a player to a team of the custom game. Only the party owner can move other players. `team` is `TeamOne` or `TeamTwo`. Resolves to the updated party, whose `CustomGameData.Membership` lists the players of each team.",
|
|
833
|
+
queryName: "Party_ChangeTeamInCustomGame",
|
|
834
|
+
category: "Party Endpoints",
|
|
835
|
+
type: "glz",
|
|
836
|
+
method: "POST",
|
|
837
|
+
suffix: "parties/v1/parties/{party id}/customgamemembership/{team}",
|
|
838
|
+
headers: /* @__PURE__ */ new Map([["Content-Type", "application/json"]]),
|
|
839
|
+
body: z8.object({ playerToPutOnTeam: z8.string().describe("PUUID of the player to move") }),
|
|
840
|
+
riotRequirements: player,
|
|
841
|
+
responses: { "200": customGameParty }
|
|
842
|
+
};
|
|
843
|
+
var customGamePartyEndpoint = {
|
|
844
|
+
name: "Custom Game Party",
|
|
845
|
+
description: "The party of a custom game lobby: members, teams (`CustomGameData.Membership`), map, mode and rules. Typed for custom game lobbies. `party.get` is the general version.",
|
|
846
|
+
queryName: "Party_FetchParty",
|
|
847
|
+
category: "Party Endpoints",
|
|
848
|
+
type: "glz",
|
|
849
|
+
suffix: "parties/v1/parties/{party id}",
|
|
850
|
+
riotRequirements: player,
|
|
851
|
+
responses: { "200": customGameParty }
|
|
852
|
+
};
|
|
853
|
+
var partyResponse = customGameParty.extend({ CustomGameData: customGameParty.shape.CustomGameData.optional() });
|
|
854
|
+
var partyGenerateCodeEndpoint = withResponse(e5.partyGenerateCodeEndpoint, customGameParty);
|
|
855
|
+
var partyDisableCodeEndpoint = withResponse(e5.partyDisableCodeEndpoint, customGameParty);
|
|
856
|
+
var setPartyAccessibilityEndpoint = withResponse(e5.setPartyAccessibilityEndpoint, customGameParty);
|
|
857
|
+
var startCustomGameEndpoint = withResponse(e5.startCustomGameEndpoint, customGameParty);
|
|
858
|
+
var setCustomGameSettingsEndpoint = withResponse(e5.setCustomGameSettingsEndpoint, customGameParty);
|
|
859
|
+
var partyEndpoint = withResponse(e5.partyEndpoint, partyResponse);
|
|
860
|
+
var changeQueueEndpoint = withResponse(e5.changeQueueEndpoint, partyResponse);
|
|
861
|
+
var enterMatchmakingQueueEndpoint = withResponse(e5.enterMatchmakingQueueEndpoint, partyResponse);
|
|
862
|
+
var leaveMatchmakingQueueEndpoint = withResponse(e5.leaveMatchmakingQueueEndpoint, partyResponse);
|
|
863
|
+
var partyDeclineEndpoint = withResponse(e5.partyDeclineEndpoint, partyResponse);
|
|
864
|
+
var partyInviteEndpoint = withResponse(e5.partyInviteEndpoint, partyResponse);
|
|
865
|
+
var partySetMemberReadyEndpoint = withResponse(e5.partySetMemberReadyEndpoint, partyResponse);
|
|
866
|
+
var refreshCompetitiveTierEndpoint = withResponse(e5.refreshCompetitiveTierEndpoint, partyResponse);
|
|
867
|
+
var refreshPlayerIdentityEndpoint = withResponse(e5.refreshPlayerIdentityEndpoint, partyResponse);
|
|
868
|
+
var refreshPingsEndpoint = withResponse(e5.refreshPingsEndpoint, partyResponse);
|
|
869
|
+
|
|
870
|
+
// src/endpoints/riot/pregame.ts
|
|
871
|
+
import { endpoints as e6 } from "valorant-api-types";
|
|
872
|
+
import { z as z9 } from "zod";
|
|
873
|
+
var pregameMatchEndpoint = withResponse(e6.pregameMatchEndpoint, z9.object({
|
|
874
|
+
ID: z9.string(),
|
|
875
|
+
Version: z9.number(),
|
|
876
|
+
Teams: z9.array(z9.object({
|
|
877
|
+
TeamID: z9.string(),
|
|
878
|
+
TeamNumber: z9.number(),
|
|
879
|
+
Players: z9.array(z9.object({
|
|
880
|
+
Subject: z9.string(),
|
|
881
|
+
CharacterID: z9.string(),
|
|
882
|
+
CharacterSelectionState: z9.string(),
|
|
883
|
+
PregamePlayerState: z9.string(),
|
|
884
|
+
CompetitiveTier: z9.number(),
|
|
885
|
+
PlayerIdentity: z9.object({
|
|
886
|
+
Subject: z9.string(),
|
|
887
|
+
PlayerCardID: z9.string(),
|
|
888
|
+
PlayerTitleID: z9.string(),
|
|
889
|
+
AccountLevel: z9.number(),
|
|
890
|
+
PreferredLevelBorderID: z9.string(),
|
|
891
|
+
Incognito: z9.boolean(),
|
|
892
|
+
HideAccountLevel: z9.boolean()
|
|
893
|
+
}),
|
|
894
|
+
SeasonalBadgeInfo: z9.object({
|
|
895
|
+
SeasonID: z9.string(),
|
|
896
|
+
NumberOfWins: z9.number(),
|
|
897
|
+
Rank: z9.number(),
|
|
898
|
+
LeaderboardRank: z9.number()
|
|
899
|
+
}),
|
|
900
|
+
IsCaptain: z9.boolean(),
|
|
901
|
+
PlatformType: z9.string(),
|
|
902
|
+
PremierPrestige: z9.object({})
|
|
903
|
+
}))
|
|
904
|
+
})),
|
|
905
|
+
AllyTeam: z9.object({
|
|
906
|
+
TeamID: z9.string(),
|
|
907
|
+
TeamNumber: z9.number(),
|
|
908
|
+
Players: z9.array(z9.object({
|
|
909
|
+
Subject: z9.string(),
|
|
910
|
+
CharacterID: z9.string(),
|
|
911
|
+
CharacterSelectionState: z9.string(),
|
|
912
|
+
PregamePlayerState: z9.string(),
|
|
913
|
+
CompetitiveTier: z9.number(),
|
|
914
|
+
PlayerIdentity: z9.object({
|
|
915
|
+
Subject: z9.string(),
|
|
916
|
+
PlayerCardID: z9.string(),
|
|
917
|
+
PlayerTitleID: z9.string(),
|
|
918
|
+
AccountLevel: z9.number(),
|
|
919
|
+
PreferredLevelBorderID: z9.string(),
|
|
920
|
+
Incognito: z9.boolean(),
|
|
921
|
+
HideAccountLevel: z9.boolean()
|
|
922
|
+
}),
|
|
923
|
+
SeasonalBadgeInfo: z9.object({
|
|
924
|
+
SeasonID: z9.string(),
|
|
925
|
+
NumberOfWins: z9.number(),
|
|
926
|
+
Rank: z9.number(),
|
|
927
|
+
LeaderboardRank: z9.number()
|
|
928
|
+
}),
|
|
929
|
+
IsCaptain: z9.boolean(),
|
|
930
|
+
PlatformType: z9.string(),
|
|
931
|
+
PremierPrestige: z9.object({})
|
|
932
|
+
}))
|
|
933
|
+
}),
|
|
934
|
+
EnemyTeamSize: z9.number(),
|
|
935
|
+
EnemyTeamLockCount: z9.number(),
|
|
936
|
+
PregameState: z9.string(),
|
|
937
|
+
LastUpdated: z9.string(),
|
|
938
|
+
MapID: z9.string(),
|
|
939
|
+
CastedVotes: z9.object({}),
|
|
940
|
+
MapSelectStep: z9.number(),
|
|
941
|
+
Team1: z9.string(),
|
|
942
|
+
GamePodID: z9.string(),
|
|
943
|
+
Mode: z9.string(),
|
|
944
|
+
VoiceSessionID: z9.string(),
|
|
945
|
+
MUCName: z9.string(),
|
|
946
|
+
TeamMatchToken: z9.string(),
|
|
947
|
+
QueueID: z9.string(),
|
|
948
|
+
ProvisioningFlowID: z9.string(),
|
|
949
|
+
IsRanked: z9.boolean(),
|
|
950
|
+
PhaseTimeRemainingNS: z9.number(),
|
|
951
|
+
StepTimeRemainingNS: z9.number(),
|
|
952
|
+
altModesFlagADA: z9.boolean(),
|
|
953
|
+
/** Rules of the match by name. Only the rules the lobby set are present. */
|
|
954
|
+
GameRules: z9.record(z9.string(), z9.string())
|
|
955
|
+
}));
|
|
956
|
+
var pregameLoadoutsEndpoint = withResponse(e6.pregameLoadoutsEndpoint, z9.object({
|
|
957
|
+
Loadouts: z9.array(z9.object({
|
|
958
|
+
Subject: z9.string(),
|
|
959
|
+
Expressions: z9.object({
|
|
960
|
+
AESSelections: z9.array(z9.object({
|
|
961
|
+
AssetID: z9.string(),
|
|
962
|
+
TypeID: z9.string()
|
|
963
|
+
}))
|
|
964
|
+
}),
|
|
965
|
+
DynamicOptions: z9.object({}),
|
|
966
|
+
Items: z9.record(z9.string(), z9.object({
|
|
967
|
+
ID: z9.string(),
|
|
968
|
+
TypeID: z9.string(),
|
|
969
|
+
Sockets: z9.record(z9.string(), z9.object({
|
|
970
|
+
ID: z9.string(),
|
|
971
|
+
Item: z9.object({
|
|
972
|
+
ID: z9.string(),
|
|
973
|
+
TypeID: z9.string()
|
|
974
|
+
})
|
|
975
|
+
}))
|
|
976
|
+
}))
|
|
977
|
+
})),
|
|
978
|
+
LoadoutsValid: z9.boolean()
|
|
979
|
+
}));
|
|
980
|
+
|
|
572
981
|
// src/endpoints/riot/premier.ts
|
|
573
|
-
import { z as
|
|
982
|
+
import { z as z10 } from "zod";
|
|
574
983
|
var premierSeasonsEndpoint = {
|
|
575
984
|
name: "Premier Seasons",
|
|
576
985
|
description: "All Premier seasons of the shard. The affinity in the path is the region of the context.",
|
|
@@ -578,205 +987,205 @@ var premierSeasonsEndpoint = {
|
|
|
578
987
|
type: "pd",
|
|
579
988
|
suffix: "premier/v1/affinities/{region}/premier-seasons",
|
|
580
989
|
riotRequirements: player,
|
|
581
|
-
responses: { "200":
|
|
582
|
-
PremierSeasons:
|
|
583
|
-
ID:
|
|
584
|
-
Name:
|
|
585
|
-
PreviousPremierSeasonID:
|
|
586
|
-
NextPremierSeasonID:
|
|
587
|
-
IsActive:
|
|
588
|
-
StartTime:
|
|
589
|
-
EndTime:
|
|
590
|
-
Events:
|
|
591
|
-
ID:
|
|
592
|
-
Type:
|
|
593
|
-
StartDateTime:
|
|
594
|
-
EndDateTime:
|
|
595
|
-
MapSelectionStrategy:
|
|
596
|
-
MapPoolMapIDs:
|
|
597
|
-
PointsRequiredToParticipate:
|
|
990
|
+
responses: { "200": z10.object({
|
|
991
|
+
PremierSeasons: z10.array(z10.object({
|
|
992
|
+
ID: z10.string(),
|
|
993
|
+
Name: z10.string(),
|
|
994
|
+
PreviousPremierSeasonID: z10.string(),
|
|
995
|
+
NextPremierSeasonID: z10.string(),
|
|
996
|
+
IsActive: z10.boolean(),
|
|
997
|
+
StartTime: z10.string(),
|
|
998
|
+
EndTime: z10.string(),
|
|
999
|
+
Events: z10.array(z10.object({
|
|
1000
|
+
ID: z10.string(),
|
|
1001
|
+
Type: z10.string(),
|
|
1002
|
+
StartDateTime: z10.string(),
|
|
1003
|
+
EndDateTime: z10.string(),
|
|
1004
|
+
MapSelectionStrategy: z10.string(),
|
|
1005
|
+
MapPoolMapIDs: z10.array(z10.string()),
|
|
1006
|
+
PointsRequiredToParticipate: z10.number()
|
|
598
1007
|
})),
|
|
599
|
-
ScheduledEvents:
|
|
600
|
-
EventID:
|
|
601
|
-
EventType:
|
|
602
|
-
Conference:
|
|
603
|
-
DivisionGroup:
|
|
604
|
-
EventPresetName:
|
|
605
|
-
StartDateTime:
|
|
606
|
-
EndDateTime:
|
|
607
|
-
TournamentRoundTimes:
|
|
608
|
-
StartDateTime:
|
|
609
|
-
EndDateTime:
|
|
1008
|
+
ScheduledEvents: z10.array(z10.object({
|
|
1009
|
+
EventID: z10.string(),
|
|
1010
|
+
EventType: z10.string(),
|
|
1011
|
+
Conference: z10.string(),
|
|
1012
|
+
DivisionGroup: z10.string(),
|
|
1013
|
+
EventPresetName: z10.string(),
|
|
1014
|
+
StartDateTime: z10.string(),
|
|
1015
|
+
EndDateTime: z10.string(),
|
|
1016
|
+
TournamentRoundTimes: z10.array(z10.object({
|
|
1017
|
+
StartDateTime: z10.string(),
|
|
1018
|
+
EndDateTime: z10.string()
|
|
610
1019
|
}))
|
|
611
1020
|
})),
|
|
612
|
-
Conferences:
|
|
613
|
-
id:
|
|
614
|
-
key:
|
|
615
|
-
isSuper:
|
|
616
|
-
gamePods:
|
|
617
|
-
timezone:
|
|
618
|
-
superConference:
|
|
619
|
-
leaderboardPlayoffQualificationDateTime:
|
|
620
|
-
leaderboardPromotionFinalizationDateTime:
|
|
1021
|
+
Conferences: z10.array(z10.object({
|
|
1022
|
+
id: z10.string(),
|
|
1023
|
+
key: z10.string(),
|
|
1024
|
+
isSuper: z10.boolean(),
|
|
1025
|
+
gamePods: z10.array(z10.string()),
|
|
1026
|
+
timezone: z10.string(),
|
|
1027
|
+
superConference: z10.string().optional(),
|
|
1028
|
+
leaderboardPlayoffQualificationDateTime: z10.string(),
|
|
1029
|
+
leaderboardPromotionFinalizationDateTime: z10.string()
|
|
621
1030
|
})),
|
|
622
|
-
Divisions:
|
|
623
|
-
Division:
|
|
624
|
-
DivisionName:
|
|
625
|
-
DivisionGroup:
|
|
626
|
-
EventPresetName:
|
|
1031
|
+
Divisions: z10.array(z10.object({
|
|
1032
|
+
Division: z10.number(),
|
|
1033
|
+
DivisionName: z10.string(),
|
|
1034
|
+
DivisionGroup: z10.string(),
|
|
1035
|
+
EventPresetName: z10.string()
|
|
627
1036
|
})),
|
|
628
|
-
DivisionThresholds:
|
|
629
|
-
playoffThresholdType:
|
|
630
|
-
playoffThresholdValue:
|
|
631
|
-
promotionThresholdType:
|
|
632
|
-
promotionThresholdValue:
|
|
633
|
-
shouldPromoteToSuperConference:
|
|
634
|
-
skipReseedCriteria:
|
|
635
|
-
conference:
|
|
636
|
-
division:
|
|
637
|
-
promotionConference:
|
|
638
|
-
skipReseedCriteriaValue:
|
|
1037
|
+
DivisionThresholds: z10.array(z10.object({
|
|
1038
|
+
playoffThresholdType: z10.string(),
|
|
1039
|
+
playoffThresholdValue: z10.number(),
|
|
1040
|
+
promotionThresholdType: z10.string(),
|
|
1041
|
+
promotionThresholdValue: z10.number(),
|
|
1042
|
+
shouldPromoteToSuperConference: z10.boolean(),
|
|
1043
|
+
skipReseedCriteria: z10.string(),
|
|
1044
|
+
conference: z10.string().optional(),
|
|
1045
|
+
division: z10.number().optional(),
|
|
1046
|
+
promotionConference: z10.string().optional(),
|
|
1047
|
+
skipReseedCriteriaValue: z10.number().optional()
|
|
639
1048
|
})),
|
|
640
|
-
EventPresets:
|
|
641
|
-
PRO:
|
|
642
|
-
EventPresetsByEventType:
|
|
643
|
-
LEAGUE:
|
|
644
|
-
EventPresetName:
|
|
645
|
-
eventType:
|
|
646
|
-
bestOfN:
|
|
647
|
-
matchmakingStrategy:
|
|
648
|
-
queueID:
|
|
649
|
-
pointsConfig:
|
|
650
|
-
PointsForWin:
|
|
651
|
-
PointsForLoss:
|
|
1049
|
+
EventPresets: z10.object({
|
|
1050
|
+
PRO: z10.object({
|
|
1051
|
+
EventPresetsByEventType: z10.object({
|
|
1052
|
+
LEAGUE: z10.object({
|
|
1053
|
+
EventPresetName: z10.string(),
|
|
1054
|
+
eventType: z10.string(),
|
|
1055
|
+
bestOfN: z10.number(),
|
|
1056
|
+
matchmakingStrategy: z10.string(),
|
|
1057
|
+
queueID: z10.string(),
|
|
1058
|
+
pointsConfig: z10.object({
|
|
1059
|
+
PointsForWin: z10.number(),
|
|
1060
|
+
PointsForLoss: z10.number()
|
|
652
1061
|
})
|
|
653
1062
|
}),
|
|
654
|
-
SCRIM:
|
|
655
|
-
EventPresetName:
|
|
656
|
-
eventType:
|
|
657
|
-
bestOfN:
|
|
658
|
-
matchmakingStrategy:
|
|
659
|
-
queueID:
|
|
660
|
-
pointsConfig:
|
|
661
|
-
PointsForWin:
|
|
662
|
-
PointsForLoss:
|
|
1063
|
+
SCRIM: z10.object({
|
|
1064
|
+
EventPresetName: z10.string(),
|
|
1065
|
+
eventType: z10.string(),
|
|
1066
|
+
bestOfN: z10.number(),
|
|
1067
|
+
matchmakingStrategy: z10.string(),
|
|
1068
|
+
queueID: z10.string(),
|
|
1069
|
+
pointsConfig: z10.object({
|
|
1070
|
+
PointsForWin: z10.number(),
|
|
1071
|
+
PointsForLoss: z10.number()
|
|
663
1072
|
})
|
|
664
1073
|
}),
|
|
665
|
-
TOURNAMENT:
|
|
666
|
-
EventPresetName:
|
|
667
|
-
eventType:
|
|
668
|
-
bestOfN:
|
|
669
|
-
matchmakingStrategy:
|
|
670
|
-
queueID:
|
|
671
|
-
pointsConfig:
|
|
672
|
-
PointsForWin:
|
|
673
|
-
PointsForLoss:
|
|
1074
|
+
TOURNAMENT: z10.object({
|
|
1075
|
+
EventPresetName: z10.string(),
|
|
1076
|
+
eventType: z10.string(),
|
|
1077
|
+
bestOfN: z10.number(),
|
|
1078
|
+
matchmakingStrategy: z10.string(),
|
|
1079
|
+
queueID: z10.string(),
|
|
1080
|
+
pointsConfig: z10.object({
|
|
1081
|
+
PointsForWin: z10.number(),
|
|
1082
|
+
PointsForLoss: z10.number()
|
|
674
1083
|
})
|
|
675
1084
|
})
|
|
676
1085
|
})
|
|
677
1086
|
}),
|
|
678
|
-
REGULAR:
|
|
679
|
-
EventPresetsByEventType:
|
|
680
|
-
LEAGUE:
|
|
681
|
-
EventPresetName:
|
|
682
|
-
eventType:
|
|
683
|
-
bestOfN:
|
|
684
|
-
matchmakingStrategy:
|
|
685
|
-
queueID:
|
|
686
|
-
pointsConfig:
|
|
687
|
-
PointsForWin:
|
|
688
|
-
PointsForLoss:
|
|
1087
|
+
REGULAR: z10.object({
|
|
1088
|
+
EventPresetsByEventType: z10.object({
|
|
1089
|
+
LEAGUE: z10.object({
|
|
1090
|
+
EventPresetName: z10.string(),
|
|
1091
|
+
eventType: z10.string(),
|
|
1092
|
+
bestOfN: z10.number(),
|
|
1093
|
+
matchmakingStrategy: z10.string(),
|
|
1094
|
+
queueID: z10.string(),
|
|
1095
|
+
pointsConfig: z10.object({
|
|
1096
|
+
PointsForWin: z10.number(),
|
|
1097
|
+
PointsForLoss: z10.number()
|
|
689
1098
|
})
|
|
690
1099
|
}),
|
|
691
|
-
SCRIM:
|
|
692
|
-
EventPresetName:
|
|
693
|
-
eventType:
|
|
694
|
-
bestOfN:
|
|
695
|
-
matchmakingStrategy:
|
|
696
|
-
queueID:
|
|
697
|
-
pointsConfig:
|
|
698
|
-
PointsForWin:
|
|
699
|
-
PointsForLoss:
|
|
1100
|
+
SCRIM: z10.object({
|
|
1101
|
+
EventPresetName: z10.string(),
|
|
1102
|
+
eventType: z10.string(),
|
|
1103
|
+
bestOfN: z10.number(),
|
|
1104
|
+
matchmakingStrategy: z10.string(),
|
|
1105
|
+
queueID: z10.string(),
|
|
1106
|
+
pointsConfig: z10.object({
|
|
1107
|
+
PointsForWin: z10.number(),
|
|
1108
|
+
PointsForLoss: z10.number()
|
|
700
1109
|
})
|
|
701
1110
|
}),
|
|
702
|
-
TOURNAMENT:
|
|
703
|
-
EventPresetName:
|
|
704
|
-
eventType:
|
|
705
|
-
bestOfN:
|
|
706
|
-
matchmakingStrategy:
|
|
707
|
-
queueID:
|
|
708
|
-
pointsConfig:
|
|
709
|
-
PointsForWin:
|
|
710
|
-
PointsForLoss:
|
|
1111
|
+
TOURNAMENT: z10.object({
|
|
1112
|
+
EventPresetName: z10.string(),
|
|
1113
|
+
eventType: z10.string(),
|
|
1114
|
+
bestOfN: z10.number(),
|
|
1115
|
+
matchmakingStrategy: z10.string(),
|
|
1116
|
+
queueID: z10.string(),
|
|
1117
|
+
pointsConfig: z10.object({
|
|
1118
|
+
PointsForWin: z10.number(),
|
|
1119
|
+
PointsForLoss: z10.number()
|
|
711
1120
|
})
|
|
712
1121
|
})
|
|
713
1122
|
})
|
|
714
1123
|
})
|
|
715
1124
|
}),
|
|
716
|
-
FlawlessPointRequirement:
|
|
717
|
-
ChampionshipPointRequirement:
|
|
718
|
-
ChampionshipEventID:
|
|
719
|
-
EnrollmentPhaseStartDateTime:
|
|
720
|
-
EnrollmentPhaseEndDateTime:
|
|
721
|
-
LeaderboardPlayoffQualificationDateTime:
|
|
722
|
-
LeaderboardPromotionFinalizationDateTime:
|
|
723
|
-
LeaderboardFinalizationDateTime:
|
|
724
|
-
ContenderEligibilityExpiryDateTime:
|
|
725
|
-
StageLockTime:
|
|
726
|
-
ParticipationRewardsActIDs:
|
|
727
|
-
ParticipationRewards:
|
|
728
|
-
EntitlementRewards:
|
|
729
|
-
ItemTypeID:
|
|
730
|
-
ItemID:
|
|
731
|
-
Amount:
|
|
1125
|
+
FlawlessPointRequirement: z10.number(),
|
|
1126
|
+
ChampionshipPointRequirement: z10.number(),
|
|
1127
|
+
ChampionshipEventID: z10.string(),
|
|
1128
|
+
EnrollmentPhaseStartDateTime: z10.string(),
|
|
1129
|
+
EnrollmentPhaseEndDateTime: z10.string(),
|
|
1130
|
+
LeaderboardPlayoffQualificationDateTime: z10.string(),
|
|
1131
|
+
LeaderboardPromotionFinalizationDateTime: z10.string(),
|
|
1132
|
+
LeaderboardFinalizationDateTime: z10.string(),
|
|
1133
|
+
ContenderEligibilityExpiryDateTime: z10.string(),
|
|
1134
|
+
StageLockTime: z10.string(),
|
|
1135
|
+
ParticipationRewardsActIDs: z10.array(z10.string()),
|
|
1136
|
+
ParticipationRewards: z10.object({
|
|
1137
|
+
EntitlementRewards: z10.array(z10.object({
|
|
1138
|
+
ItemTypeID: z10.string(),
|
|
1139
|
+
ItemID: z10.string(),
|
|
1140
|
+
Amount: z10.number()
|
|
732
1141
|
}))
|
|
733
1142
|
}),
|
|
734
|
-
TournamentWinnerRewards:
|
|
735
|
-
DivisionWinnerRewards:
|
|
736
|
-
ADVANCED:
|
|
737
|
-
EntitlementRewards:
|
|
738
|
-
ItemTypeID:
|
|
739
|
-
ItemID:
|
|
740
|
-
Amount:
|
|
1143
|
+
TournamentWinnerRewards: z10.object({}),
|
|
1144
|
+
DivisionWinnerRewards: z10.object({
|
|
1145
|
+
ADVANCED: z10.object({
|
|
1146
|
+
EntitlementRewards: z10.array(z10.object({
|
|
1147
|
+
ItemTypeID: z10.string(),
|
|
1148
|
+
ItemID: z10.string(),
|
|
1149
|
+
Amount: z10.number()
|
|
741
1150
|
}))
|
|
742
1151
|
}).optional(),
|
|
743
|
-
CONTENDER:
|
|
744
|
-
EntitlementRewards:
|
|
745
|
-
ItemTypeID:
|
|
746
|
-
ItemID:
|
|
747
|
-
Amount:
|
|
1152
|
+
CONTENDER: z10.object({
|
|
1153
|
+
EntitlementRewards: z10.array(z10.object({
|
|
1154
|
+
ItemTypeID: z10.string(),
|
|
1155
|
+
ItemID: z10.string(),
|
|
1156
|
+
Amount: z10.number()
|
|
748
1157
|
}))
|
|
749
1158
|
}).optional(),
|
|
750
|
-
ELITE:
|
|
751
|
-
EntitlementRewards:
|
|
752
|
-
ItemTypeID:
|
|
753
|
-
ItemID:
|
|
754
|
-
Amount:
|
|
1159
|
+
ELITE: z10.object({
|
|
1160
|
+
EntitlementRewards: z10.array(z10.object({
|
|
1161
|
+
ItemTypeID: z10.string(),
|
|
1162
|
+
ItemID: z10.string(),
|
|
1163
|
+
Amount: z10.number()
|
|
755
1164
|
}))
|
|
756
1165
|
}).optional(),
|
|
757
|
-
INTERMEDIATE:
|
|
758
|
-
EntitlementRewards:
|
|
759
|
-
ItemTypeID:
|
|
760
|
-
ItemID:
|
|
761
|
-
Amount:
|
|
1166
|
+
INTERMEDIATE: z10.object({
|
|
1167
|
+
EntitlementRewards: z10.array(z10.object({
|
|
1168
|
+
ItemTypeID: z10.string(),
|
|
1169
|
+
ItemID: z10.string(),
|
|
1170
|
+
Amount: z10.number()
|
|
762
1171
|
}))
|
|
763
1172
|
}).optional(),
|
|
764
|
-
OPEN:
|
|
765
|
-
EntitlementRewards:
|
|
766
|
-
ItemTypeID:
|
|
767
|
-
ItemID:
|
|
768
|
-
Amount:
|
|
1173
|
+
OPEN: z10.object({
|
|
1174
|
+
EntitlementRewards: z10.array(z10.object({
|
|
1175
|
+
ItemTypeID: z10.string(),
|
|
1176
|
+
ItemID: z10.string(),
|
|
1177
|
+
Amount: z10.number()
|
|
769
1178
|
}))
|
|
770
1179
|
}).optional(),
|
|
771
|
-
INVITE:
|
|
772
|
-
EntitlementRewards:
|
|
773
|
-
ItemTypeID:
|
|
774
|
-
ItemID:
|
|
775
|
-
Amount:
|
|
1180
|
+
INVITE: z10.object({
|
|
1181
|
+
EntitlementRewards: z10.array(z10.object({
|
|
1182
|
+
ItemTypeID: z10.string(),
|
|
1183
|
+
ItemID: z10.string(),
|
|
1184
|
+
Amount: z10.number()
|
|
776
1185
|
}))
|
|
777
1186
|
}).optional()
|
|
778
1187
|
}),
|
|
779
|
-
RosterRecentActivityNumSeasons:
|
|
1188
|
+
RosterRecentActivityNumSeasons: z10.number()
|
|
780
1189
|
}))
|
|
781
1190
|
}) }
|
|
782
1191
|
};
|
|
@@ -787,154 +1196,154 @@ var premierActiveSeasonEndpoint = {
|
|
|
787
1196
|
type: "pd",
|
|
788
1197
|
suffix: "premier/v1/affinities/{region}/premier-seasons/active",
|
|
789
1198
|
riotRequirements: player,
|
|
790
|
-
responses: { "200":
|
|
791
|
-
ID:
|
|
792
|
-
Name:
|
|
793
|
-
PreviousPremierSeasonID:
|
|
794
|
-
NextPremierSeasonID:
|
|
795
|
-
IsActive:
|
|
796
|
-
StartTime:
|
|
797
|
-
EndTime:
|
|
798
|
-
Events:
|
|
799
|
-
ID:
|
|
800
|
-
Type:
|
|
801
|
-
StartDateTime:
|
|
802
|
-
EndDateTime:
|
|
803
|
-
MapSelectionStrategy:
|
|
804
|
-
MapPoolMapIDs:
|
|
805
|
-
PointsRequiredToParticipate:
|
|
1199
|
+
responses: { "200": z10.object({
|
|
1200
|
+
ID: z10.string(),
|
|
1201
|
+
Name: z10.string(),
|
|
1202
|
+
PreviousPremierSeasonID: z10.string(),
|
|
1203
|
+
NextPremierSeasonID: z10.string(),
|
|
1204
|
+
IsActive: z10.boolean(),
|
|
1205
|
+
StartTime: z10.string(),
|
|
1206
|
+
EndTime: z10.string(),
|
|
1207
|
+
Events: z10.array(z10.object({
|
|
1208
|
+
ID: z10.string(),
|
|
1209
|
+
Type: z10.string(),
|
|
1210
|
+
StartDateTime: z10.string(),
|
|
1211
|
+
EndDateTime: z10.string(),
|
|
1212
|
+
MapSelectionStrategy: z10.string(),
|
|
1213
|
+
MapPoolMapIDs: z10.array(z10.string()),
|
|
1214
|
+
PointsRequiredToParticipate: z10.number()
|
|
806
1215
|
})),
|
|
807
|
-
ScheduledEvents:
|
|
808
|
-
EventID:
|
|
809
|
-
EventType:
|
|
810
|
-
Conference:
|
|
811
|
-
DivisionGroup:
|
|
812
|
-
EventPresetName:
|
|
813
|
-
StartDateTime:
|
|
814
|
-
EndDateTime:
|
|
815
|
-
TournamentRoundTimes:
|
|
816
|
-
StartDateTime:
|
|
817
|
-
EndDateTime:
|
|
1216
|
+
ScheduledEvents: z10.array(z10.object({
|
|
1217
|
+
EventID: z10.string(),
|
|
1218
|
+
EventType: z10.string(),
|
|
1219
|
+
Conference: z10.string(),
|
|
1220
|
+
DivisionGroup: z10.string(),
|
|
1221
|
+
EventPresetName: z10.string(),
|
|
1222
|
+
StartDateTime: z10.string(),
|
|
1223
|
+
EndDateTime: z10.string(),
|
|
1224
|
+
TournamentRoundTimes: z10.array(z10.object({
|
|
1225
|
+
StartDateTime: z10.string(),
|
|
1226
|
+
EndDateTime: z10.string()
|
|
818
1227
|
}))
|
|
819
1228
|
})),
|
|
820
|
-
Conferences:
|
|
821
|
-
id:
|
|
822
|
-
key:
|
|
823
|
-
isSuper:
|
|
824
|
-
gamePods:
|
|
825
|
-
timezone:
|
|
826
|
-
superConference:
|
|
827
|
-
leaderboardPlayoffQualificationDateTime:
|
|
828
|
-
leaderboardPromotionFinalizationDateTime:
|
|
1229
|
+
Conferences: z10.array(z10.object({
|
|
1230
|
+
id: z10.string(),
|
|
1231
|
+
key: z10.string(),
|
|
1232
|
+
isSuper: z10.boolean(),
|
|
1233
|
+
gamePods: z10.array(z10.string()),
|
|
1234
|
+
timezone: z10.string(),
|
|
1235
|
+
superConference: z10.string().optional(),
|
|
1236
|
+
leaderboardPlayoffQualificationDateTime: z10.string(),
|
|
1237
|
+
leaderboardPromotionFinalizationDateTime: z10.string()
|
|
829
1238
|
})),
|
|
830
|
-
Divisions:
|
|
831
|
-
Division:
|
|
832
|
-
DivisionName:
|
|
833
|
-
DivisionGroup:
|
|
834
|
-
EventPresetName:
|
|
1239
|
+
Divisions: z10.array(z10.object({
|
|
1240
|
+
Division: z10.number(),
|
|
1241
|
+
DivisionName: z10.string(),
|
|
1242
|
+
DivisionGroup: z10.string(),
|
|
1243
|
+
EventPresetName: z10.string()
|
|
835
1244
|
})),
|
|
836
|
-
DivisionThresholds:
|
|
837
|
-
playoffThresholdType:
|
|
838
|
-
playoffThresholdValue:
|
|
839
|
-
promotionThresholdType:
|
|
840
|
-
promotionThresholdValue:
|
|
841
|
-
shouldPromoteToSuperConference:
|
|
842
|
-
skipReseedCriteria:
|
|
843
|
-
conference:
|
|
844
|
-
division:
|
|
845
|
-
promotionConference:
|
|
846
|
-
skipReseedCriteriaValue:
|
|
1245
|
+
DivisionThresholds: z10.array(z10.object({
|
|
1246
|
+
playoffThresholdType: z10.string(),
|
|
1247
|
+
playoffThresholdValue: z10.number(),
|
|
1248
|
+
promotionThresholdType: z10.string(),
|
|
1249
|
+
promotionThresholdValue: z10.number(),
|
|
1250
|
+
shouldPromoteToSuperConference: z10.boolean(),
|
|
1251
|
+
skipReseedCriteria: z10.string(),
|
|
1252
|
+
conference: z10.string().optional(),
|
|
1253
|
+
division: z10.number().optional(),
|
|
1254
|
+
promotionConference: z10.string().optional(),
|
|
1255
|
+
skipReseedCriteriaValue: z10.number().optional()
|
|
847
1256
|
})),
|
|
848
|
-
EventPresets:
|
|
849
|
-
PRO:
|
|
850
|
-
EventPresetsByEventType:
|
|
851
|
-
LEAGUE:
|
|
852
|
-
EventPresetName:
|
|
853
|
-
eventType:
|
|
854
|
-
bestOfN:
|
|
855
|
-
matchmakingStrategy:
|
|
856
|
-
queueID:
|
|
857
|
-
pointsConfig:
|
|
858
|
-
PointsForWin:
|
|
859
|
-
PointsForLoss:
|
|
1257
|
+
EventPresets: z10.object({
|
|
1258
|
+
PRO: z10.object({
|
|
1259
|
+
EventPresetsByEventType: z10.object({
|
|
1260
|
+
LEAGUE: z10.object({
|
|
1261
|
+
EventPresetName: z10.string(),
|
|
1262
|
+
eventType: z10.string(),
|
|
1263
|
+
bestOfN: z10.number(),
|
|
1264
|
+
matchmakingStrategy: z10.string(),
|
|
1265
|
+
queueID: z10.string(),
|
|
1266
|
+
pointsConfig: z10.object({
|
|
1267
|
+
PointsForWin: z10.number(),
|
|
1268
|
+
PointsForLoss: z10.number()
|
|
860
1269
|
})
|
|
861
1270
|
}),
|
|
862
|
-
SCRIM:
|
|
863
|
-
EventPresetName:
|
|
864
|
-
eventType:
|
|
865
|
-
bestOfN:
|
|
866
|
-
matchmakingStrategy:
|
|
867
|
-
queueID:
|
|
868
|
-
pointsConfig:
|
|
869
|
-
PointsForWin:
|
|
870
|
-
PointsForLoss:
|
|
1271
|
+
SCRIM: z10.object({
|
|
1272
|
+
EventPresetName: z10.string(),
|
|
1273
|
+
eventType: z10.string(),
|
|
1274
|
+
bestOfN: z10.number(),
|
|
1275
|
+
matchmakingStrategy: z10.string(),
|
|
1276
|
+
queueID: z10.string(),
|
|
1277
|
+
pointsConfig: z10.object({
|
|
1278
|
+
PointsForWin: z10.number(),
|
|
1279
|
+
PointsForLoss: z10.number()
|
|
871
1280
|
})
|
|
872
1281
|
}),
|
|
873
|
-
TOURNAMENT:
|
|
874
|
-
EventPresetName:
|
|
875
|
-
eventType:
|
|
876
|
-
bestOfN:
|
|
877
|
-
matchmakingStrategy:
|
|
878
|
-
queueID:
|
|
879
|
-
pointsConfig:
|
|
880
|
-
PointsForWin:
|
|
881
|
-
PointsForLoss:
|
|
1282
|
+
TOURNAMENT: z10.object({
|
|
1283
|
+
EventPresetName: z10.string(),
|
|
1284
|
+
eventType: z10.string(),
|
|
1285
|
+
bestOfN: z10.number(),
|
|
1286
|
+
matchmakingStrategy: z10.string(),
|
|
1287
|
+
queueID: z10.string(),
|
|
1288
|
+
pointsConfig: z10.object({
|
|
1289
|
+
PointsForWin: z10.number(),
|
|
1290
|
+
PointsForLoss: z10.number()
|
|
882
1291
|
})
|
|
883
1292
|
})
|
|
884
1293
|
})
|
|
885
1294
|
}),
|
|
886
|
-
REGULAR:
|
|
887
|
-
EventPresetsByEventType:
|
|
888
|
-
LEAGUE:
|
|
889
|
-
EventPresetName:
|
|
890
|
-
eventType:
|
|
891
|
-
bestOfN:
|
|
892
|
-
matchmakingStrategy:
|
|
893
|
-
queueID:
|
|
894
|
-
pointsConfig:
|
|
895
|
-
PointsForWin:
|
|
896
|
-
PointsForLoss:
|
|
1295
|
+
REGULAR: z10.object({
|
|
1296
|
+
EventPresetsByEventType: z10.object({
|
|
1297
|
+
LEAGUE: z10.object({
|
|
1298
|
+
EventPresetName: z10.string(),
|
|
1299
|
+
eventType: z10.string(),
|
|
1300
|
+
bestOfN: z10.number(),
|
|
1301
|
+
matchmakingStrategy: z10.string(),
|
|
1302
|
+
queueID: z10.string(),
|
|
1303
|
+
pointsConfig: z10.object({
|
|
1304
|
+
PointsForWin: z10.number(),
|
|
1305
|
+
PointsForLoss: z10.number()
|
|
897
1306
|
})
|
|
898
1307
|
}),
|
|
899
|
-
SCRIM:
|
|
900
|
-
EventPresetName:
|
|
901
|
-
eventType:
|
|
902
|
-
bestOfN:
|
|
903
|
-
matchmakingStrategy:
|
|
904
|
-
queueID:
|
|
905
|
-
pointsConfig:
|
|
906
|
-
PointsForWin:
|
|
907
|
-
PointsForLoss:
|
|
1308
|
+
SCRIM: z10.object({
|
|
1309
|
+
EventPresetName: z10.string(),
|
|
1310
|
+
eventType: z10.string(),
|
|
1311
|
+
bestOfN: z10.number(),
|
|
1312
|
+
matchmakingStrategy: z10.string(),
|
|
1313
|
+
queueID: z10.string(),
|
|
1314
|
+
pointsConfig: z10.object({
|
|
1315
|
+
PointsForWin: z10.number(),
|
|
1316
|
+
PointsForLoss: z10.number()
|
|
908
1317
|
})
|
|
909
1318
|
}),
|
|
910
|
-
TOURNAMENT:
|
|
911
|
-
EventPresetName:
|
|
912
|
-
eventType:
|
|
913
|
-
bestOfN:
|
|
914
|
-
matchmakingStrategy:
|
|
915
|
-
queueID:
|
|
916
|
-
pointsConfig:
|
|
917
|
-
PointsForWin:
|
|
918
|
-
PointsForLoss:
|
|
1319
|
+
TOURNAMENT: z10.object({
|
|
1320
|
+
EventPresetName: z10.string(),
|
|
1321
|
+
eventType: z10.string(),
|
|
1322
|
+
bestOfN: z10.number(),
|
|
1323
|
+
matchmakingStrategy: z10.string(),
|
|
1324
|
+
queueID: z10.string(),
|
|
1325
|
+
pointsConfig: z10.object({
|
|
1326
|
+
PointsForWin: z10.number(),
|
|
1327
|
+
PointsForLoss: z10.number()
|
|
919
1328
|
})
|
|
920
1329
|
})
|
|
921
1330
|
})
|
|
922
1331
|
})
|
|
923
1332
|
}),
|
|
924
|
-
FlawlessPointRequirement:
|
|
925
|
-
ChampionshipPointRequirement:
|
|
926
|
-
ChampionshipEventID:
|
|
927
|
-
EnrollmentPhaseStartDateTime:
|
|
928
|
-
EnrollmentPhaseEndDateTime:
|
|
929
|
-
LeaderboardPlayoffQualificationDateTime:
|
|
930
|
-
LeaderboardPromotionFinalizationDateTime:
|
|
931
|
-
LeaderboardFinalizationDateTime:
|
|
932
|
-
ContenderEligibilityExpiryDateTime:
|
|
933
|
-
StageLockTime:
|
|
934
|
-
ParticipationRewards:
|
|
935
|
-
TournamentWinnerRewards:
|
|
936
|
-
DivisionWinnerRewards:
|
|
937
|
-
RosterRecentActivityNumSeasons:
|
|
1333
|
+
FlawlessPointRequirement: z10.number(),
|
|
1334
|
+
ChampionshipPointRequirement: z10.number(),
|
|
1335
|
+
ChampionshipEventID: z10.string(),
|
|
1336
|
+
EnrollmentPhaseStartDateTime: z10.string(),
|
|
1337
|
+
EnrollmentPhaseEndDateTime: z10.string(),
|
|
1338
|
+
LeaderboardPlayoffQualificationDateTime: z10.string(),
|
|
1339
|
+
LeaderboardPromotionFinalizationDateTime: z10.string(),
|
|
1340
|
+
LeaderboardFinalizationDateTime: z10.string(),
|
|
1341
|
+
ContenderEligibilityExpiryDateTime: z10.string(),
|
|
1342
|
+
StageLockTime: z10.string(),
|
|
1343
|
+
ParticipationRewards: z10.object({}),
|
|
1344
|
+
TournamentWinnerRewards: z10.object({}),
|
|
1345
|
+
DivisionWinnerRewards: z10.object({}),
|
|
1346
|
+
RosterRecentActivityNumSeasons: z10.number()
|
|
938
1347
|
}) }
|
|
939
1348
|
};
|
|
940
1349
|
var premierConferencesEndpoint = {
|
|
@@ -944,16 +1353,16 @@ var premierConferencesEndpoint = {
|
|
|
944
1353
|
type: "pd",
|
|
945
1354
|
suffix: "premier/v1/affinities/{region}/conferences",
|
|
946
1355
|
riotRequirements: player,
|
|
947
|
-
responses: { "200":
|
|
948
|
-
PremierConferences:
|
|
949
|
-
id:
|
|
950
|
-
key:
|
|
951
|
-
isSuper:
|
|
952
|
-
gamePods:
|
|
953
|
-
timezone:
|
|
954
|
-
superConference:
|
|
955
|
-
leaderboardPlayoffQualificationDateTime:
|
|
956
|
-
leaderboardPromotionFinalizationDateTime:
|
|
1356
|
+
responses: { "200": z10.object({
|
|
1357
|
+
PremierConferences: z10.array(z10.object({
|
|
1358
|
+
id: z10.string(),
|
|
1359
|
+
key: z10.string(),
|
|
1360
|
+
isSuper: z10.boolean(),
|
|
1361
|
+
gamePods: z10.array(z10.string()),
|
|
1362
|
+
timezone: z10.string(),
|
|
1363
|
+
superConference: z10.string().optional(),
|
|
1364
|
+
leaderboardPlayoffQualificationDateTime: z10.string(),
|
|
1365
|
+
leaderboardPromotionFinalizationDateTime: z10.string()
|
|
957
1366
|
}))
|
|
958
1367
|
}) }
|
|
959
1368
|
};
|
|
@@ -964,10 +1373,10 @@ var premierMatchLimitEndpoint = {
|
|
|
964
1373
|
type: "pd",
|
|
965
1374
|
suffix: "premier/v1/matchlimitinfo",
|
|
966
1375
|
riotRequirements: player,
|
|
967
|
-
responses: { "200":
|
|
968
|
-
leagueMatchLimit:
|
|
969
|
-
tournamentLimit:
|
|
970
|
-
timeUntilNextResetSeconds:
|
|
1376
|
+
responses: { "200": z10.object({
|
|
1377
|
+
leagueMatchLimit: z10.number(),
|
|
1378
|
+
tournamentLimit: z10.number(),
|
|
1379
|
+
timeUntilNextResetSeconds: z10.number()
|
|
971
1380
|
}) }
|
|
972
1381
|
};
|
|
973
1382
|
var premierEligibilityEndpoint = {
|
|
@@ -977,12 +1386,12 @@ var premierEligibilityEndpoint = {
|
|
|
977
1386
|
type: "pd",
|
|
978
1387
|
suffix: "premier/v1/player/eligibility",
|
|
979
1388
|
riotRequirements: player,
|
|
980
|
-
responses: { "200":
|
|
981
|
-
subject:
|
|
982
|
-
accountVerificationStatus:
|
|
983
|
-
rankedPlacementCompletionStatus:
|
|
984
|
-
matchLimitReached:
|
|
985
|
-
isOnProvidedRoster:
|
|
1389
|
+
responses: { "200": z10.object({
|
|
1390
|
+
subject: z10.string(),
|
|
1391
|
+
accountVerificationStatus: z10.boolean(),
|
|
1392
|
+
rankedPlacementCompletionStatus: z10.boolean(),
|
|
1393
|
+
matchLimitReached: z10.boolean(),
|
|
1394
|
+
isOnProvidedRoster: z10.boolean()
|
|
986
1395
|
}) }
|
|
987
1396
|
};
|
|
988
1397
|
var premierPlayerV2Endpoint = {
|
|
@@ -992,12 +1401,12 @@ var premierPlayerV2Endpoint = {
|
|
|
992
1401
|
type: "pd",
|
|
993
1402
|
suffix: "premier/v2/players/{puuid}",
|
|
994
1403
|
riotRequirements: player,
|
|
995
|
-
responses: { "200":
|
|
996
|
-
puuid:
|
|
997
|
-
rosterId:
|
|
998
|
-
version:
|
|
999
|
-
createdAt:
|
|
1000
|
-
updatedAt:
|
|
1404
|
+
responses: { "200": z10.object({
|
|
1405
|
+
puuid: z10.string(),
|
|
1406
|
+
rosterId: z10.string(),
|
|
1407
|
+
version: z10.number(),
|
|
1408
|
+
createdAt: z10.number(),
|
|
1409
|
+
updatedAt: z10.number()
|
|
1001
1410
|
}) }
|
|
1002
1411
|
};
|
|
1003
1412
|
var premierPlayerV3Endpoint = {
|
|
@@ -1007,39 +1416,150 @@ var premierPlayerV3Endpoint = {
|
|
|
1007
1416
|
type: "pd",
|
|
1008
1417
|
suffix: "premier/v3/players/{puuid}",
|
|
1009
1418
|
riotRequirements: player,
|
|
1010
|
-
responses: { "200":
|
|
1011
|
-
puuid:
|
|
1012
|
-
rosterId:
|
|
1013
|
-
prestige:
|
|
1014
|
-
earnedPrestige:
|
|
1015
|
-
earnedAura:
|
|
1016
|
-
showTag:
|
|
1017
|
-
showPlating:
|
|
1018
|
-
showAura:
|
|
1419
|
+
responses: { "200": z10.object({
|
|
1420
|
+
puuid: z10.string(),
|
|
1421
|
+
rosterId: z10.string(),
|
|
1422
|
+
prestige: z10.object({
|
|
1423
|
+
earnedPrestige: z10.boolean(),
|
|
1424
|
+
earnedAura: z10.boolean(),
|
|
1425
|
+
showTag: z10.boolean(),
|
|
1426
|
+
showPlating: z10.boolean(),
|
|
1427
|
+
showAura: z10.boolean()
|
|
1019
1428
|
}),
|
|
1020
|
-
contenderEligibilityExpiry:
|
|
1021
|
-
socialVersion:
|
|
1022
|
-
premierVersion:
|
|
1023
|
-
updatedAt:
|
|
1024
|
-
seasons:
|
|
1025
|
-
"08d281c5-4426-3aaa-3316-ebaf5f2c858a":
|
|
1026
|
-
seasonId:
|
|
1027
|
-
hasEarnedPrestigeAura:
|
|
1028
|
-
hasEarnedParticipation:
|
|
1029
|
-
hasEarnedDivisionWinner:
|
|
1429
|
+
contenderEligibilityExpiry: z10.string(),
|
|
1430
|
+
socialVersion: z10.number(),
|
|
1431
|
+
premierVersion: z10.number(),
|
|
1432
|
+
updatedAt: z10.number(),
|
|
1433
|
+
seasons: z10.object({
|
|
1434
|
+
"08d281c5-4426-3aaa-3316-ebaf5f2c858a": z10.object({
|
|
1435
|
+
seasonId: z10.string(),
|
|
1436
|
+
hasEarnedPrestigeAura: z10.boolean(),
|
|
1437
|
+
hasEarnedParticipation: z10.boolean(),
|
|
1438
|
+
hasEarnedDivisionWinner: z10.boolean()
|
|
1030
1439
|
}),
|
|
1031
|
-
"91be4c20-439d-8e24-f577-4ca8a98e8dc8":
|
|
1032
|
-
seasonId:
|
|
1033
|
-
hasEarnedPrestigeAura:
|
|
1034
|
-
hasEarnedParticipation:
|
|
1035
|
-
hasEarnedDivisionWinner:
|
|
1440
|
+
"91be4c20-439d-8e24-f577-4ca8a98e8dc8": z10.object({
|
|
1441
|
+
seasonId: z10.string(),
|
|
1442
|
+
hasEarnedPrestigeAura: z10.boolean(),
|
|
1443
|
+
hasEarnedParticipation: z10.boolean(),
|
|
1444
|
+
hasEarnedDivisionWinner: z10.boolean()
|
|
1036
1445
|
})
|
|
1037
1446
|
})
|
|
1038
1447
|
}) }
|
|
1039
1448
|
};
|
|
1040
1449
|
|
|
1450
|
+
// src/endpoints/riot/presence.ts
|
|
1451
|
+
import { endpoints as e7 } from "valorant-api-types";
|
|
1452
|
+
import { z as z11 } from "zod";
|
|
1453
|
+
|
|
1454
|
+
// src/internal/base64.ts
|
|
1455
|
+
function toBase64(text2) {
|
|
1456
|
+
return Buffer.from(text2, "utf8").toString("base64");
|
|
1457
|
+
}
|
|
1458
|
+
function fromBase64(encoded) {
|
|
1459
|
+
return Buffer.from(encoded, "base64").toString("utf8");
|
|
1460
|
+
}
|
|
1461
|
+
function basicAuth(user, password) {
|
|
1462
|
+
return `Basic ${toBase64(`${user}:${password}`)}`;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
// src/endpoints/riot/presence.ts
|
|
1466
|
+
var valorantPresence = z11.object({
|
|
1467
|
+
isIdle: z11.boolean(),
|
|
1468
|
+
isValid: z11.boolean(),
|
|
1469
|
+
matchPresenceData: z11.object({
|
|
1470
|
+
gameScoreType: z11.string(),
|
|
1471
|
+
matchMap: z11.string(),
|
|
1472
|
+
provisioningFlow: z11.string(),
|
|
1473
|
+
queueId: z11.string(),
|
|
1474
|
+
sessionLoopState: z11.string()
|
|
1475
|
+
}),
|
|
1476
|
+
maxPartySize: z11.number(),
|
|
1477
|
+
partyId: z11.string(),
|
|
1478
|
+
partyOwnerMatchScoreAllyTeam: z11.number(),
|
|
1479
|
+
partyOwnerMatchScoreEnemyTeam: z11.number(),
|
|
1480
|
+
partyPresenceData: z11.object({
|
|
1481
|
+
customGameName: z11.string(),
|
|
1482
|
+
customGameTeam: z11.string(),
|
|
1483
|
+
isPartyCrossPlayEnabled: z11.boolean(),
|
|
1484
|
+
isPartyOwner: z11.boolean(),
|
|
1485
|
+
isPlayerCrossPlayEnabled: z11.boolean(),
|
|
1486
|
+
maxPartySize: z11.number(),
|
|
1487
|
+
partyAccessibility: z11.string(),
|
|
1488
|
+
partyClientVersion: z11.string(),
|
|
1489
|
+
partyId: z11.string(),
|
|
1490
|
+
partyLFM: z11.boolean(),
|
|
1491
|
+
partyOwnerMatchMap: z11.string(),
|
|
1492
|
+
partyOwnerMatchScoreAllyTeam: z11.number(),
|
|
1493
|
+
partyOwnerMatchScoreEnemyTeam: z11.number(),
|
|
1494
|
+
partyOwnerProvisioningFlow: z11.string(),
|
|
1495
|
+
partyOwnerSessionLoopState: z11.string(),
|
|
1496
|
+
partyPrecisePlatformTypes: z11.number(),
|
|
1497
|
+
partySize: z11.number(),
|
|
1498
|
+
partyState: z11.string(),
|
|
1499
|
+
partyVersion: z11.number(),
|
|
1500
|
+
queueEntryTime: z11.string(),
|
|
1501
|
+
rosterId: z11.string(),
|
|
1502
|
+
tournamentId: z11.string()
|
|
1503
|
+
}),
|
|
1504
|
+
partySize: z11.number(),
|
|
1505
|
+
playerPresenceData: z11.object({
|
|
1506
|
+
accountLevel: z11.number(),
|
|
1507
|
+
competitiveTier: z11.number(),
|
|
1508
|
+
leaderboardPosition: z11.number(),
|
|
1509
|
+
platformOverride: z11.string(),
|
|
1510
|
+
playerCardId: z11.string(),
|
|
1511
|
+
playerTitleId: z11.string(),
|
|
1512
|
+
tempValueAA: z11.number()
|
|
1513
|
+
}),
|
|
1514
|
+
premierPresenceData: z11.object({
|
|
1515
|
+
division: z11.number(),
|
|
1516
|
+
plating: z11.number(),
|
|
1517
|
+
rosterId: z11.string(),
|
|
1518
|
+
rosterName: z11.string(),
|
|
1519
|
+
rosterTag: z11.string(),
|
|
1520
|
+
rosterType: z11.string(),
|
|
1521
|
+
score: z11.number(),
|
|
1522
|
+
showAura: z11.boolean(),
|
|
1523
|
+
showPlating: z11.boolean(),
|
|
1524
|
+
showTag: z11.boolean()
|
|
1525
|
+
}),
|
|
1526
|
+
provisioningFlow: z11.string(),
|
|
1527
|
+
queueId: z11.string()
|
|
1528
|
+
});
|
|
1529
|
+
function decodePresence(raw) {
|
|
1530
|
+
if (!raw) return null;
|
|
1531
|
+
try {
|
|
1532
|
+
return valorantPresence.parse(JSON.parse(fromBase64(raw)));
|
|
1533
|
+
} catch {
|
|
1534
|
+
return null;
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
var presenceEndpoint = withResponse(e7.presenceEndpoint, z11.object({
|
|
1538
|
+
presences: z11.array(z11.object({
|
|
1539
|
+
activePlatform: z11.string().nullable(),
|
|
1540
|
+
basic: z11.string(),
|
|
1541
|
+
game_name: z11.string(),
|
|
1542
|
+
game_tag: z11.string(),
|
|
1543
|
+
msg: z11.string().nullable(),
|
|
1544
|
+
name: z11.string(),
|
|
1545
|
+
packedData: z11.string().nullable(),
|
|
1546
|
+
patchline: z11.string().nullable(),
|
|
1547
|
+
pid: z11.string(),
|
|
1548
|
+
platform: z11.string().nullable(),
|
|
1549
|
+
product: z11.string(),
|
|
1550
|
+
puuid: z11.string(),
|
|
1551
|
+
region: z11.string(),
|
|
1552
|
+
resource: z11.string(),
|
|
1553
|
+
state: z11.string(),
|
|
1554
|
+
summary: z11.string(),
|
|
1555
|
+
time: z11.number(),
|
|
1556
|
+
private: z11.string().nullable().transform(decodePresence)
|
|
1557
|
+
}))
|
|
1558
|
+
}));
|
|
1559
|
+
|
|
1041
1560
|
// src/endpoints/riot/pvp.ts
|
|
1042
|
-
import {
|
|
1561
|
+
import { endpoints as e8 } from "valorant-api-types";
|
|
1562
|
+
import { z as z12 } from "zod";
|
|
1043
1563
|
var playerLoadoutV3Endpoint = {
|
|
1044
1564
|
name: "Player Loadout V3",
|
|
1045
1565
|
description: "Current loadout. The v2 route used by `pvp.playerLoadout` answers 404 on current clients.",
|
|
@@ -1047,36 +1567,44 @@ var playerLoadoutV3Endpoint = {
|
|
|
1047
1567
|
type: "pd",
|
|
1048
1568
|
suffix: "personalization/v3/players/{puuid}/playerloadout",
|
|
1049
1569
|
riotRequirements: player,
|
|
1050
|
-
responses: { "200":
|
|
1051
|
-
Subject:
|
|
1052
|
-
Version:
|
|
1053
|
-
Guns:
|
|
1054
|
-
ID:
|
|
1055
|
-
SkinID:
|
|
1056
|
-
SkinLevelID:
|
|
1057
|
-
ChromaID:
|
|
1058
|
-
CharmInstanceID:
|
|
1059
|
-
CharmID:
|
|
1060
|
-
CharmLevelID:
|
|
1570
|
+
responses: { "200": z12.object({
|
|
1571
|
+
Subject: z12.string(),
|
|
1572
|
+
Version: z12.number(),
|
|
1573
|
+
Guns: z12.array(z12.object({
|
|
1574
|
+
ID: z12.string(),
|
|
1575
|
+
SkinID: z12.string(),
|
|
1576
|
+
SkinLevelID: z12.string(),
|
|
1577
|
+
ChromaID: z12.string(),
|
|
1578
|
+
CharmInstanceID: z12.string().optional(),
|
|
1579
|
+
CharmID: z12.string().optional(),
|
|
1580
|
+
CharmLevelID: z12.string().optional()
|
|
1061
1581
|
})),
|
|
1062
|
-
ActiveExpressions:
|
|
1063
|
-
TypeID:
|
|
1064
|
-
AssetID:
|
|
1582
|
+
ActiveExpressions: z12.array(z12.object({
|
|
1583
|
+
TypeID: z12.string(),
|
|
1584
|
+
AssetID: z12.string()
|
|
1065
1585
|
})),
|
|
1066
|
-
DynamicOptions:
|
|
1067
|
-
Identity:
|
|
1068
|
-
PlayerCardID:
|
|
1069
|
-
PlayerTitleID:
|
|
1070
|
-
AccountLevel:
|
|
1071
|
-
PreferredLevelBorderID:
|
|
1072
|
-
HideAccountLevel:
|
|
1586
|
+
DynamicOptions: z12.object({}),
|
|
1587
|
+
Identity: z12.object({
|
|
1588
|
+
PlayerCardID: z12.string(),
|
|
1589
|
+
PlayerTitleID: z12.string(),
|
|
1590
|
+
AccountLevel: z12.number(),
|
|
1591
|
+
PreferredLevelBorderID: z12.string(),
|
|
1592
|
+
HideAccountLevel: z12.boolean()
|
|
1073
1593
|
}),
|
|
1074
|
-
Incognito:
|
|
1594
|
+
Incognito: z12.boolean()
|
|
1075
1595
|
}) }
|
|
1076
1596
|
};
|
|
1597
|
+
var configEndpoint = withResponse(
|
|
1598
|
+
{ ...onSharedHost(e8.configEndpoint), riotRequirements: player },
|
|
1599
|
+
z12.object({
|
|
1600
|
+
LastApplication: z12.string().datetime({ offset: true }).transform((value) => new Date(value)),
|
|
1601
|
+
/** Game settings by name. Every value is a string, and the set of names changes with each patch. */
|
|
1602
|
+
Collapsed: z12.record(z12.string(), z12.string())
|
|
1603
|
+
})
|
|
1604
|
+
);
|
|
1077
1605
|
|
|
1078
1606
|
// src/endpoints/riot/restrictions.ts
|
|
1079
|
-
import { z as
|
|
1607
|
+
import { z as z13 } from "zod";
|
|
1080
1608
|
var avoidListEndpoint = {
|
|
1081
1609
|
name: "Avoid List",
|
|
1082
1610
|
description: "Players the account avoids in matchmaking.",
|
|
@@ -1084,8 +1612,8 @@ var avoidListEndpoint = {
|
|
|
1084
1612
|
type: "pd",
|
|
1085
1613
|
suffix: "restrictions/v1/avoidList",
|
|
1086
1614
|
riotRequirements: player,
|
|
1087
|
-
responses: { "200":
|
|
1088
|
-
Subject:
|
|
1615
|
+
responses: { "200": z13.object({
|
|
1616
|
+
Subject: z13.string()
|
|
1089
1617
|
}) }
|
|
1090
1618
|
};
|
|
1091
1619
|
var activeFutureInterventionsEndpoint = {
|
|
@@ -1095,13 +1623,14 @@ var activeFutureInterventionsEndpoint = {
|
|
|
1095
1623
|
type: "pd",
|
|
1096
1624
|
suffix: "restrictions/v1/activeFutureInterventions",
|
|
1097
1625
|
riotRequirements: player,
|
|
1098
|
-
responses: { "200":
|
|
1099
|
-
Subject:
|
|
1626
|
+
responses: { "200": z13.object({
|
|
1627
|
+
Subject: z13.string()
|
|
1100
1628
|
}) }
|
|
1101
1629
|
};
|
|
1102
1630
|
|
|
1103
1631
|
// src/endpoints/riot/store.ts
|
|
1104
|
-
import {
|
|
1632
|
+
import { endpoints as e9 } from "valorant-api-types";
|
|
1633
|
+
import { z as z14 } from "zod";
|
|
1105
1634
|
var agentStoreEndpoint = {
|
|
1106
1635
|
name: "Agent Store",
|
|
1107
1636
|
description: "Agents offered in the store.",
|
|
@@ -1109,24 +1638,24 @@ var agentStoreEndpoint = {
|
|
|
1109
1638
|
type: "pd",
|
|
1110
1639
|
suffix: "store/v1/storefronts/agent",
|
|
1111
1640
|
riotRequirements: player,
|
|
1112
|
-
responses: { "200":
|
|
1113
|
-
AgentStore:
|
|
1114
|
-
AgentStoreOffers:
|
|
1115
|
-
AgentID:
|
|
1116
|
-
StoreOffers:
|
|
1117
|
-
OfferID:
|
|
1118
|
-
IsDirectPurchase:
|
|
1119
|
-
StartDate:
|
|
1120
|
-
Cost:
|
|
1121
|
-
Rewards:
|
|
1122
|
-
ItemTypeID:
|
|
1123
|
-
ItemID:
|
|
1124
|
-
Quantity:
|
|
1641
|
+
responses: { "200": z14.object({
|
|
1642
|
+
AgentStore: z14.object({
|
|
1643
|
+
AgentStoreOffers: z14.array(z14.object({
|
|
1644
|
+
AgentID: z14.string(),
|
|
1645
|
+
StoreOffers: z14.array(z14.object({
|
|
1646
|
+
OfferID: z14.string(),
|
|
1647
|
+
IsDirectPurchase: z14.boolean(),
|
|
1648
|
+
StartDate: z14.string(),
|
|
1649
|
+
Cost: z14.record(z14.string(), z14.number()),
|
|
1650
|
+
Rewards: z14.array(z14.object({
|
|
1651
|
+
ItemTypeID: z14.string(),
|
|
1652
|
+
ItemID: z14.string(),
|
|
1653
|
+
Quantity: z14.number()
|
|
1125
1654
|
}))
|
|
1126
1655
|
}))
|
|
1127
1656
|
})),
|
|
1128
|
-
CurrentFeaturedAgent:
|
|
1129
|
-
NextFeaturedAgent:
|
|
1657
|
+
CurrentFeaturedAgent: z14.string(),
|
|
1658
|
+
NextFeaturedAgent: z14.string()
|
|
1130
1659
|
})
|
|
1131
1660
|
}) }
|
|
1132
1661
|
};
|
|
@@ -1137,20 +1666,27 @@ var allEntitlementsEndpoint = {
|
|
|
1137
1666
|
type: "pd",
|
|
1138
1667
|
suffix: "store/v1/entitlements/{puuid}",
|
|
1139
1668
|
riotRequirements: player,
|
|
1140
|
-
responses: { "200":
|
|
1141
|
-
EntitlementsByTypes:
|
|
1142
|
-
ItemTypeID:
|
|
1143
|
-
Entitlements:
|
|
1144
|
-
TypeID:
|
|
1145
|
-
ItemID:
|
|
1146
|
-
InstanceID:
|
|
1669
|
+
responses: { "200": z14.object({
|
|
1670
|
+
EntitlementsByTypes: z14.array(z14.object({
|
|
1671
|
+
ItemTypeID: z14.string(),
|
|
1672
|
+
Entitlements: z14.array(z14.object({
|
|
1673
|
+
TypeID: z14.string(),
|
|
1674
|
+
ItemID: z14.string(),
|
|
1675
|
+
InstanceID: z14.string().optional()
|
|
1147
1676
|
}))
|
|
1148
1677
|
}))
|
|
1149
1678
|
}) }
|
|
1150
1679
|
};
|
|
1680
|
+
var ownedItemsEndpoint = withResponse(e9.ownedItemsEndpoint, z14.object({
|
|
1681
|
+
ItemTypeID: z14.string(),
|
|
1682
|
+
Entitlements: z14.array(z14.object({
|
|
1683
|
+
TypeID: z14.string(),
|
|
1684
|
+
ItemID: z14.string()
|
|
1685
|
+
}))
|
|
1686
|
+
}));
|
|
1151
1687
|
|
|
1152
1688
|
// src/endpoints/riot/storefront.ts
|
|
1153
|
-
import { z as
|
|
1689
|
+
import { z as z15 } from "zod";
|
|
1154
1690
|
var storefrontV3Endpoint = {
|
|
1155
1691
|
name: "Storefront V3",
|
|
1156
1692
|
description: "Get the current storefront of the player: featured bundles, the daily skin offers, accessories and night market plugins. Replaces the v2 storefront endpoint, which now answers 404.",
|
|
@@ -1160,266 +1696,266 @@ var storefrontV3Endpoint = {
|
|
|
1160
1696
|
suffix: "store/v3/storefront/{puuid}",
|
|
1161
1697
|
headers: /* @__PURE__ */ new Map([["Content-Type", "application/json"]]),
|
|
1162
1698
|
riotRequirements: player,
|
|
1163
|
-
responses: { "200":
|
|
1164
|
-
FeaturedBundle:
|
|
1165
|
-
Bundle:
|
|
1166
|
-
ID:
|
|
1167
|
-
DataAssetID:
|
|
1168
|
-
CurrencyID:
|
|
1169
|
-
Items:
|
|
1170
|
-
Item:
|
|
1171
|
-
ItemTypeID:
|
|
1172
|
-
ItemID:
|
|
1173
|
-
Amount:
|
|
1699
|
+
responses: { "200": z15.object({
|
|
1700
|
+
FeaturedBundle: z15.object({
|
|
1701
|
+
Bundle: z15.object({
|
|
1702
|
+
ID: z15.string(),
|
|
1703
|
+
DataAssetID: z15.string(),
|
|
1704
|
+
CurrencyID: z15.string(),
|
|
1705
|
+
Items: z15.array(z15.object({
|
|
1706
|
+
Item: z15.object({
|
|
1707
|
+
ItemTypeID: z15.string(),
|
|
1708
|
+
ItemID: z15.string(),
|
|
1709
|
+
Amount: z15.number()
|
|
1174
1710
|
}),
|
|
1175
|
-
BasePrice:
|
|
1176
|
-
CurrencyID:
|
|
1177
|
-
DiscountPercent:
|
|
1178
|
-
DiscountedPrice:
|
|
1179
|
-
IsPromoItem:
|
|
1711
|
+
BasePrice: z15.number(),
|
|
1712
|
+
CurrencyID: z15.string(),
|
|
1713
|
+
DiscountPercent: z15.number(),
|
|
1714
|
+
DiscountedPrice: z15.number(),
|
|
1715
|
+
IsPromoItem: z15.boolean()
|
|
1180
1716
|
})),
|
|
1181
|
-
ItemOffers:
|
|
1182
|
-
BundleItemOfferID:
|
|
1183
|
-
Offer:
|
|
1184
|
-
OfferID:
|
|
1185
|
-
IsDirectPurchase:
|
|
1186
|
-
StartDate:
|
|
1187
|
-
Cost:
|
|
1188
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1717
|
+
ItemOffers: z15.array(z15.object({
|
|
1718
|
+
BundleItemOfferID: z15.string(),
|
|
1719
|
+
Offer: z15.object({
|
|
1720
|
+
OfferID: z15.string(),
|
|
1721
|
+
IsDirectPurchase: z15.boolean(),
|
|
1722
|
+
StartDate: z15.string(),
|
|
1723
|
+
Cost: z15.object({
|
|
1724
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1189
1725
|
}),
|
|
1190
|
-
Rewards:
|
|
1191
|
-
ItemTypeID:
|
|
1192
|
-
ItemID:
|
|
1193
|
-
Quantity:
|
|
1726
|
+
Rewards: z15.array(z15.object({
|
|
1727
|
+
ItemTypeID: z15.string(),
|
|
1728
|
+
ItemID: z15.string(),
|
|
1729
|
+
Quantity: z15.number()
|
|
1194
1730
|
}))
|
|
1195
1731
|
}),
|
|
1196
|
-
DiscountPercent:
|
|
1197
|
-
DiscountedCost:
|
|
1198
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1732
|
+
DiscountPercent: z15.number(),
|
|
1733
|
+
DiscountedCost: z15.object({
|
|
1734
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1199
1735
|
})
|
|
1200
1736
|
})),
|
|
1201
|
-
TotalBaseCost:
|
|
1202
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1737
|
+
TotalBaseCost: z15.object({
|
|
1738
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1203
1739
|
}),
|
|
1204
|
-
TotalDiscountedCost:
|
|
1205
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1740
|
+
TotalDiscountedCost: z15.object({
|
|
1741
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1206
1742
|
}),
|
|
1207
|
-
TotalDiscountPercent:
|
|
1208
|
-
DurationRemainingInSeconds:
|
|
1209
|
-
WholesaleOnly:
|
|
1210
|
-
IsGiftable:
|
|
1743
|
+
TotalDiscountPercent: z15.number(),
|
|
1744
|
+
DurationRemainingInSeconds: z15.number(),
|
|
1745
|
+
WholesaleOnly: z15.boolean(),
|
|
1746
|
+
IsGiftable: z15.number()
|
|
1211
1747
|
}),
|
|
1212
|
-
Bundles:
|
|
1213
|
-
ID:
|
|
1214
|
-
DataAssetID:
|
|
1215
|
-
CurrencyID:
|
|
1216
|
-
Items:
|
|
1217
|
-
Item:
|
|
1218
|
-
ItemTypeID:
|
|
1219
|
-
ItemID:
|
|
1220
|
-
Amount:
|
|
1748
|
+
Bundles: z15.array(z15.object({
|
|
1749
|
+
ID: z15.string(),
|
|
1750
|
+
DataAssetID: z15.string(),
|
|
1751
|
+
CurrencyID: z15.string(),
|
|
1752
|
+
Items: z15.array(z15.object({
|
|
1753
|
+
Item: z15.object({
|
|
1754
|
+
ItemTypeID: z15.string(),
|
|
1755
|
+
ItemID: z15.string(),
|
|
1756
|
+
Amount: z15.number()
|
|
1221
1757
|
}),
|
|
1222
|
-
BasePrice:
|
|
1223
|
-
CurrencyID:
|
|
1224
|
-
DiscountPercent:
|
|
1225
|
-
DiscountedPrice:
|
|
1226
|
-
IsPromoItem:
|
|
1758
|
+
BasePrice: z15.number(),
|
|
1759
|
+
CurrencyID: z15.string(),
|
|
1760
|
+
DiscountPercent: z15.number(),
|
|
1761
|
+
DiscountedPrice: z15.number(),
|
|
1762
|
+
IsPromoItem: z15.boolean()
|
|
1227
1763
|
})),
|
|
1228
|
-
ItemOffers:
|
|
1229
|
-
BundleItemOfferID:
|
|
1230
|
-
Offer:
|
|
1231
|
-
OfferID:
|
|
1232
|
-
IsDirectPurchase:
|
|
1233
|
-
StartDate:
|
|
1234
|
-
Cost:
|
|
1235
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1764
|
+
ItemOffers: z15.array(z15.object({
|
|
1765
|
+
BundleItemOfferID: z15.string(),
|
|
1766
|
+
Offer: z15.object({
|
|
1767
|
+
OfferID: z15.string(),
|
|
1768
|
+
IsDirectPurchase: z15.boolean(),
|
|
1769
|
+
StartDate: z15.string(),
|
|
1770
|
+
Cost: z15.object({
|
|
1771
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1236
1772
|
}),
|
|
1237
|
-
Rewards:
|
|
1238
|
-
ItemTypeID:
|
|
1239
|
-
ItemID:
|
|
1240
|
-
Quantity:
|
|
1773
|
+
Rewards: z15.array(z15.object({
|
|
1774
|
+
ItemTypeID: z15.string(),
|
|
1775
|
+
ItemID: z15.string(),
|
|
1776
|
+
Quantity: z15.number()
|
|
1241
1777
|
}))
|
|
1242
1778
|
}),
|
|
1243
|
-
DiscountPercent:
|
|
1244
|
-
DiscountedCost:
|
|
1245
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1779
|
+
DiscountPercent: z15.number(),
|
|
1780
|
+
DiscountedCost: z15.object({
|
|
1781
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1246
1782
|
})
|
|
1247
1783
|
})),
|
|
1248
|
-
TotalBaseCost:
|
|
1249
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1784
|
+
TotalBaseCost: z15.object({
|
|
1785
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1250
1786
|
}),
|
|
1251
|
-
TotalDiscountedCost:
|
|
1252
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1787
|
+
TotalDiscountedCost: z15.object({
|
|
1788
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1253
1789
|
}),
|
|
1254
|
-
TotalDiscountPercent:
|
|
1255
|
-
DurationRemainingInSeconds:
|
|
1256
|
-
WholesaleOnly:
|
|
1257
|
-
IsGiftable:
|
|
1790
|
+
TotalDiscountPercent: z15.number(),
|
|
1791
|
+
DurationRemainingInSeconds: z15.number(),
|
|
1792
|
+
WholesaleOnly: z15.boolean(),
|
|
1793
|
+
IsGiftable: z15.number()
|
|
1258
1794
|
})),
|
|
1259
|
-
FeaturedTileEntries:
|
|
1260
|
-
Type:
|
|
1261
|
-
Entry:
|
|
1262
|
-
Bundle:
|
|
1263
|
-
ID:
|
|
1264
|
-
DataAssetID:
|
|
1265
|
-
CurrencyID:
|
|
1266
|
-
Items:
|
|
1267
|
-
Item:
|
|
1268
|
-
ItemTypeID:
|
|
1269
|
-
ItemID:
|
|
1270
|
-
Amount:
|
|
1795
|
+
FeaturedTileEntries: z15.array(z15.object({
|
|
1796
|
+
Type: z15.number(),
|
|
1797
|
+
Entry: z15.object({
|
|
1798
|
+
Bundle: z15.object({
|
|
1799
|
+
ID: z15.string(),
|
|
1800
|
+
DataAssetID: z15.string(),
|
|
1801
|
+
CurrencyID: z15.string(),
|
|
1802
|
+
Items: z15.array(z15.object({
|
|
1803
|
+
Item: z15.object({
|
|
1804
|
+
ItemTypeID: z15.string(),
|
|
1805
|
+
ItemID: z15.string(),
|
|
1806
|
+
Amount: z15.number()
|
|
1271
1807
|
}),
|
|
1272
|
-
BasePrice:
|
|
1273
|
-
CurrencyID:
|
|
1274
|
-
DiscountPercent:
|
|
1275
|
-
DiscountedPrice:
|
|
1276
|
-
IsPromoItem:
|
|
1808
|
+
BasePrice: z15.number(),
|
|
1809
|
+
CurrencyID: z15.string(),
|
|
1810
|
+
DiscountPercent: z15.number(),
|
|
1811
|
+
DiscountedPrice: z15.number(),
|
|
1812
|
+
IsPromoItem: z15.boolean()
|
|
1277
1813
|
})),
|
|
1278
|
-
ItemOffers:
|
|
1279
|
-
BundleItemOfferID:
|
|
1280
|
-
Offer:
|
|
1281
|
-
OfferID:
|
|
1282
|
-
IsDirectPurchase:
|
|
1283
|
-
StartDate:
|
|
1284
|
-
Cost:
|
|
1285
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1814
|
+
ItemOffers: z15.array(z15.object({
|
|
1815
|
+
BundleItemOfferID: z15.string(),
|
|
1816
|
+
Offer: z15.object({
|
|
1817
|
+
OfferID: z15.string(),
|
|
1818
|
+
IsDirectPurchase: z15.boolean(),
|
|
1819
|
+
StartDate: z15.string(),
|
|
1820
|
+
Cost: z15.object({
|
|
1821
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1286
1822
|
}),
|
|
1287
|
-
Rewards:
|
|
1288
|
-
ItemTypeID:
|
|
1289
|
-
ItemID:
|
|
1290
|
-
Quantity:
|
|
1823
|
+
Rewards: z15.array(z15.object({
|
|
1824
|
+
ItemTypeID: z15.string(),
|
|
1825
|
+
ItemID: z15.string(),
|
|
1826
|
+
Quantity: z15.number()
|
|
1291
1827
|
}))
|
|
1292
1828
|
}),
|
|
1293
|
-
DiscountPercent:
|
|
1294
|
-
DiscountedCost:
|
|
1295
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1829
|
+
DiscountPercent: z15.number(),
|
|
1830
|
+
DiscountedCost: z15.object({
|
|
1831
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1296
1832
|
})
|
|
1297
1833
|
})),
|
|
1298
|
-
TotalBaseCost:
|
|
1299
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1834
|
+
TotalBaseCost: z15.object({
|
|
1835
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1300
1836
|
}),
|
|
1301
|
-
TotalDiscountedCost:
|
|
1302
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1837
|
+
TotalDiscountedCost: z15.object({
|
|
1838
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1303
1839
|
}),
|
|
1304
|
-
TotalDiscountPercent:
|
|
1305
|
-
DurationRemainingInSeconds:
|
|
1306
|
-
WholesaleOnly:
|
|
1307
|
-
IsGiftable:
|
|
1840
|
+
TotalDiscountPercent: z15.number(),
|
|
1841
|
+
DurationRemainingInSeconds: z15.number(),
|
|
1842
|
+
WholesaleOnly: z15.boolean(),
|
|
1843
|
+
IsGiftable: z15.number()
|
|
1308
1844
|
})
|
|
1309
1845
|
})
|
|
1310
1846
|
})),
|
|
1311
|
-
BundleRemainingDurationInSeconds:
|
|
1847
|
+
BundleRemainingDurationInSeconds: z15.number()
|
|
1312
1848
|
}),
|
|
1313
|
-
SkinsPanelLayout:
|
|
1314
|
-
SingleItemOffers:
|
|
1315
|
-
SingleItemStoreOffers:
|
|
1316
|
-
OfferID:
|
|
1317
|
-
IsDirectPurchase:
|
|
1318
|
-
StartDate:
|
|
1319
|
-
Cost:
|
|
1320
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1849
|
+
SkinsPanelLayout: z15.object({
|
|
1850
|
+
SingleItemOffers: z15.array(z15.string()),
|
|
1851
|
+
SingleItemStoreOffers: z15.array(z15.object({
|
|
1852
|
+
OfferID: z15.string(),
|
|
1853
|
+
IsDirectPurchase: z15.boolean(),
|
|
1854
|
+
StartDate: z15.string(),
|
|
1855
|
+
Cost: z15.object({
|
|
1856
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1321
1857
|
}),
|
|
1322
|
-
Rewards:
|
|
1323
|
-
ItemTypeID:
|
|
1324
|
-
ItemID:
|
|
1325
|
-
Quantity:
|
|
1858
|
+
Rewards: z15.array(z15.object({
|
|
1859
|
+
ItemTypeID: z15.string(),
|
|
1860
|
+
ItemID: z15.string(),
|
|
1861
|
+
Quantity: z15.number()
|
|
1326
1862
|
}))
|
|
1327
1863
|
})),
|
|
1328
|
-
SingleItemOffersRemainingDurationInSeconds:
|
|
1864
|
+
SingleItemOffersRemainingDurationInSeconds: z15.number()
|
|
1329
1865
|
}),
|
|
1330
|
-
UpgradeCurrencyStore:
|
|
1331
|
-
UpgradeCurrencyOffers:
|
|
1332
|
-
OfferID:
|
|
1333
|
-
StorefrontItemID:
|
|
1334
|
-
Offer:
|
|
1335
|
-
OfferID:
|
|
1336
|
-
IsDirectPurchase:
|
|
1337
|
-
StartDate:
|
|
1338
|
-
Cost:
|
|
1339
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1866
|
+
UpgradeCurrencyStore: z15.object({
|
|
1867
|
+
UpgradeCurrencyOffers: z15.array(z15.object({
|
|
1868
|
+
OfferID: z15.string(),
|
|
1869
|
+
StorefrontItemID: z15.string(),
|
|
1870
|
+
Offer: z15.object({
|
|
1871
|
+
OfferID: z15.string(),
|
|
1872
|
+
IsDirectPurchase: z15.boolean(),
|
|
1873
|
+
StartDate: z15.string(),
|
|
1874
|
+
Cost: z15.object({
|
|
1875
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1340
1876
|
}),
|
|
1341
|
-
Rewards:
|
|
1342
|
-
ItemTypeID:
|
|
1343
|
-
ItemID:
|
|
1344
|
-
Quantity:
|
|
1877
|
+
Rewards: z15.array(z15.object({
|
|
1878
|
+
ItemTypeID: z15.string(),
|
|
1879
|
+
ItemID: z15.string(),
|
|
1880
|
+
Quantity: z15.number()
|
|
1345
1881
|
}))
|
|
1346
1882
|
}),
|
|
1347
|
-
DiscountedPercent:
|
|
1883
|
+
DiscountedPercent: z15.number()
|
|
1348
1884
|
}))
|
|
1349
1885
|
}),
|
|
1350
|
-
AccessoryStore:
|
|
1351
|
-
AccessoryStoreOffers:
|
|
1352
|
-
Offer:
|
|
1353
|
-
OfferID:
|
|
1354
|
-
IsDirectPurchase:
|
|
1355
|
-
StartDate:
|
|
1356
|
-
Cost:
|
|
1357
|
-
"85ca954a-41f2-ce94-9b45-8ca3dd39a00d":
|
|
1886
|
+
AccessoryStore: z15.object({
|
|
1887
|
+
AccessoryStoreOffers: z15.array(z15.object({
|
|
1888
|
+
Offer: z15.object({
|
|
1889
|
+
OfferID: z15.string(),
|
|
1890
|
+
IsDirectPurchase: z15.boolean(),
|
|
1891
|
+
StartDate: z15.string(),
|
|
1892
|
+
Cost: z15.object({
|
|
1893
|
+
"85ca954a-41f2-ce94-9b45-8ca3dd39a00d": z15.number()
|
|
1358
1894
|
}),
|
|
1359
|
-
Rewards:
|
|
1360
|
-
ItemTypeID:
|
|
1361
|
-
ItemID:
|
|
1362
|
-
Quantity:
|
|
1895
|
+
Rewards: z15.array(z15.object({
|
|
1896
|
+
ItemTypeID: z15.string(),
|
|
1897
|
+
ItemID: z15.string(),
|
|
1898
|
+
Quantity: z15.number()
|
|
1363
1899
|
}))
|
|
1364
1900
|
}),
|
|
1365
|
-
ContractID:
|
|
1901
|
+
ContractID: z15.string()
|
|
1366
1902
|
})),
|
|
1367
|
-
AccessoryStoreRemainingDurationInSeconds:
|
|
1368
|
-
StorefrontID:
|
|
1903
|
+
AccessoryStoreRemainingDurationInSeconds: z15.number(),
|
|
1904
|
+
StorefrontID: z15.string()
|
|
1369
1905
|
}),
|
|
1370
|
-
PluginStores:
|
|
1371
|
-
PluginID:
|
|
1372
|
-
PluginOffers:
|
|
1373
|
-
StoreOffers:
|
|
1374
|
-
PurchaseInformation:
|
|
1375
|
-
DataAssetID:
|
|
1376
|
-
OfferID:
|
|
1377
|
-
OfferType:
|
|
1378
|
-
StartDate:
|
|
1379
|
-
PrimaryCurrencyID:
|
|
1380
|
-
Cost:
|
|
1381
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1906
|
+
PluginStores: z15.array(z15.object({
|
|
1907
|
+
PluginID: z15.string(),
|
|
1908
|
+
PluginOffers: z15.object({
|
|
1909
|
+
StoreOffers: z15.array(z15.object({
|
|
1910
|
+
PurchaseInformation: z15.object({
|
|
1911
|
+
DataAssetID: z15.string(),
|
|
1912
|
+
OfferID: z15.string(),
|
|
1913
|
+
OfferType: z15.number(),
|
|
1914
|
+
StartDate: z15.string(),
|
|
1915
|
+
PrimaryCurrencyID: z15.string(),
|
|
1916
|
+
Cost: z15.object({
|
|
1917
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1382
1918
|
}),
|
|
1383
|
-
DiscountedCost:
|
|
1384
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1919
|
+
DiscountedCost: z15.object({
|
|
1920
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1385
1921
|
}),
|
|
1386
|
-
DiscountedPercentage:
|
|
1387
|
-
WholesaleOnly:
|
|
1388
|
-
IsGiftable:
|
|
1922
|
+
DiscountedPercentage: z15.number(),
|
|
1923
|
+
WholesaleOnly: z15.boolean(),
|
|
1924
|
+
IsGiftable: z15.number()
|
|
1389
1925
|
}),
|
|
1390
|
-
SubOffers:
|
|
1391
|
-
PurchaseInformation:
|
|
1392
|
-
DataAssetID:
|
|
1393
|
-
OfferID:
|
|
1394
|
-
OfferType:
|
|
1395
|
-
StartDate:
|
|
1396
|
-
PrimaryCurrencyID:
|
|
1397
|
-
Cost:
|
|
1398
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1926
|
+
SubOffers: z15.array(z15.object({
|
|
1927
|
+
PurchaseInformation: z15.object({
|
|
1928
|
+
DataAssetID: z15.string(),
|
|
1929
|
+
OfferID: z15.string(),
|
|
1930
|
+
OfferType: z15.number(),
|
|
1931
|
+
StartDate: z15.string(),
|
|
1932
|
+
PrimaryCurrencyID: z15.string(),
|
|
1933
|
+
Cost: z15.object({
|
|
1934
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1399
1935
|
}),
|
|
1400
|
-
DiscountedCost:
|
|
1401
|
-
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741":
|
|
1936
|
+
DiscountedCost: z15.object({
|
|
1937
|
+
"85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z15.number()
|
|
1402
1938
|
}),
|
|
1403
|
-
DiscountedPercentage:
|
|
1404
|
-
Rewards:
|
|
1405
|
-
ItemTypeID:
|
|
1406
|
-
ItemID:
|
|
1407
|
-
Quantity:
|
|
1939
|
+
DiscountedPercentage: z15.number(),
|
|
1940
|
+
Rewards: z15.array(z15.object({
|
|
1941
|
+
ItemTypeID: z15.string(),
|
|
1942
|
+
ItemID: z15.string(),
|
|
1943
|
+
Quantity: z15.number()
|
|
1408
1944
|
})),
|
|
1409
|
-
WholesaleOnly:
|
|
1410
|
-
IsGiftable:
|
|
1945
|
+
WholesaleOnly: z15.boolean(),
|
|
1946
|
+
IsGiftable: z15.number()
|
|
1411
1947
|
})
|
|
1412
1948
|
}))
|
|
1413
1949
|
})),
|
|
1414
|
-
RemainingDurationInSeconds:
|
|
1950
|
+
RemainingDurationInSeconds: z15.number()
|
|
1415
1951
|
}),
|
|
1416
|
-
StartDate:
|
|
1952
|
+
StartDate: z15.string()
|
|
1417
1953
|
}))
|
|
1418
1954
|
}) }
|
|
1419
1955
|
};
|
|
1420
1956
|
|
|
1421
1957
|
// src/endpoints/riot/voice.ts
|
|
1422
|
-
import { z as
|
|
1958
|
+
import { z as z16 } from "zod";
|
|
1423
1959
|
var voiceAudioPropertiesEndpoint = {
|
|
1424
1960
|
name: "Audio Properties",
|
|
1425
1961
|
description: "Get audio properties such as if the microphone is in use",
|
|
@@ -1427,17 +1963,17 @@ var voiceAudioPropertiesEndpoint = {
|
|
|
1427
1963
|
type: "local",
|
|
1428
1964
|
suffix: "voice-chat/v1/audio-properties",
|
|
1429
1965
|
riotRequirements: { localAuth: true },
|
|
1430
|
-
responses: { "200":
|
|
1431
|
-
fastEnergyMeter:
|
|
1432
|
-
isLoopbackEnabled:
|
|
1433
|
-
isMicActive:
|
|
1434
|
-
isSpeakerActive:
|
|
1435
|
-
micEnergy:
|
|
1436
|
-
micVolume:
|
|
1437
|
-
noiseFloorMeter:
|
|
1438
|
-
speakerEnergy:
|
|
1439
|
-
speakerVolume:
|
|
1440
|
-
speechThresholdMeter:
|
|
1966
|
+
responses: { "200": z16.object({
|
|
1967
|
+
fastEnergyMeter: z16.number(),
|
|
1968
|
+
isLoopbackEnabled: z16.boolean(),
|
|
1969
|
+
isMicActive: z16.boolean(),
|
|
1970
|
+
isSpeakerActive: z16.boolean(),
|
|
1971
|
+
micEnergy: z16.number(),
|
|
1972
|
+
micVolume: z16.number(),
|
|
1973
|
+
noiseFloorMeter: z16.number(),
|
|
1974
|
+
speakerEnergy: z16.number(),
|
|
1975
|
+
speakerVolume: z16.number(),
|
|
1976
|
+
speechThresholdMeter: z16.number()
|
|
1441
1977
|
}) }
|
|
1442
1978
|
};
|
|
1443
1979
|
var voiceCaptureDevicesEndpoint = {
|
|
@@ -1447,12 +1983,12 @@ var voiceCaptureDevicesEndpoint = {
|
|
|
1447
1983
|
type: "local",
|
|
1448
1984
|
suffix: "voice-chat/v2/devices/capture",
|
|
1449
1985
|
riotRequirements: { localAuth: true },
|
|
1450
|
-
responses: { "200":
|
|
1451
|
-
handle:
|
|
1452
|
-
is_current_device:
|
|
1453
|
-
is_default:
|
|
1454
|
-
is_effective_device:
|
|
1455
|
-
name:
|
|
1986
|
+
responses: { "200": z16.array(z16.object({
|
|
1987
|
+
handle: z16.string(),
|
|
1988
|
+
is_current_device: z16.boolean(),
|
|
1989
|
+
is_default: z16.boolean(),
|
|
1990
|
+
is_effective_device: z16.boolean(),
|
|
1991
|
+
name: z16.string()
|
|
1456
1992
|
})) }
|
|
1457
1993
|
};
|
|
1458
1994
|
var voiceRenderDevicesEndpoint = {
|
|
@@ -1462,116 +1998,113 @@ var voiceRenderDevicesEndpoint = {
|
|
|
1462
1998
|
type: "local",
|
|
1463
1999
|
suffix: "voice-chat/v2/devices/render",
|
|
1464
2000
|
riotRequirements: { localAuth: true },
|
|
1465
|
-
responses: { "200":
|
|
1466
|
-
handle:
|
|
1467
|
-
is_current_device:
|
|
1468
|
-
is_default:
|
|
1469
|
-
is_effective_device:
|
|
1470
|
-
name:
|
|
2001
|
+
responses: { "200": z16.array(z16.object({
|
|
2002
|
+
handle: z16.string(),
|
|
2003
|
+
is_current_device: z16.boolean(),
|
|
2004
|
+
is_default: z16.boolean(),
|
|
2005
|
+
is_effective_device: z16.boolean(),
|
|
2006
|
+
name: z16.string()
|
|
1471
2007
|
})) }
|
|
1472
2008
|
};
|
|
1473
2009
|
|
|
1474
2010
|
// src/api/groups/pvp.ts
|
|
1475
2011
|
var pvp = {
|
|
1476
|
-
content:
|
|
1477
|
-
accountXp:
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
nameService: e.nameServiceEndpoint,
|
|
2012
|
+
content: e10.fetchContentEndpoint,
|
|
2013
|
+
accountXp: e10.accountXPEndpoint,
|
|
2014
|
+
setPlayerLoadout: e10.setPlayerLoadoutEndpoint,
|
|
2015
|
+
playerMmr: e10.playerMMREndpoint,
|
|
2016
|
+
matchHistory: e10.matchHistoryEndpoint,
|
|
2017
|
+
matchDetails: e10.matchDetailsEndpoint,
|
|
2018
|
+
competitiveUpdates: e10.competitiveUpdatesEndpoint,
|
|
2019
|
+
leaderboard: e10.leaderboardEndpoint,
|
|
2020
|
+
penalties: e10.penaltiesEndpoint,
|
|
2021
|
+
config: configEndpoint,
|
|
2022
|
+
nameService: e10.nameServiceEndpoint,
|
|
1488
2023
|
playerLoadoutV3: playerLoadoutV3Endpoint
|
|
1489
2024
|
};
|
|
1490
2025
|
|
|
1491
2026
|
// src/api/groups/party.ts
|
|
1492
|
-
import { endpoints as
|
|
2027
|
+
import { endpoints as e11 } from "valorant-api-types";
|
|
1493
2028
|
var party = {
|
|
1494
|
-
get:
|
|
1495
|
-
player:
|
|
1496
|
-
removePlayer:
|
|
1497
|
-
setMemberReady:
|
|
1498
|
-
refreshCompetitiveTier:
|
|
1499
|
-
refreshPlayerIdentity:
|
|
1500
|
-
refreshPings:
|
|
1501
|
-
changeQueue:
|
|
1502
|
-
startCustomGame:
|
|
1503
|
-
enterMatchmakingQueue:
|
|
1504
|
-
leaveMatchmakingQueue:
|
|
1505
|
-
setAccessibility:
|
|
1506
|
-
setCustomGameSettings:
|
|
1507
|
-
invite:
|
|
1508
|
-
requestToJoin:
|
|
1509
|
-
declineRequest:
|
|
1510
|
-
customGameConfigs:
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
2029
|
+
get: partyEndpoint,
|
|
2030
|
+
player: e11.partyPlayerEndpoint,
|
|
2031
|
+
removePlayer: e11.partyRemovePlayerEndpoint,
|
|
2032
|
+
setMemberReady: partySetMemberReadyEndpoint,
|
|
2033
|
+
refreshCompetitiveTier: refreshCompetitiveTierEndpoint,
|
|
2034
|
+
refreshPlayerIdentity: refreshPlayerIdentityEndpoint,
|
|
2035
|
+
refreshPings: refreshPingsEndpoint,
|
|
2036
|
+
changeQueue: changeQueueEndpoint,
|
|
2037
|
+
startCustomGame: startCustomGameEndpoint,
|
|
2038
|
+
enterMatchmakingQueue: enterMatchmakingQueueEndpoint,
|
|
2039
|
+
leaveMatchmakingQueue: leaveMatchmakingQueueEndpoint,
|
|
2040
|
+
setAccessibility: setPartyAccessibilityEndpoint,
|
|
2041
|
+
setCustomGameSettings: setCustomGameSettingsEndpoint,
|
|
2042
|
+
invite: partyInviteEndpoint,
|
|
2043
|
+
requestToJoin: e11.partyRequestEndpoint,
|
|
2044
|
+
declineRequest: partyDeclineEndpoint,
|
|
2045
|
+
customGameConfigs: e11.customGameConfigsEndpoint,
|
|
2046
|
+
disableCode: partyDisableCodeEndpoint,
|
|
2047
|
+
generateCode: partyGenerateCodeEndpoint,
|
|
2048
|
+
joinByCode: e11.partyJoinByCodeEndpoint,
|
|
2049
|
+
setCustomGameTeam: setCustomGameTeamEndpoint,
|
|
2050
|
+
getCustomGame: customGamePartyEndpoint
|
|
1516
2051
|
};
|
|
1517
2052
|
|
|
1518
2053
|
// src/api/groups/store.ts
|
|
1519
|
-
import { endpoints as
|
|
2054
|
+
import { endpoints as e12 } from "valorant-api-types";
|
|
1520
2055
|
var store = {
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
wallet: e3.walletEndpoint,
|
|
1524
|
-
ownedItems: e3.ownedItemsEndpoint,
|
|
2056
|
+
wallet: e12.walletEndpoint,
|
|
2057
|
+
ownedItems: ownedItemsEndpoint,
|
|
1525
2058
|
storefrontV3: storefrontV3Endpoint,
|
|
1526
2059
|
agentStore: agentStoreEndpoint,
|
|
1527
2060
|
allEntitlements: allEntitlementsEndpoint
|
|
1528
2061
|
};
|
|
1529
2062
|
|
|
1530
2063
|
// src/api/groups/pregame.ts
|
|
1531
|
-
import { endpoints as
|
|
2064
|
+
import { endpoints as e13 } from "valorant-api-types";
|
|
1532
2065
|
var pregame = {
|
|
1533
|
-
player:
|
|
1534
|
-
match:
|
|
1535
|
-
loadouts:
|
|
1536
|
-
selectCharacter:
|
|
1537
|
-
lockCharacter:
|
|
1538
|
-
quit:
|
|
2066
|
+
player: e13.pregamePlayerEndpoint,
|
|
2067
|
+
match: pregameMatchEndpoint,
|
|
2068
|
+
loadouts: pregameLoadoutsEndpoint,
|
|
2069
|
+
selectCharacter: selectCharacterEndpoint,
|
|
2070
|
+
lockCharacter: lockCharacterEndpoint,
|
|
2071
|
+
quit: e13.pregameQuitEndpoint
|
|
1539
2072
|
};
|
|
1540
2073
|
|
|
1541
2074
|
// src/api/groups/currentGame.ts
|
|
1542
|
-
import { endpoints as
|
|
2075
|
+
import { endpoints as e14 } from "valorant-api-types";
|
|
1543
2076
|
var currentGame = {
|
|
1544
|
-
player:
|
|
1545
|
-
match:
|
|
1546
|
-
loadouts:
|
|
1547
|
-
quit:
|
|
2077
|
+
player: e14.currentGamePlayerEndpoint,
|
|
2078
|
+
match: e14.currentGameMatchEndpoint,
|
|
2079
|
+
loadouts: currentGameLoadoutsEndpoint,
|
|
2080
|
+
quit: e14.currentGameQuitEndpoint
|
|
1548
2081
|
};
|
|
1549
2082
|
|
|
1550
2083
|
// src/api/groups/contracts.ts
|
|
1551
|
-
import { endpoints as
|
|
2084
|
+
import { endpoints as e15 } from "valorant-api-types";
|
|
1552
2085
|
var contracts = {
|
|
1553
|
-
itemUpgrades:
|
|
1554
|
-
list:
|
|
1555
|
-
activate:
|
|
2086
|
+
itemUpgrades: e15.itemUpgradesEndpoint,
|
|
2087
|
+
list: contractsEndpoint,
|
|
2088
|
+
activate: e15.activateContractEndpoint,
|
|
1556
2089
|
activeRecruitmentEvent: activeRecruitmentEventEndpoint
|
|
1557
2090
|
};
|
|
1558
2091
|
|
|
1559
2092
|
// src/api/groups/local.ts
|
|
1560
|
-
import { endpoints as
|
|
2093
|
+
import { endpoints as e16 } from "valorant-api-types";
|
|
1561
2094
|
var local = {
|
|
1562
|
-
help:
|
|
1563
|
-
sessions:
|
|
1564
|
-
rsoUserInfo:
|
|
1565
|
-
clientRegion:
|
|
1566
|
-
accountAlias:
|
|
1567
|
-
entitlementsToken:
|
|
1568
|
-
chatSession:
|
|
1569
|
-
friends:
|
|
1570
|
-
sendFriendRequest:
|
|
1571
|
-
removeFriendRequest:
|
|
1572
|
-
presence:
|
|
1573
|
-
friendRequests:
|
|
1574
|
-
swaggerDocs:
|
|
2095
|
+
help: e16.localHelpEndpoint,
|
|
2096
|
+
sessions: e16.sessionsEndpoint,
|
|
2097
|
+
rsoUserInfo: e16.rsoUserInfoEndpoint,
|
|
2098
|
+
clientRegion: e16.clientRegionEndpoint,
|
|
2099
|
+
accountAlias: e16.accountAliasEndpoint,
|
|
2100
|
+
entitlementsToken: e16.entitlementsTokenEndpoint,
|
|
2101
|
+
chatSession: e16.chatSessionEndpoint,
|
|
2102
|
+
friends: e16.friendsEndpoint,
|
|
2103
|
+
sendFriendRequest: e16.sendFriendRequestEndpoint,
|
|
2104
|
+
removeFriendRequest: e16.removeFriendRequestEndpoint,
|
|
2105
|
+
presence: presenceEndpoint,
|
|
2106
|
+
friendRequests: e16.friendRequestsEndpoint,
|
|
2107
|
+
swaggerDocs: e16.localSwaggerDocsEndpoint,
|
|
1575
2108
|
eula: localEulaEndpoint,
|
|
1576
2109
|
privacyPolicy: localPrivacyPolicyEndpoint,
|
|
1577
2110
|
availableLocales: localAvailableLocalesEndpoint,
|
|
@@ -1585,15 +2118,15 @@ var local = {
|
|
|
1585
2118
|
};
|
|
1586
2119
|
|
|
1587
2120
|
// src/api/groups/chat.ts
|
|
1588
|
-
import { endpoints as
|
|
2121
|
+
import { endpoints as e17 } from "valorant-api-types";
|
|
1589
2122
|
var chat = {
|
|
1590
|
-
partyInfo:
|
|
1591
|
-
pregameInfo:
|
|
1592
|
-
currentGameInfo:
|
|
1593
|
-
allInfo:
|
|
1594
|
-
participants:
|
|
1595
|
-
send:
|
|
1596
|
-
history:
|
|
2123
|
+
partyInfo: e17.partyChatInfoEndpoint,
|
|
2124
|
+
pregameInfo: e17.pregameChatInfoEndpoint,
|
|
2125
|
+
currentGameInfo: e17.currentGameChatInfoEndpoint,
|
|
2126
|
+
allInfo: e17.allChatInfoEndpoint,
|
|
2127
|
+
participants: chatParticipantsEndpoint,
|
|
2128
|
+
send: e17.sendChatEndpoint,
|
|
2129
|
+
history: e17.chatHistoryEndpoint,
|
|
1597
2130
|
settings: chatSettingsEndpoint,
|
|
1598
2131
|
tournamentInfo: chatTournamentInfoEndpoint
|
|
1599
2132
|
};
|
|
@@ -1641,24 +2174,24 @@ var account = {
|
|
|
1641
2174
|
};
|
|
1642
2175
|
|
|
1643
2176
|
// src/api/groups/auth.ts
|
|
1644
|
-
import { endpoints as
|
|
2177
|
+
import { endpoints as e18 } from "valorant-api-types";
|
|
1645
2178
|
var auth = {
|
|
1646
|
-
cookies:
|
|
1647
|
-
request:
|
|
1648
|
-
multiFactor:
|
|
1649
|
-
cookieReauth:
|
|
1650
|
-
entitlement:
|
|
1651
|
-
playerInfo:
|
|
1652
|
-
riotGeo:
|
|
1653
|
-
pasToken:
|
|
1654
|
-
riotClientConfig:
|
|
2179
|
+
cookies: e18.authCookiesEndpoint,
|
|
2180
|
+
request: e18.authRequestEndpoint,
|
|
2181
|
+
multiFactor: e18.multiFactorAuthenticationEndpoint,
|
|
2182
|
+
cookieReauth: e18.cookieReauthEndpoint,
|
|
2183
|
+
entitlement: e18.entitlementEndpoint,
|
|
2184
|
+
playerInfo: e18.playerInfoEndpoint,
|
|
2185
|
+
riotGeo: e18.riotGeoEndpoint,
|
|
2186
|
+
pasToken: e18.pasTokenEndpoint,
|
|
2187
|
+
riotClientConfig: e18.riotClientConfigEndpoint
|
|
1655
2188
|
};
|
|
1656
2189
|
|
|
1657
2190
|
// src/endpoints/catalog/index.ts
|
|
1658
|
-
import { z as
|
|
2191
|
+
import { z as z19 } from "zod";
|
|
1659
2192
|
|
|
1660
2193
|
// src/endpoints/catalog/factory.ts
|
|
1661
|
-
import { z as
|
|
2194
|
+
import { z as z17 } from "zod";
|
|
1662
2195
|
|
|
1663
2196
|
// src/envelope.ts
|
|
1664
2197
|
var enveloped = /* @__PURE__ */ new WeakSet();
|
|
@@ -1677,7 +2210,7 @@ function unwrapEnvelope(endpoint2, body) {
|
|
|
1677
2210
|
var BASE = "https://valorant-api.com/v1/";
|
|
1678
2211
|
function query(queryParams = []) {
|
|
1679
2212
|
return new Map([
|
|
1680
|
-
["language",
|
|
2213
|
+
["language", z17.string().optional().describe("Language code such as `fr-FR`. Defaults to `en-US`.")],
|
|
1681
2214
|
...queryParams
|
|
1682
2215
|
]);
|
|
1683
2216
|
}
|
|
@@ -1694,16 +2227,16 @@ function endpoint(name, description, path, schema, queryParams = []) {
|
|
|
1694
2227
|
}
|
|
1695
2228
|
function collection(title, singular, path, schema, queryParams = []) {
|
|
1696
2229
|
return {
|
|
1697
|
-
list: endpoint(title, `List of ${title.toLowerCase()}`, path,
|
|
2230
|
+
list: endpoint(title, `List of ${title.toLowerCase()}`, path, z17.array(schema), queryParams),
|
|
1698
2231
|
one: endpoint(singular, `One ${singular.toLowerCase()} by UUID`, `${path}/{uuid}`, schema)
|
|
1699
2232
|
};
|
|
1700
2233
|
}
|
|
1701
2234
|
|
|
1702
2235
|
// src/endpoints/catalog/schemas.ts
|
|
1703
|
-
import { z as
|
|
1704
|
-
var text =
|
|
1705
|
-
var asset =
|
|
1706
|
-
uuid:
|
|
2236
|
+
import { z as z18 } from "zod";
|
|
2237
|
+
var text = z18.string().nullish();
|
|
2238
|
+
var asset = z18.object({
|
|
2239
|
+
uuid: z18.string(),
|
|
1707
2240
|
displayName: text,
|
|
1708
2241
|
displayIcon: text,
|
|
1709
2242
|
assetPath: text
|
|
@@ -1711,70 +2244,70 @@ var asset = z13.object({
|
|
|
1711
2244
|
var agentSchema = asset.extend({
|
|
1712
2245
|
description: text,
|
|
1713
2246
|
developerName: text,
|
|
1714
|
-
characterTags:
|
|
2247
|
+
characterTags: z18.array(z18.string()).nullish(),
|
|
1715
2248
|
displayIconSmall: text,
|
|
1716
2249
|
bustPortrait: text,
|
|
1717
2250
|
fullPortrait: text,
|
|
1718
2251
|
killfeedPortrait: text,
|
|
1719
2252
|
background: text,
|
|
1720
|
-
isPlayableCharacter:
|
|
1721
|
-
role:
|
|
1722
|
-
abilities:
|
|
2253
|
+
isPlayableCharacter: z18.boolean(),
|
|
2254
|
+
role: z18.object({ uuid: z18.string(), displayName: text, description: text, displayIcon: text }).passthrough().nullish(),
|
|
2255
|
+
abilities: z18.array(z18.object({ slot: z18.string(), displayName: text, description: text, displayIcon: text }).passthrough()).nullish()
|
|
1723
2256
|
});
|
|
1724
2257
|
var mapSchema = asset.extend({
|
|
1725
2258
|
coordinates: text,
|
|
1726
2259
|
listViewIcon: text,
|
|
1727
2260
|
splash: text,
|
|
1728
2261
|
mapUrl: text,
|
|
1729
|
-
xMultiplier:
|
|
1730
|
-
yMultiplier:
|
|
1731
|
-
xScalarToAdd:
|
|
1732
|
-
yScalarToAdd:
|
|
1733
|
-
callouts:
|
|
2262
|
+
xMultiplier: z18.number(),
|
|
2263
|
+
yMultiplier: z18.number(),
|
|
2264
|
+
xScalarToAdd: z18.number(),
|
|
2265
|
+
yScalarToAdd: z18.number(),
|
|
2266
|
+
callouts: z18.array(z18.object({ regionName: z18.string(), superRegionName: z18.string(), location: z18.object({ x: z18.number(), y: z18.number() }) }).passthrough()).nullish()
|
|
1734
2267
|
});
|
|
1735
2268
|
var weaponSchema = asset.extend({
|
|
1736
|
-
category:
|
|
1737
|
-
defaultSkinUuid:
|
|
2269
|
+
category: z18.string(),
|
|
2270
|
+
defaultSkinUuid: z18.string(),
|
|
1738
2271
|
killStreamIcon: text,
|
|
1739
|
-
weaponStats:
|
|
1740
|
-
shopData:
|
|
1741
|
-
skins:
|
|
2272
|
+
weaponStats: z18.object({}).passthrough().nullish(),
|
|
2273
|
+
shopData: z18.object({}).passthrough().nullish(),
|
|
2274
|
+
skins: z18.array(z18.object({}).passthrough())
|
|
1742
2275
|
});
|
|
1743
2276
|
var skinSchema = asset.extend({
|
|
1744
|
-
themeUuid:
|
|
2277
|
+
themeUuid: z18.string(),
|
|
1745
2278
|
contentTierUuid: text,
|
|
1746
2279
|
wallpaper: text,
|
|
1747
|
-
chromas:
|
|
1748
|
-
levels:
|
|
2280
|
+
chromas: z18.array(asset.passthrough()),
|
|
2281
|
+
levels: z18.array(asset.passthrough())
|
|
1749
2282
|
});
|
|
1750
|
-
var seasonSchema =
|
|
1751
|
-
uuid:
|
|
2283
|
+
var seasonSchema = z18.object({
|
|
2284
|
+
uuid: z18.string(),
|
|
1752
2285
|
displayName: text,
|
|
1753
2286
|
type: text,
|
|
1754
|
-
startTime:
|
|
1755
|
-
endTime:
|
|
2287
|
+
startTime: z18.string(),
|
|
2288
|
+
endTime: z18.string(),
|
|
1756
2289
|
parentUuid: text,
|
|
1757
2290
|
assetPath: text
|
|
1758
2291
|
}).passthrough();
|
|
1759
|
-
var versionSchema =
|
|
1760
|
-
manifestId:
|
|
1761
|
-
branch:
|
|
1762
|
-
version:
|
|
1763
|
-
buildVersion:
|
|
1764
|
-
engineVersion:
|
|
1765
|
-
riotClientVersion:
|
|
1766
|
-
riotClientBuild:
|
|
1767
|
-
buildDate:
|
|
2292
|
+
var versionSchema = z18.object({
|
|
2293
|
+
manifestId: z18.string(),
|
|
2294
|
+
branch: z18.string(),
|
|
2295
|
+
version: z18.string(),
|
|
2296
|
+
buildVersion: z18.string(),
|
|
2297
|
+
engineVersion: z18.string(),
|
|
2298
|
+
riotClientVersion: z18.string().describe("Value of the X-Riot-ClientVersion header"),
|
|
2299
|
+
riotClientBuild: z18.string(),
|
|
2300
|
+
buildDate: z18.string()
|
|
1768
2301
|
}).passthrough();
|
|
1769
2302
|
|
|
1770
2303
|
// src/endpoints/catalog/index.ts
|
|
1771
|
-
var playable = [["isPlayableCharacter",
|
|
2304
|
+
var playable = [["isPlayableCharacter", z19.boolean().optional().describe("Only return playable agents. Skips the duplicate Sova.")]];
|
|
1772
2305
|
var agents = collection("Agents", "Agent", "agents", agentSchema, playable);
|
|
1773
2306
|
var buddies = collection("Buddies", "Buddy", "buddies", asset);
|
|
1774
2307
|
var buddyLevels = collection("Buddy Levels", "Buddy Level", "buddies/levels", asset);
|
|
1775
2308
|
var bundles = collection("Bundles", "Bundle", "bundles", asset);
|
|
1776
2309
|
var ceremonies = collection("Ceremonies", "Ceremony", "ceremonies", asset);
|
|
1777
|
-
var competitiveTiers = collection("Competitive Tiers", "Competitive Tier Set", "competitivetiers",
|
|
2310
|
+
var competitiveTiers = collection("Competitive Tiers", "Competitive Tier Set", "competitivetiers", z19.object({ uuid: z19.string(), tiers: z19.array(z19.object({ tier: z19.number(), tierName: text, division: text, color: text }).passthrough()) }).passthrough());
|
|
1778
2311
|
var contentTiers = collection("Content Tiers", "Content Tier", "contenttiers", asset);
|
|
1779
2312
|
var contracts2 = collection("Contracts", "Contract", "contracts", asset);
|
|
1780
2313
|
var currencies = collection("Currencies", "Currency", "currencies", asset);
|
|
@@ -1785,11 +2318,11 @@ var gamemodeEquippables = collection("Gamemode Equippables", "Gamemode Equippabl
|
|
|
1785
2318
|
var gear = collection("Gear", "Gear Item", "gear", asset);
|
|
1786
2319
|
var levelBorders = collection("Level Borders", "Level Border", "levelborders", asset);
|
|
1787
2320
|
var maps = collection("Maps", "Map", "maps", mapSchema);
|
|
1788
|
-
var missions = collection("Missions", "Mission", "missions",
|
|
2321
|
+
var missions = collection("Missions", "Mission", "missions", z19.object({ uuid: z19.string(), displayName: text }).passthrough());
|
|
1789
2322
|
var playerCards = collection("Player Cards", "Player Card", "playercards", asset);
|
|
1790
|
-
var playerTitles = collection("Player Titles", "Player Title", "playertitles",
|
|
2323
|
+
var playerTitles = collection("Player Titles", "Player Title", "playertitles", z19.object({ uuid: z19.string(), displayName: text, titleText: text }).passthrough());
|
|
1791
2324
|
var seasons = collection("Seasons", "Season", "seasons", seasonSchema);
|
|
1792
|
-
var competitiveSeasons = collection("Competitive Seasons", "Competitive Season", "seasons/competitive",
|
|
2325
|
+
var competitiveSeasons = collection("Competitive Seasons", "Competitive Season", "seasons/competitive", z19.object({ uuid: z19.string(), seasonUuid: z19.string(), startTime: z19.string(), endTime: z19.string() }).passthrough());
|
|
1793
2326
|
var sprays = collection("Sprays", "Spray", "sprays", asset);
|
|
1794
2327
|
var sprayLevels = collection("Spray Levels", "Spray Level", "sprays/levels", asset);
|
|
1795
2328
|
var themes = collection("Themes", "Theme", "themes", asset);
|
|
@@ -1880,7 +2413,7 @@ var registry = {
|
|
|
1880
2413
|
};
|
|
1881
2414
|
|
|
1882
2415
|
// src/auth.ts
|
|
1883
|
-
import { endpoints as
|
|
2416
|
+
import { endpoints as e19 } from "valorant-api-types";
|
|
1884
2417
|
|
|
1885
2418
|
// src/errors.ts
|
|
1886
2419
|
var ValorantError = class extends Error {
|
|
@@ -2009,7 +2542,7 @@ function createAuthFlows(client) {
|
|
|
2009
2542
|
return toLoginResult(data);
|
|
2010
2543
|
},
|
|
2011
2544
|
async reauthenticate(options) {
|
|
2012
|
-
const response = await client.send(
|
|
2545
|
+
const response = await client.send(e19.cookieReauthEndpoint);
|
|
2013
2546
|
const tokens = parseAuthRedirect(response.headers.get("location") ?? "");
|
|
2014
2547
|
if (tokens === void 0) throw new ValorantError("Cookie reauthentication failed: the session cookies are missing or expired, log in again");
|
|
2015
2548
|
applyTokens(tokens);
|
|
@@ -2041,7 +2574,7 @@ function createAuthFlows(client) {
|
|
|
2041
2574
|
}
|
|
2042
2575
|
|
|
2043
2576
|
// src/context.ts
|
|
2044
|
-
var DEFAULT_PLATFORM =
|
|
2577
|
+
var DEFAULT_PLATFORM = toBase64(JSON.stringify({
|
|
2045
2578
|
platformType: "PC",
|
|
2046
2579
|
platformOS: "Windows",
|
|
2047
2580
|
platformOSVersion: "10.0.19042.1.256.64bit",
|
|
@@ -2277,6 +2810,181 @@ function toApiError(endpoint2, request, response) {
|
|
|
2277
2810
|
return new ValorantApiError(...args);
|
|
2278
2811
|
}
|
|
2279
2812
|
|
|
2813
|
+
// src/internal/normalize.ts
|
|
2814
|
+
import { z as z20 } from "zod";
|
|
2815
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
2816
|
+
var children = {
|
|
2817
|
+
ZodObject: (def, map) => {
|
|
2818
|
+
const shape = def["shape"]();
|
|
2819
|
+
return { ...def, shape: () => Object.fromEntries(Object.entries(shape).map(([key, value]) => [key, map(value)])) };
|
|
2820
|
+
},
|
|
2821
|
+
ZodArray: (def, map) => ({ ...def, type: map(def["type"]) }),
|
|
2822
|
+
ZodOptional: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
|
|
2823
|
+
ZodNullable: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
|
|
2824
|
+
ZodDefault: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
|
|
2825
|
+
ZodCatch: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
|
|
2826
|
+
ZodReadonly: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
|
|
2827
|
+
ZodBranded: (def, map) => ({ ...def, type: map(def["type"]) }),
|
|
2828
|
+
ZodEffects: (def, map) => ({ ...def, schema: map(def["schema"]) }),
|
|
2829
|
+
ZodUnion: (def, map) => ({ ...def, options: def["options"].map(map) }),
|
|
2830
|
+
ZodIntersection: (def, map) => ({ ...def, left: map(def["left"]), right: map(def["right"]) }),
|
|
2831
|
+
ZodRecord: (def, map) => ({ ...def, keyType: map(def["keyType"]), valueType: map(def["valueType"]) }),
|
|
2832
|
+
ZodTuple: (def, map) => ({ ...def, items: def["items"].map(map) }),
|
|
2833
|
+
ZodDiscriminatedUnion: (def, map) => {
|
|
2834
|
+
const optionsMap = new Map([...def["optionsMap"]].map(([key, option]) => [key, map(option)]));
|
|
2835
|
+
return { ...def, options: [...optionsMap.values()], optionsMap };
|
|
2836
|
+
}
|
|
2837
|
+
};
|
|
2838
|
+
function lenientPc(literal) {
|
|
2839
|
+
return z20.preprocess((value) => typeof value === "string" ? value.toUpperCase() : value, literal);
|
|
2840
|
+
}
|
|
2841
|
+
function normalizePlatformLiterals(schema) {
|
|
2842
|
+
const known = cache.get(schema);
|
|
2843
|
+
if (known) return known;
|
|
2844
|
+
const def = schema._def;
|
|
2845
|
+
let result = schema;
|
|
2846
|
+
if (def.typeName === "ZodLiteral" && def["value"] === "PC") {
|
|
2847
|
+
result = lenientPc(schema);
|
|
2848
|
+
} else if (def.typeName === "ZodLazy") {
|
|
2849
|
+
const getter = def["getter"];
|
|
2850
|
+
result = new schema.constructor({ ...def, getter: () => normalizePlatformLiterals(getter()) });
|
|
2851
|
+
} else if (def.typeName && children[def.typeName]) {
|
|
2852
|
+
const Type = schema.constructor;
|
|
2853
|
+
result = new Type(children[def.typeName](def, normalizePlatformLiterals));
|
|
2854
|
+
}
|
|
2855
|
+
cache.set(schema, result);
|
|
2856
|
+
return result;
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
// src/lobby/mappings.ts
|
|
2860
|
+
var CustomGameTeam = {
|
|
2861
|
+
Defenders: "TeamOne",
|
|
2862
|
+
Attackers: "TeamTwo",
|
|
2863
|
+
Spectators: "TeamSpectate",
|
|
2864
|
+
DefenderCoaches: "TeamOneCoaches",
|
|
2865
|
+
AttackerCoaches: "TeamTwoCoaches"
|
|
2866
|
+
};
|
|
2867
|
+
var MEMBERSHIP_KEY = {
|
|
2868
|
+
TeamOne: "teamOne",
|
|
2869
|
+
TeamTwo: "teamTwo",
|
|
2870
|
+
TeamSpectate: "teamSpectate",
|
|
2871
|
+
TeamOneCoaches: "teamOneCoaches",
|
|
2872
|
+
TeamTwoCoaches: "teamTwoCoaches"
|
|
2873
|
+
};
|
|
2874
|
+
var CustomGameMap = {
|
|
2875
|
+
Ascent: "/Game/Maps/Ascent/Ascent",
|
|
2876
|
+
Split: "/Game/Maps/Bonsai/Bonsai",
|
|
2877
|
+
Fracture: "/Game/Maps/Canyon/Canyon",
|
|
2878
|
+
Bind: "/Game/Maps/Duality/Duality",
|
|
2879
|
+
Breeze: "/Game/Maps/Foxtrot/Foxtrot",
|
|
2880
|
+
Abyss: "/Game/Maps/Infinity/Infinity",
|
|
2881
|
+
Lotus: "/Game/Maps/Jam/Jam",
|
|
2882
|
+
Sunset: "/Game/Maps/Juliett/Juliett",
|
|
2883
|
+
Pearl: "/Game/Maps/Pitt/Pitt",
|
|
2884
|
+
Summit: "/Game/Maps/Plummet/Plummet",
|
|
2885
|
+
Icebox: "/Game/Maps/Port/Port",
|
|
2886
|
+
Corrode: "/Game/Maps/Rook/Rook",
|
|
2887
|
+
Haven: "/Game/Maps/Triad/Triad"
|
|
2888
|
+
};
|
|
2889
|
+
var CustomGameMode = {
|
|
2890
|
+
Standard: "/Game/GameModes/Bomb/BombGameMode.BombGameMode_C",
|
|
2891
|
+
SpikeRush: "/Game/GameModes/QuickBomb/QuickBombGameMode.QuickBombGameMode_C",
|
|
2892
|
+
Deathmatch: "/Game/GameModes/Deathmatch/DeathmatchGameMode.DeathmatchGameMode_C",
|
|
2893
|
+
Escalation: "/Game/GameModes/GunGame/GunGameTeamsGameMode.GunGameTeamsGameMode_C",
|
|
2894
|
+
Skirmish: "/Game/GameModes/Skirmish/SkirmishGameMode.SkirmishGameMode_C"
|
|
2895
|
+
};
|
|
2896
|
+
var RULE_KEY = {
|
|
2897
|
+
allowGameModifiers: "AllowGameModifiers",
|
|
2898
|
+
playOutAllRounds: "PlayOutAllRounds",
|
|
2899
|
+
skipMatchHistory: "SkipMatchHistory",
|
|
2900
|
+
tournamentMode: "TournamentMode",
|
|
2901
|
+
overtimeWinByTwo: "IsOvertimeWinByTwo"
|
|
2902
|
+
};
|
|
2903
|
+
function reverse(table) {
|
|
2904
|
+
return new Map(Object.entries(table).map(([name, value]) => [value, name]));
|
|
2905
|
+
}
|
|
2906
|
+
var mapNames = reverse(CustomGameMap);
|
|
2907
|
+
var modeNames = reverse(CustomGameMode);
|
|
2908
|
+
function customGameMapName(path) {
|
|
2909
|
+
return mapNames.get(path);
|
|
2910
|
+
}
|
|
2911
|
+
function customGameModeName(path) {
|
|
2912
|
+
return modeNames.get(path);
|
|
2913
|
+
}
|
|
2914
|
+
function teamOfPlayer(membership, puuid) {
|
|
2915
|
+
for (const team of Object.values(CustomGameTeam)) {
|
|
2916
|
+
if (membership[MEMBERSHIP_KEY[team]]?.some((member) => member.Subject === puuid)) return team;
|
|
2917
|
+
}
|
|
2918
|
+
return void 0;
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2921
|
+
// src/lobby/flows.ts
|
|
2922
|
+
var DEFAULT_RULES = {
|
|
2923
|
+
AllowGameModifiers: "false",
|
|
2924
|
+
PlayOutAllRounds: "false",
|
|
2925
|
+
SkipMatchHistory: "false",
|
|
2926
|
+
TournamentMode: "false",
|
|
2927
|
+
IsOvertimeWinByTwo: "false"
|
|
2928
|
+
};
|
|
2929
|
+
function ruleStrings(rules) {
|
|
2930
|
+
const out = {};
|
|
2931
|
+
for (const [name, key] of Object.entries(RULE_KEY)) {
|
|
2932
|
+
const value = rules?.[name];
|
|
2933
|
+
if (value !== void 0) out[key] = value ? "true" : "false";
|
|
2934
|
+
}
|
|
2935
|
+
return out;
|
|
2936
|
+
}
|
|
2937
|
+
function currentRules(gameRules) {
|
|
2938
|
+
const out = {};
|
|
2939
|
+
for (const key of Object.keys(DEFAULT_RULES)) {
|
|
2940
|
+
const value = gameRules?.[key];
|
|
2941
|
+
if (value === "true" || value === "false") out[key] = value;
|
|
2942
|
+
}
|
|
2943
|
+
return out;
|
|
2944
|
+
}
|
|
2945
|
+
function createPartyFlows(client) {
|
|
2946
|
+
async function partyIdOf(target) {
|
|
2947
|
+
if (target.partyId !== void 0) return target.partyId;
|
|
2948
|
+
return (await client.party.player({ validation: "off" })).CurrentPartyID;
|
|
2949
|
+
}
|
|
2950
|
+
return {
|
|
2951
|
+
async assignToTeam(team, options = {}) {
|
|
2952
|
+
const partyId = await partyIdOf(options);
|
|
2953
|
+
const puuid = options.puuid ?? client.context.require("puuid");
|
|
2954
|
+
return client.party.setCustomGameTeam({ params: { partyId, team }, body: { playerToPutOnTeam: puuid } });
|
|
2955
|
+
},
|
|
2956
|
+
async configureLobby(options) {
|
|
2957
|
+
const partyId = await partyIdOf(options);
|
|
2958
|
+
const { Settings: current } = (await client.party.getCustomGame({ params: { partyId }, validation: "off" })).CustomGameData;
|
|
2959
|
+
await client.party.setCustomGameSettings({
|
|
2960
|
+
params: { partyId },
|
|
2961
|
+
validation: "off",
|
|
2962
|
+
body: {
|
|
2963
|
+
Map: options.map ?? current.Map,
|
|
2964
|
+
Mode: options.mode ?? current.Mode,
|
|
2965
|
+
UseBots: current.UseBots,
|
|
2966
|
+
GamePod: options.gamePod ?? current.GamePod,
|
|
2967
|
+
GameRules: { ...DEFAULT_RULES, ...currentRules(current.GameRules), ...ruleStrings(options.rules) }
|
|
2968
|
+
}
|
|
2969
|
+
});
|
|
2970
|
+
return (await client.party.getCustomGame({ params: { partyId } })).CustomGameData.Settings;
|
|
2971
|
+
}
|
|
2972
|
+
};
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
// src/internal/gamelog.ts
|
|
2976
|
+
var VERSION_LINE = /CI server version: (release-[\w.]+-shipping-\d+-\d+)/;
|
|
2977
|
+
async function readInstalledClientVersion(logPath) {
|
|
2978
|
+
const { readFile } = await import("fs/promises");
|
|
2979
|
+
const { join } = await import("path");
|
|
2980
|
+
const file = logPath ?? join(process.env["LOCALAPPDATA"] ?? "", "VALORANT", "Saved", "Logs", "ShooterGame.log");
|
|
2981
|
+
try {
|
|
2982
|
+
return VERSION_LINE.exec(await readFile(file, "latin1"))?.[1];
|
|
2983
|
+
} catch {
|
|
2984
|
+
return void 0;
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2280
2988
|
// src/local.ts
|
|
2281
2989
|
function parseLockfile(content) {
|
|
2282
2990
|
const [name, pid, port, password, protocol] = content.trim().split(":");
|
|
@@ -2304,7 +3012,6 @@ function createLocalFlows(client) {
|
|
|
2304
3012
|
const sessions = await client.local.sessions();
|
|
2305
3013
|
const valorant = Object.values(sessions).find((session) => session.productId === "valorant");
|
|
2306
3014
|
if (valorant) {
|
|
2307
|
-
ctx.set("clientVersion", valorant.version);
|
|
2308
3015
|
const region = launchArgument(valorant.launchConfiguration.arguments, "ares-deployment");
|
|
2309
3016
|
if (region !== void 0 && isRegion(region)) ctx.update({ region, shard: shardForRegion(region) });
|
|
2310
3017
|
}
|
|
@@ -2313,9 +3020,9 @@ function createLocalFlows(client) {
|
|
|
2313
3020
|
const affinity = Object.values(info.affinity ?? {}).find(isRegion);
|
|
2314
3021
|
if (affinity !== void 0) ctx.applyAffinity(affinity);
|
|
2315
3022
|
}
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
3023
|
+
const installed = await readInstalledClientVersion(options?.gameLogPath);
|
|
3024
|
+
if (installed !== void 0) ctx.set("clientVersion", installed);
|
|
3025
|
+
else if (options?.fetchClientVersion !== false) await client.auth.fetchClientVersion().catch(() => void 0);
|
|
2319
3026
|
},
|
|
2320
3027
|
async events() {
|
|
2321
3028
|
return openEventStream(ctx);
|
|
@@ -2334,7 +3041,7 @@ async function openEventStream(ctx) {
|
|
|
2334
3041
|
throw new ValorantError('The local event stream needs the optional "ws" package: npm install ws', { cause });
|
|
2335
3042
|
}
|
|
2336
3043
|
const socket = new WebSocket(`wss://127.0.0.1:${ctx.require("localPort")}`, {
|
|
2337
|
-
headers: { Authorization:
|
|
3044
|
+
headers: { Authorization: basicAuth("riot", ctx.require("localPassword")) },
|
|
2338
3045
|
rejectUnauthorized: false
|
|
2339
3046
|
});
|
|
2340
3047
|
const listeners = /* @__PURE__ */ new Set();
|
|
@@ -2360,6 +3067,18 @@ async function openEventStream(ctx) {
|
|
|
2360
3067
|
};
|
|
2361
3068
|
}
|
|
2362
3069
|
|
|
3070
|
+
// src/pregame/flows.ts
|
|
3071
|
+
function createPregameFlows(client) {
|
|
3072
|
+
return {
|
|
3073
|
+
async pickAgent(agent, options = {}) {
|
|
3074
|
+
const preGameMatchId = options.matchId ?? (await client.pregame.player({ validation: "off" })).MatchID;
|
|
3075
|
+
const params = { preGameMatchId, agentId: agent };
|
|
3076
|
+
const selected = await client.pregame.selectCharacter({ params });
|
|
3077
|
+
return options.lock ? client.pregame.lockCharacter({ params }) : selected;
|
|
3078
|
+
}
|
|
3079
|
+
};
|
|
3080
|
+
}
|
|
3081
|
+
|
|
2363
3082
|
// src/request.ts
|
|
2364
3083
|
import { typeToPrefix } from "valorant-api-types";
|
|
2365
3084
|
|
|
@@ -2413,7 +3132,7 @@ function resolveHeaders(endpoint2, input, ctx, url) {
|
|
|
2413
3132
|
const userAgent = ctx.get("userAgent");
|
|
2414
3133
|
if (userAgent) headers["User-Agent"] = userAgent;
|
|
2415
3134
|
if (need.token) headers["Authorization"] = `Bearer ${ctx.require("accessToken")}`;
|
|
2416
|
-
if (need.localAuth) headers["Authorization"] =
|
|
3135
|
+
if (need.localAuth) headers["Authorization"] = basicAuth("riot", ctx.require("localPassword"));
|
|
2417
3136
|
if (need.entitlement) headers["X-Riot-Entitlements-JWT"] = ctx.require("entitlementToken");
|
|
2418
3137
|
if (need.clientVersion) headers["X-Riot-ClientVersion"] = ctx.require("clientVersion");
|
|
2419
3138
|
if (need.clientPlatform) headers["X-Riot-ClientPlatform"] = ctx.require("clientPlatform");
|
|
@@ -2457,7 +3176,7 @@ var ValorantClient = class {
|
|
|
2457
3176
|
const input = options;
|
|
2458
3177
|
const validation = input.validation ?? this.#options.validation ?? "loose";
|
|
2459
3178
|
if (validation === "strict" && endpoint2.body !== void 0 && input.body !== void 0) {
|
|
2460
|
-
const parsed = endpoint2.body.safeParse(input.body);
|
|
3179
|
+
const parsed = normalizePlatformLiterals(endpoint2.body).safeParse(input.body);
|
|
2461
3180
|
if (!parsed.success) throw new ValorantValidationError("request", endpoint2.name, parsed.error, input.body);
|
|
2462
3181
|
}
|
|
2463
3182
|
const retry = this.#options.retry === false ? void 0 : this.#options.retry ?? {};
|
|
@@ -2509,6 +3228,8 @@ var ValorantClient = class {
|
|
|
2509
3228
|
}
|
|
2510
3229
|
Object.assign(api["auth"], createAuthFlows(this));
|
|
2511
3230
|
Object.assign(api["local"], createLocalFlows(this));
|
|
3231
|
+
Object.assign(api["party"], createPartyFlows(this));
|
|
3232
|
+
Object.assign(api["pregame"], createPregameFlows(this));
|
|
2512
3233
|
return api;
|
|
2513
3234
|
}
|
|
2514
3235
|
#transportFor(endpoint2) {
|
|
@@ -2525,7 +3246,8 @@ var ValorantClient = class {
|
|
|
2525
3246
|
}
|
|
2526
3247
|
#parseResponse(endpoint2, response, validation) {
|
|
2527
3248
|
const data = unwrapEnvelope(endpoint2, parseBody(response.text));
|
|
2528
|
-
const
|
|
3249
|
+
const published = endpoint2.responses?.[String(response.status)];
|
|
3250
|
+
const schema = published && normalizePlatformLiterals(published);
|
|
2529
3251
|
if (schema === void 0 || validation === "off") return data;
|
|
2530
3252
|
const parsed = safeParse(schema, data);
|
|
2531
3253
|
if (parsed.success) return parsed.data;
|
|
@@ -2544,9 +3266,52 @@ var ValorantClient = class {
|
|
|
2544
3266
|
}
|
|
2545
3267
|
};
|
|
2546
3268
|
|
|
3269
|
+
// src/pregame/agents.ts
|
|
3270
|
+
var Agent = {
|
|
3271
|
+
Astra: "41fb69c1-4189-7b37-f117-bcaf1e96f1bf",
|
|
3272
|
+
Breach: "5f8d3a7f-467b-97f3-062c-13acf203c006",
|
|
3273
|
+
Brimstone: "9f0d8ba9-4140-b941-57d3-a7ad57c6b417",
|
|
3274
|
+
Chamber: "22697a3d-45bf-8dd7-4fec-84a9e28c69d7",
|
|
3275
|
+
Clove: "1dbf2edd-4729-0984-3115-daa5eed44993",
|
|
3276
|
+
Cypher: "117ed9e3-49f3-6512-3ccf-0cada7e3823b",
|
|
3277
|
+
Deadlock: "cc8b64c8-4b25-4ff9-6e7f-37b4da43d235",
|
|
3278
|
+
Fade: "dade69b4-4f5a-8528-247b-219e5a1facd6",
|
|
3279
|
+
Gekko: "e370fa57-4757-3604-3648-499e1f642d3f",
|
|
3280
|
+
Harbor: "95b78ed7-4637-86d9-7e41-71ba8c293152",
|
|
3281
|
+
Hush: "ddd5a15c-4fbe-42fa-3789-11a55ca5ee04",
|
|
3282
|
+
Iso: "0e38b510-41a8-5780-5e8f-568b2a4f2d6c",
|
|
3283
|
+
Jett: "add6443a-41bd-e414-f6ad-e58d267f4e95",
|
|
3284
|
+
KayO: "601dbbe7-43ce-be57-2a40-4abd24953621",
|
|
3285
|
+
Killjoy: "1e58de9c-4950-5125-93e9-a0aee9f98746",
|
|
3286
|
+
Miks: "7c8a4701-4de6-9355-b254-e09bc2a34b72",
|
|
3287
|
+
Neon: "bb2a4828-46eb-8cd1-e765-15848195d751",
|
|
3288
|
+
Omen: "8e253930-4c05-31dd-1b6c-968525494517",
|
|
3289
|
+
Phoenix: "eb93336a-449b-9c1b-0a54-a891f7921d69",
|
|
3290
|
+
Raze: "f94c3b30-42be-e959-889c-5aa313dba261",
|
|
3291
|
+
Reyna: "a3bfb853-43b2-7238-a4f1-ad90e9e46bcc",
|
|
3292
|
+
Sage: "569fdd95-4d10-43ab-ca70-79becc718b46",
|
|
3293
|
+
Skye: "6f2a04ca-43e0-be17-7f36-b3908627744d",
|
|
3294
|
+
Sova: "320b2a48-4d9b-a075-30f1-1f93a9b638fa",
|
|
3295
|
+
Tejo: "b444168c-4e35-8076-db47-ef9bf368f384",
|
|
3296
|
+
Veto: "92eeef5d-43b5-1d4a-8d03-b3927a09034b",
|
|
3297
|
+
Viper: "707eab51-4836-f488-046a-cda6bf494859",
|
|
3298
|
+
Vyse: "efba5359-4016-a1e5-7626-b1ae76895940",
|
|
3299
|
+
Waylay: "df1cb487-4902-002e-5c17-d28e83e78588",
|
|
3300
|
+
Yoru: "7f94d92c-4234-0a36-9646-3a87eb8b5c89"
|
|
3301
|
+
};
|
|
3302
|
+
var names = new Map(Object.entries(Agent).map(([name, id]) => [id, name]));
|
|
3303
|
+
function agentName(id) {
|
|
3304
|
+
return names.get(id);
|
|
3305
|
+
}
|
|
3306
|
+
|
|
2547
3307
|
// src/index.ts
|
|
2548
3308
|
export * from "valorant-api-types";
|
|
2549
3309
|
export {
|
|
3310
|
+
Agent,
|
|
3311
|
+
CustomGameMap,
|
|
3312
|
+
CustomGameMode,
|
|
3313
|
+
CustomGameTeam,
|
|
3314
|
+
MEMBERSHIP_KEY,
|
|
2550
3315
|
MissingContextError,
|
|
2551
3316
|
MissingParameterError,
|
|
2552
3317
|
ValorantApiError,
|
|
@@ -2557,6 +3322,9 @@ export {
|
|
|
2557
3322
|
ValorantNetworkError,
|
|
2558
3323
|
ValorantRateLimitError,
|
|
2559
3324
|
ValorantValidationError,
|
|
3325
|
+
agentName,
|
|
3326
|
+
customGameMapName,
|
|
3327
|
+
customGameModeName,
|
|
2560
3328
|
fetchTransport,
|
|
2561
3329
|
isRegion,
|
|
2562
3330
|
localTransport,
|
|
@@ -2564,6 +3332,7 @@ export {
|
|
|
2564
3332
|
parseLockfile,
|
|
2565
3333
|
readLockfile,
|
|
2566
3334
|
registry,
|
|
2567
|
-
shardForRegion
|
|
3335
|
+
shardForRegion,
|
|
3336
|
+
teamOfPlayer
|
|
2568
3337
|
};
|
|
2569
3338
|
//# sourceMappingURL=index.js.map
|