@voxary/valorant-client 0.1.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/dist/index.cjs CHANGED
@@ -31,6 +31,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/index.ts
32
32
  var index_exports = {};
33
33
  __export(index_exports, {
34
+ Agent: () => Agent,
35
+ CustomGameMap: () => CustomGameMap,
36
+ CustomGameMode: () => CustomGameMode,
37
+ CustomGameTeam: () => CustomGameTeam,
38
+ MEMBERSHIP_KEY: () => MEMBERSHIP_KEY,
34
39
  MissingContextError: () => MissingContextError,
35
40
  MissingParameterError: () => MissingParameterError,
36
41
  ValorantApiError: () => ValorantApiError,
@@ -41,6 +46,9 @@ __export(index_exports, {
41
46
  ValorantNetworkError: () => ValorantNetworkError,
42
47
  ValorantRateLimitError: () => ValorantRateLimitError,
43
48
  ValorantValidationError: () => ValorantValidationError,
49
+ agentName: () => agentName,
50
+ customGameMapName: () => customGameMapName,
51
+ customGameModeName: () => customGameModeName,
44
52
  fetchTransport: () => fetchTransport,
45
53
  isRegion: () => isRegion,
46
54
  localTransport: () => localTransport,
@@ -48,778 +56,2427 @@ __export(index_exports, {
48
56
  parseLockfile: () => parseLockfile,
49
57
  readLockfile: () => readLockfile,
50
58
  registry: () => registry,
51
- shardForRegion: () => shardForRegion
59
+ shardForRegion: () => shardForRegion,
60
+ teamOfPlayer: () => teamOfPlayer
52
61
  });
53
62
  module.exports = __toCommonJS(index_exports);
54
63
 
55
- // src/client.ts
56
- var import_zod4 = require("zod");
64
+ // src/api/groups/pvp.ts
65
+ var import_valorant_api_types10 = require("valorant-api-types");
57
66
 
58
- // src/api/registry.ts
59
- var import_valorant_api_types = require("valorant-api-types");
60
-
61
- // src/extra/catalog.ts
67
+ // src/endpoints/riot/account.ts
62
68
  var import_zod = require("zod");
63
69
 
64
- // src/envelope.ts
65
- var enveloped = /* @__PURE__ */ new WeakSet();
66
- function markEnveloped(endpoint2) {
67
- enveloped.add(endpoint2);
68
- return endpoint2;
70
+ // src/endpoints/riot/shared.ts
71
+ var player = { token: true, entitlement: true, clientVersion: true, clientPlatform: true };
72
+ function withResponse(endpoint2, schema) {
73
+ return { ...endpoint2, responses: { "200": schema } };
69
74
  }
70
- function unwrapEnvelope(endpoint2, body) {
71
- if (enveloped.has(endpoint2) && typeof body === "object" && body !== null && "data" in body) {
72
- return body.data;
73
- }
74
- return body;
75
+ function onSharedHost(endpoint2) {
76
+ return { ...endpoint2, type: "shared" };
75
77
  }
76
78
 
77
- // src/extra/catalog.ts
78
- var BASE = "https://valorant-api.com/v1/";
79
- var text = import_zod.z.string().nullish();
80
- var asset = import_zod.z.object({
81
- uuid: import_zod.z.string(),
82
- displayName: text,
83
- displayIcon: text,
84
- assetPath: text
85
- }).passthrough();
86
- var agentSchema = asset.extend({
87
- description: text,
88
- developerName: text,
89
- characterTags: import_zod.z.array(import_zod.z.string()).nullish(),
90
- displayIconSmall: text,
91
- bustPortrait: text,
92
- fullPortrait: text,
93
- killfeedPortrait: text,
94
- background: text,
95
- isPlayableCharacter: import_zod.z.boolean(),
96
- role: import_zod.z.object({ uuid: import_zod.z.string(), displayName: text, description: text, displayIcon: text }).passthrough().nullish(),
97
- abilities: import_zod.z.array(import_zod.z.object({ slot: import_zod.z.string(), displayName: text, description: text, displayIcon: text }).passthrough()).nullish()
98
- });
99
- var mapSchema = asset.extend({
100
- coordinates: text,
101
- listViewIcon: text,
102
- splash: text,
103
- mapUrl: text,
104
- xMultiplier: import_zod.z.number(),
105
- yMultiplier: import_zod.z.number(),
106
- xScalarToAdd: import_zod.z.number(),
107
- yScalarToAdd: import_zod.z.number(),
108
- callouts: import_zod.z.array(import_zod.z.object({ regionName: import_zod.z.string(), superRegionName: import_zod.z.string(), location: import_zod.z.object({ x: import_zod.z.number(), y: import_zod.z.number() }) }).passthrough()).nullish()
109
- });
110
- var weaponSchema = asset.extend({
111
- category: import_zod.z.string(),
112
- defaultSkinUuid: import_zod.z.string(),
113
- killStreamIcon: text,
114
- weaponStats: import_zod.z.object({}).passthrough().nullish(),
115
- shopData: import_zod.z.object({}).passthrough().nullish(),
116
- skins: import_zod.z.array(import_zod.z.object({}).passthrough())
117
- });
118
- var skinSchema = asset.extend({
119
- themeUuid: import_zod.z.string(),
120
- contentTierUuid: text,
121
- wallpaper: text,
122
- chromas: import_zod.z.array(asset.passthrough()),
123
- levels: import_zod.z.array(asset.passthrough())
124
- });
125
- var seasonSchema = import_zod.z.object({
126
- uuid: import_zod.z.string(),
127
- displayName: text,
128
- type: text,
129
- startTime: import_zod.z.string(),
130
- endTime: import_zod.z.string(),
131
- parentUuid: text,
132
- assetPath: text
133
- }).passthrough();
134
- var versionSchema = import_zod.z.object({
135
- manifestId: import_zod.z.string(),
136
- branch: import_zod.z.string(),
137
- version: import_zod.z.string(),
138
- buildVersion: import_zod.z.string(),
139
- engineVersion: import_zod.z.string(),
140
- riotClientVersion: import_zod.z.string().describe("Value of the X-Riot-ClientVersion header"),
141
- riotClientBuild: import_zod.z.string(),
142
- buildDate: import_zod.z.string()
143
- }).passthrough();
144
- function query(extra = []) {
145
- return new Map([
146
- ["language", import_zod.z.string().optional().describe("Language code such as `fr-FR`. Defaults to `en-US`.")],
147
- ...extra
148
- ]);
149
- }
150
- function endpoint(name, description, path, schema, extra = []) {
151
- return markEnveloped({
152
- name,
153
- description,
154
- category: "Valorant-API.com",
155
- type: "other",
156
- suffix: `${BASE}${path}`,
157
- query: query(extra),
158
- responses: { "200": schema }
159
- });
160
- }
161
- function collection(title, singular, path, schema, extra = []) {
162
- return {
163
- list: endpoint(title, `List of ${title.toLowerCase()}`, path, import_zod.z.array(schema), extra),
164
- one: endpoint(singular, `One ${singular.toLowerCase()} by UUID`, `${path}/{uuid}`, schema)
165
- };
166
- }
167
- var playable = [["isPlayableCharacter", import_zod.z.boolean().optional().describe("Only return playable agents. Skips the duplicate Sova.")]];
168
- var agents = collection("Agents", "Agent", "agents", agentSchema, playable);
169
- var buddies = collection("Buddies", "Buddy", "buddies", asset);
170
- var buddyLevels = collection("Buddy Levels", "Buddy Level", "buddies/levels", asset);
171
- var bundles = collection("Bundles", "Bundle", "bundles", asset);
172
- var ceremonies = collection("Ceremonies", "Ceremony", "ceremonies", asset);
173
- var competitiveTiers = collection("Competitive Tiers", "Competitive Tier Set", "competitivetiers", import_zod.z.object({ uuid: import_zod.z.string(), tiers: import_zod.z.array(import_zod.z.object({ tier: import_zod.z.number(), tierName: text, division: text, color: text }).passthrough()) }).passthrough());
174
- var contentTiers = collection("Content Tiers", "Content Tier", "contenttiers", asset);
175
- var contracts = collection("Contracts", "Contract", "contracts", asset);
176
- var currencies = collection("Currencies", "Currency", "currencies", asset);
177
- var events = collection("Events", "Event", "events", asset);
178
- var flex = collection("Flex", "Flex Item", "flex", asset);
179
- var gamemodes = collection("Gamemodes", "Gamemode", "gamemodes", asset);
180
- var gamemodeEquippables = collection("Gamemode Equippables", "Gamemode Equippable", "gamemodes/equippables", asset);
181
- var gear = collection("Gear", "Gear Item", "gear", asset);
182
- var levelBorders = collection("Level Borders", "Level Border", "levelborders", asset);
183
- var maps = collection("Maps", "Map", "maps", mapSchema);
184
- var missions = collection("Missions", "Mission", "missions", import_zod.z.object({ uuid: import_zod.z.string(), displayName: text }).passthrough());
185
- var playerCards = collection("Player Cards", "Player Card", "playercards", asset);
186
- var playerTitles = collection("Player Titles", "Player Title", "playertitles", import_zod.z.object({ uuid: import_zod.z.string(), displayName: text, titleText: text }).passthrough());
187
- var seasons = collection("Seasons", "Season", "seasons", seasonSchema);
188
- var competitiveSeasons = collection("Competitive Seasons", "Competitive Season", "seasons/competitive", import_zod.z.object({ uuid: import_zod.z.string(), seasonUuid: import_zod.z.string(), startTime: import_zod.z.string(), endTime: import_zod.z.string() }).passthrough());
189
- var sprays = collection("Sprays", "Spray", "sprays", asset);
190
- var sprayLevels = collection("Spray Levels", "Spray Level", "sprays/levels", asset);
191
- var themes = collection("Themes", "Theme", "themes", asset);
192
- var weapons = collection("Weapons", "Weapon", "weapons", weaponSchema);
193
- var weaponSkins = collection("Weapon Skins", "Weapon Skin", "weapons/skins", skinSchema);
194
- var weaponSkinChromas = collection("Weapon Skin Chromas", "Weapon Skin Chroma", "weapons/skinchromas", asset);
195
- var weaponSkinLevels = collection("Weapon Skin Levels", "Weapon Skin Level", "weapons/skinlevels", asset);
196
- var catalogEndpoints = {
197
- agents: agents.list,
198
- agent: agents.one,
199
- buddies: buddies.list,
200
- buddy: buddies.one,
201
- buddyLevels: buddyLevels.list,
202
- buddyLevel: buddyLevels.one,
203
- bundles: bundles.list,
204
- bundle: bundles.one,
205
- ceremonies: ceremonies.list,
206
- ceremony: ceremonies.one,
207
- competitiveTiers: competitiveTiers.list,
208
- competitiveTier: competitiveTiers.one,
209
- contentTiers: contentTiers.list,
210
- contentTier: contentTiers.one,
211
- contracts: contracts.list,
212
- contract: contracts.one,
213
- currencies: currencies.list,
214
- currency: currencies.one,
215
- events: events.list,
216
- event: events.one,
217
- flex: flex.list,
218
- flexItem: flex.one,
219
- gamemodes: gamemodes.list,
220
- gamemode: gamemodes.one,
221
- gamemodeEquippables: gamemodeEquippables.list,
222
- gamemodeEquippable: gamemodeEquippables.one,
223
- gear: gear.list,
224
- gearItem: gear.one,
225
- levelBorders: levelBorders.list,
226
- levelBorder: levelBorders.one,
227
- maps: maps.list,
228
- map: maps.one,
229
- missions: missions.list,
230
- mission: missions.one,
231
- playerCards: playerCards.list,
232
- playerCard: playerCards.one,
233
- playerTitles: playerTitles.list,
234
- playerTitle: playerTitles.one,
235
- seasons: seasons.list,
236
- season: seasons.one,
237
- competitiveSeasons: competitiveSeasons.list,
238
- competitiveSeason: competitiveSeasons.one,
239
- sprays: sprays.list,
240
- spray: sprays.one,
241
- sprayLevels: sprayLevels.list,
242
- sprayLevel: sprayLevels.one,
243
- themes: themes.list,
244
- theme: themes.one,
245
- version: endpoint("Version", "Current game version and the matching client version", "version", versionSchema),
246
- weapons: weapons.list,
247
- weapon: weapons.one,
248
- weaponSkins: weaponSkins.list,
249
- weaponSkin: weaponSkins.one,
250
- weaponSkinChromas: weaponSkinChromas.list,
251
- weaponSkinChroma: weaponSkinChromas.one,
252
- weaponSkinLevels: weaponSkinLevels.list,
253
- weaponSkinLevel: weaponSkinLevels.one
79
+ // src/endpoints/riot/account.ts
80
+ var dailyTicketEndpoint = {
81
+ name: "Daily Ticket",
82
+ description: "Daily ticket rewards and the matches already counted.",
83
+ category: "Account Endpoints",
84
+ type: "pd",
85
+ suffix: "daily-ticket/v1/{puuid}",
86
+ riotRequirements: player,
87
+ responses: { "200": import_zod.z.object({
88
+ Version: import_zod.z.number(),
89
+ DailyRewards: import_zod.z.object({
90
+ RemainingLifetimeSeconds: import_zod.z.number(),
91
+ BonusMilestonesPending: import_zod.z.number(),
92
+ Milestones: import_zod.z.array(import_zod.z.object({
93
+ Progress: import_zod.z.number(),
94
+ BonusApplied: import_zod.z.boolean()
95
+ }))
96
+ }),
97
+ ProcessedMatches: import_zod.z.array(import_zod.z.object({
98
+ ID: import_zod.z.string(),
99
+ CreatedAt: import_zod.z.string(),
100
+ DailyExpireTime: import_zod.z.string(),
101
+ PreviousDailyExpireTime: import_zod.z.string(),
102
+ ProgressBefore: import_zod.z.number(),
103
+ ProgressAfter: import_zod.z.number(),
104
+ XP: import_zod.z.number(),
105
+ SoftCurrency: import_zod.z.number(),
106
+ WasPenalized: import_zod.z.boolean(),
107
+ BonusesApplied: import_zod.z.number(),
108
+ DailyBonusState: import_zod.z.array(import_zod.z.boolean())
109
+ }))
110
+ }) }
111
+ };
112
+ var dailyTicketQueueConfigEndpoint = {
113
+ name: "Daily Ticket Queue Config",
114
+ description: "Which queues count for the daily ticket.",
115
+ category: "Account Endpoints",
116
+ type: "pd",
117
+ suffix: "daily-ticket/v1/queue-config",
118
+ riotRequirements: player,
119
+ responses: { "200": import_zod.z.object({
120
+ default: import_zod.z.object({
121
+ flatProgressPerMatch: import_zod.z.number(),
122
+ progressPerRoundWin: import_zod.z.boolean()
123
+ }),
124
+ queueOverrides: import_zod.z.object({
125
+ abilitydraftarena: import_zod.z.object({
126
+ flatProgressPerMatch: import_zod.z.number(),
127
+ progressPerRoundWin: import_zod.z.boolean()
128
+ }),
129
+ competitive: import_zod.z.object({
130
+ flatProgressPerMatch: import_zod.z.number(),
131
+ progressPerRoundWin: import_zod.z.boolean()
132
+ }),
133
+ console_abilitydraftarena: import_zod.z.object({
134
+ flatProgressPerMatch: import_zod.z.number(),
135
+ progressPerRoundWin: import_zod.z.boolean()
136
+ }),
137
+ console_competitive: import_zod.z.object({
138
+ flatProgressPerMatch: import_zod.z.number(),
139
+ progressPerRoundWin: import_zod.z.boolean()
140
+ }),
141
+ console_dodgeball: import_zod.z.object({
142
+ flatProgressPerMatch: import_zod.z.number(),
143
+ progressPerRoundWin: import_zod.z.boolean()
144
+ }),
145
+ console_fortcollins: import_zod.z.object({
146
+ flatProgressPerMatch: import_zod.z.number(),
147
+ progressPerRoundWin: import_zod.z.boolean()
148
+ }),
149
+ console_hurm: import_zod.z.object({
150
+ flatProgressPerMatch: import_zod.z.number(),
151
+ progressPerRoundWin: import_zod.z.boolean()
152
+ }),
153
+ console_newmap: import_zod.z.object({
154
+ flatProgressPerMatch: import_zod.z.number(),
155
+ progressPerRoundWin: import_zod.z.boolean()
156
+ }),
157
+ console_skirmish2v2: import_zod.z.object({
158
+ flatProgressPerMatch: import_zod.z.number(),
159
+ progressPerRoundWin: import_zod.z.boolean()
160
+ }),
161
+ console_skirmishascension1v1: import_zod.z.object({
162
+ flatProgressPerMatch: import_zod.z.number(),
163
+ progressPerRoundWin: import_zod.z.boolean()
164
+ }),
165
+ console_skirmishascension2v2: import_zod.z.object({
166
+ flatProgressPerMatch: import_zod.z.number(),
167
+ progressPerRoundWin: import_zod.z.boolean()
168
+ }),
169
+ console_snowball: import_zod.z.object({
170
+ flatProgressPerMatch: import_zod.z.number(),
171
+ progressPerRoundWin: import_zod.z.boolean()
172
+ }),
173
+ console_spikerush: import_zod.z.object({
174
+ flatProgressPerMatch: import_zod.z.number(),
175
+ progressPerRoundWin: import_zod.z.boolean()
176
+ }),
177
+ console_swiftplay: import_zod.z.object({
178
+ flatProgressPerMatch: import_zod.z.number(),
179
+ progressPerRoundWin: import_zod.z.boolean()
180
+ }),
181
+ console_unrated: import_zod.z.object({
182
+ flatProgressPerMatch: import_zod.z.number(),
183
+ progressPerRoundWin: import_zod.z.boolean()
184
+ }),
185
+ console_valaram: import_zod.z.object({
186
+ flatProgressPerMatch: import_zod.z.number(),
187
+ progressPerRoundWin: import_zod.z.boolean()
188
+ }),
189
+ dodgeball: import_zod.z.object({
190
+ flatProgressPerMatch: import_zod.z.number(),
191
+ progressPerRoundWin: import_zod.z.boolean()
192
+ }),
193
+ fortcollins: import_zod.z.object({
194
+ flatProgressPerMatch: import_zod.z.number(),
195
+ progressPerRoundWin: import_zod.z.boolean()
196
+ }),
197
+ ggteam: import_zod.z.object({
198
+ flatProgressPerMatch: import_zod.z.number(),
199
+ progressPerRoundWin: import_zod.z.boolean()
200
+ }),
201
+ hurm: import_zod.z.object({
202
+ flatProgressPerMatch: import_zod.z.number(),
203
+ progressPerRoundWin: import_zod.z.boolean()
204
+ }),
205
+ newmap: import_zod.z.object({
206
+ flatProgressPerMatch: import_zod.z.number(),
207
+ progressPerRoundWin: import_zod.z.boolean()
208
+ }),
209
+ premier: import_zod.z.object({
210
+ flatProgressPerMatch: import_zod.z.number(),
211
+ progressPerRoundWin: import_zod.z.boolean()
212
+ }),
213
+ skirmish2v2: import_zod.z.object({
214
+ flatProgressPerMatch: import_zod.z.number(),
215
+ progressPerRoundWin: import_zod.z.boolean()
216
+ }),
217
+ skirmishascension1v1: import_zod.z.object({
218
+ flatProgressPerMatch: import_zod.z.number(),
219
+ progressPerRoundWin: import_zod.z.boolean()
220
+ }),
221
+ skirmishascension2v2: import_zod.z.object({
222
+ flatProgressPerMatch: import_zod.z.number(),
223
+ progressPerRoundWin: import_zod.z.boolean()
224
+ }),
225
+ snowball: import_zod.z.object({
226
+ flatProgressPerMatch: import_zod.z.number(),
227
+ progressPerRoundWin: import_zod.z.boolean()
228
+ }),
229
+ spikerush: import_zod.z.object({
230
+ flatProgressPerMatch: import_zod.z.number(),
231
+ progressPerRoundWin: import_zod.z.boolean()
232
+ }),
233
+ swiftplay: import_zod.z.object({
234
+ flatProgressPerMatch: import_zod.z.number(),
235
+ progressPerRoundWin: import_zod.z.boolean()
236
+ }),
237
+ unrated: import_zod.z.object({
238
+ flatProgressPerMatch: import_zod.z.number(),
239
+ progressPerRoundWin: import_zod.z.boolean()
240
+ }),
241
+ valaram: import_zod.z.object({
242
+ flatProgressPerMatch: import_zod.z.number(),
243
+ progressPerRoundWin: import_zod.z.boolean()
244
+ })
245
+ })
246
+ }) }
247
+ };
248
+ var favoritesEndpoint = {
249
+ name: "Favorites",
250
+ description: "Favorited store content of the player.",
251
+ category: "Account Endpoints",
252
+ type: "pd",
253
+ suffix: "favorites/v1/players/{puuid}/favorites",
254
+ riotRequirements: player,
255
+ responses: { "200": import_zod.z.object({
256
+ Subject: import_zod.z.string(),
257
+ FavoritedContent: import_zod.z.record(import_zod.z.string(), import_zod.z.object({
258
+ FavoriteID: import_zod.z.string(),
259
+ ItemID: import_zod.z.string()
260
+ }))
261
+ }) }
262
+ };
263
+ var goldstarsEndpoint = {
264
+ name: "Goldstars",
265
+ description: "Goldstar definitions. Field names are obfuscated by the game.",
266
+ category: "Account Endpoints",
267
+ type: "pd",
268
+ suffix: "goldstars/v1/goldstars",
269
+ riotRequirements: player,
270
+ responses: { "200": import_zod.z.array(import_zod.z.object({
271
+ id: import_zod.z.string(),
272
+ tempT: import_zod.z.number()
273
+ })) }
274
+ };
275
+ var goldstarsPlayerEndpoint = {
276
+ name: "Goldstars Player",
277
+ description: "Goldstars of a player. Field names are obfuscated by the game.",
278
+ category: "Account Endpoints",
279
+ type: "pd",
280
+ suffix: "goldstars/v1/players/{puuid}",
281
+ riotRequirements: player,
282
+ responses: { "200": import_zod.z.object({
283
+ puuid: import_zod.z.string(),
284
+ version: import_zod.z.number(),
285
+ tempS: import_zod.z.object({
286
+ "00000000-0000-0000-0000-000000000000": import_zod.z.object({
287
+ tempS: import_zod.z.string(),
288
+ tempA: import_zod.z.record(import_zod.z.string(), import_zod.z.object({
289
+ id: import_zod.z.string(),
290
+ tempC: import_zod.z.number(),
291
+ tempB: import_zod.z.number()
292
+ }))
293
+ }),
294
+ "8102cd81-43a0-d0d7-bd59-47b8fe9bed1b": import_zod.z.object({
295
+ tempS: import_zod.z.string(),
296
+ tempA: import_zod.z.record(import_zod.z.string(), import_zod.z.object({
297
+ id: import_zod.z.string(),
298
+ tempC: import_zod.z.number(),
299
+ tempB: import_zod.z.number()
300
+ }))
301
+ })
302
+ }),
303
+ tempM: import_zod.z.array(import_zod.z.object({
304
+ id: import_zod.z.string(),
305
+ tempG: import_zod.z.number(),
306
+ tempP: import_zod.z.record(import_zod.z.string(), import_zod.z.object({
307
+ tempA: import_zod.z.record(import_zod.z.string(), import_zod.z.object({
308
+ id: import_zod.z.string(),
309
+ tempV: import_zod.z.number(),
310
+ tempB: import_zod.z.boolean()
311
+ }))
312
+ }))
313
+ }))
314
+ }) }
315
+ };
316
+ var bloomlineQueuesEndpoint = {
317
+ name: "Bloomline Queues",
318
+ description: "Queues handled by the `bloomline` service. The purpose of the service is not documented.",
319
+ category: "Account Endpoints",
320
+ type: "pd",
321
+ suffix: "bloomline/v0/config/valid-queues",
322
+ riotRequirements: player,
323
+ responses: { "200": import_zod.z.object({
324
+ ProcessedQueues: import_zod.z.array(import_zod.z.string()),
325
+ PerformanceScoreQueues: import_zod.z.array(import_zod.z.string())
326
+ }) }
327
+ };
328
+ var bloomlinePlayerEndpoint = {
329
+ name: "Bloomline Player",
330
+ description: "Per-player data of the `bloomline` service. The purpose of the service is not documented.",
331
+ category: "Account Endpoints",
332
+ type: "pd",
333
+ suffix: "bloomline/v0/players/{puuid}",
334
+ riotRequirements: player,
335
+ responses: { "200": import_zod.z.object({
336
+ Subject: import_zod.z.string(),
337
+ Bonsais: import_zod.z.array(import_zod.z.object({
338
+ BonsaiID: import_zod.z.string(),
339
+ HypeID: import_zod.z.string().optional(),
340
+ BackgroundID: import_zod.z.string().optional(),
341
+ ClipID: import_zod.z.string().optional(),
342
+ BorderID: import_zod.z.string().optional(),
343
+ Flourish: import_zod.z.object({
344
+ ShortLevel: import_zod.z.number().optional(),
345
+ PreviousShortLevel: import_zod.z.number().optional(),
346
+ LongLevel: import_zod.z.number().optional(),
347
+ FlourishID: import_zod.z.string().optional(),
348
+ Points: import_zod.z.number().optional(),
349
+ PointsVersion: import_zod.z.number().optional()
350
+ }),
351
+ TrackProgressList: import_zod.z.array(import_zod.z.object({
352
+ TrackID: import_zod.z.string(),
353
+ TrackLevel: import_zod.z.number().optional()
354
+ }))
355
+ })),
356
+ LongGroupVersion: import_zod.z.number()
357
+ }) }
254
358
  };
255
359
 
256
- // src/extra/riot.ts
360
+ // src/endpoints/riot/agentSelect.ts
361
+ var import_valorant_api_types = require("valorant-api-types");
257
362
  var import_zod2 = require("zod");
258
- var contractsActiveStoryEndpoint = {
259
- name: "Active Story",
260
- description: "Get the battlepass contracts",
261
- queryName: "ContractDefinitions_FetchActiveStory",
262
- category: "Contract Endpoints",
263
- type: "pd",
264
- suffix: "contract-definitions/v2/definitions/story",
265
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
266
- responses: { "200": import_zod2.z.unknown() }
267
- };
268
- var currentGameAllChatTokenEndpoint = {
269
- name: "All Chat Token",
270
- description: "Get a token for all chat",
271
- queryName: "CoreGame_FetchAllChatMUCToken",
272
- category: "Current Game Endpoints",
273
- type: "glz",
274
- suffix: "core-game/v1/matches/{in-progress match id}/allchatmuctoken",
275
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
276
- responses: { "200": import_zod2.z.unknown() }
277
- };
278
- var currentGameTeamChatTokenEndpoint = {
279
- name: "Team Chat Token",
280
- description: "Get a token for team chat",
281
- queryName: "CoreGame_FetchTeamChatMUCToken",
282
- category: "Current Game Endpoints",
283
- type: "glz",
284
- suffix: "core-game/v1/matches/{in-progress match id}/teamchatmuctoken",
285
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
286
- responses: { "200": import_zod2.z.unknown() }
287
- };
288
- var localAntiAddictionShutdownEndpoint = {
289
- name: "Anti Addiction Shutdown",
290
- description: "GET ANTI_ADDICTION_RNet_FetchShutdownPolicyState",
291
- queryName: "ANTI_ADDICTION_RNet_FetchShutdownPolicyState",
292
- category: "Local Endpoints",
363
+ var agentSelect = import_zod2.z.object({
364
+ ID: import_zod2.z.string(),
365
+ Version: import_zod2.z.number(),
366
+ Teams: import_zod2.z.array(import_zod2.z.object({
367
+ TeamID: import_zod2.z.string(),
368
+ TeamNumber: import_zod2.z.number(),
369
+ Players: import_zod2.z.array(import_zod2.z.object({
370
+ Subject: import_zod2.z.string(),
371
+ CharacterID: import_zod2.z.string(),
372
+ CharacterSelectionState: import_zod2.z.string(),
373
+ PregamePlayerState: import_zod2.z.string(),
374
+ CompetitiveTier: import_zod2.z.number(),
375
+ PlayerIdentity: import_zod2.z.object({
376
+ Subject: import_zod2.z.string(),
377
+ PlayerCardID: import_zod2.z.string(),
378
+ PlayerTitleID: import_zod2.z.string(),
379
+ AccountLevel: import_zod2.z.number(),
380
+ PreferredLevelBorderID: import_zod2.z.string(),
381
+ Incognito: import_zod2.z.boolean(),
382
+ HideAccountLevel: import_zod2.z.boolean()
383
+ }),
384
+ SeasonalBadgeInfo: import_zod2.z.object({
385
+ SeasonID: import_zod2.z.string(),
386
+ NumberOfWins: import_zod2.z.number(),
387
+ Rank: import_zod2.z.number(),
388
+ LeaderboardRank: import_zod2.z.number()
389
+ }),
390
+ IsCaptain: import_zod2.z.boolean(),
391
+ PlatformType: import_zod2.z.string(),
392
+ PremierPrestige: import_zod2.z.object({})
393
+ }))
394
+ })),
395
+ AllyTeam: import_zod2.z.object({
396
+ TeamID: import_zod2.z.string(),
397
+ TeamNumber: import_zod2.z.number(),
398
+ Players: import_zod2.z.array(import_zod2.z.object({
399
+ Subject: import_zod2.z.string(),
400
+ CharacterID: import_zod2.z.string(),
401
+ CharacterSelectionState: import_zod2.z.string(),
402
+ PregamePlayerState: import_zod2.z.string(),
403
+ CompetitiveTier: import_zod2.z.number(),
404
+ PlayerIdentity: import_zod2.z.object({
405
+ Subject: import_zod2.z.string(),
406
+ PlayerCardID: import_zod2.z.string(),
407
+ PlayerTitleID: import_zod2.z.string(),
408
+ AccountLevel: import_zod2.z.number(),
409
+ PreferredLevelBorderID: import_zod2.z.string(),
410
+ Incognito: import_zod2.z.boolean(),
411
+ HideAccountLevel: import_zod2.z.boolean()
412
+ }),
413
+ SeasonalBadgeInfo: import_zod2.z.object({
414
+ SeasonID: import_zod2.z.string(),
415
+ NumberOfWins: import_zod2.z.number(),
416
+ Rank: import_zod2.z.number(),
417
+ LeaderboardRank: import_zod2.z.number()
418
+ }),
419
+ IsCaptain: import_zod2.z.boolean(),
420
+ PlatformType: import_zod2.z.string(),
421
+ PremierPrestige: import_zod2.z.object({})
422
+ }))
423
+ }),
424
+ EnemyTeamSize: import_zod2.z.number(),
425
+ EnemyTeamLockCount: import_zod2.z.number(),
426
+ PregameState: import_zod2.z.string(),
427
+ LastUpdated: import_zod2.z.string(),
428
+ MapID: import_zod2.z.string(),
429
+ CastedVotes: import_zod2.z.object({}),
430
+ MapSelectStep: import_zod2.z.number(),
431
+ Team1: import_zod2.z.string(),
432
+ GamePodID: import_zod2.z.string(),
433
+ Mode: import_zod2.z.string(),
434
+ VoiceSessionID: import_zod2.z.string(),
435
+ MUCName: import_zod2.z.string(),
436
+ TeamMatchToken: import_zod2.z.string(),
437
+ QueueID: import_zod2.z.string(),
438
+ ProvisioningFlowID: import_zod2.z.string(),
439
+ IsRanked: import_zod2.z.boolean(),
440
+ PhaseTimeRemainingNS: import_zod2.z.number(),
441
+ StepTimeRemainingNS: import_zod2.z.number(),
442
+ altModesFlagADA: import_zod2.z.boolean(),
443
+ GameRules: import_zod2.z.object({
444
+ AccoladesEnabled: import_zod2.z.string(),
445
+ AllowGameModifiers: import_zod2.z.string(),
446
+ IsOvertimeWinByTwo: import_zod2.z.string(),
447
+ PlayOutAllRounds: import_zod2.z.string(),
448
+ ReplayRecordMatch: import_zod2.z.string(),
449
+ SkipMatchHistory: import_zod2.z.string(),
450
+ TournamentMode: import_zod2.z.string()
451
+ })
452
+ });
453
+ var selectCharacterEndpoint = withResponse(import_valorant_api_types.endpoints.selectCharacterEndpoint, agentSelect);
454
+ var lockCharacterEndpoint = withResponse(import_valorant_api_types.endpoints.lockCharacterEndpoint, agentSelect);
455
+
456
+ // src/endpoints/riot/chat.ts
457
+ var import_valorant_api_types2 = require("valorant-api-types");
458
+ var import_zod3 = require("zod");
459
+ var chatSettingsEndpoint = {
460
+ name: "Settings",
461
+ description: "Get chat settings",
462
+ category: "Local Endpoints - Chat",
293
463
  type: "local",
294
- suffix: "anti-addiction/v1/products/valorant/policies/shutdown/anti-addiction-state",
464
+ suffix: "chat/v1/settings",
295
465
  riotRequirements: { localAuth: true },
296
- responses: { "200": import_zod2.z.unknown() }
466
+ responses: { "200": import_zod3.z.object({
467
+ bounceDockIconEnabled: import_zod3.z.boolean(),
468
+ "chat-status-message": import_zod3.z.string(),
469
+ chatFilterDisabled: import_zod3.z.boolean(),
470
+ chatGBG: import_zod3.z.boolean(),
471
+ chatGroupDiscord: import_zod3.z.boolean(),
472
+ chatGroupMobile: import_zod3.z.boolean(),
473
+ chatGroupOffline: import_zod3.z.boolean(),
474
+ chatWindow: import_zod3.z.object({
475
+ detached: import_zod3.z.boolean(),
476
+ height: import_zod3.z.number(),
477
+ left: import_zod3.z.number(),
478
+ top: import_zod3.z.number(),
479
+ width: import_zod3.z.number()
480
+ }),
481
+ chatWindowDockedHeight: import_zod3.z.number(),
482
+ "closed-conversations": import_zod3.z.object({
483
+ "ff822fdf-71a3-54ac-814e-7ac752ba428d@eu1.pvp.net": import_zod3.z.number()
484
+ }),
485
+ friendRequestToastsDisabled: import_zod3.z.boolean(),
486
+ "hidden-conversations": import_zod3.z.object({}),
487
+ linkClickWarningEnabled: import_zod3.z.boolean(),
488
+ messageNotificationsEnabled: import_zod3.z.boolean(),
489
+ moreUnreadsEnabled: import_zod3.z.boolean(),
490
+ "muted-conversations": import_zod3.z.object({}),
491
+ recentlyPlayedFirstOpen: import_zod3.z.boolean(),
492
+ recentlyPlayedOpen: import_zod3.z.boolean(),
493
+ "roster-group-collapsed": import_zod3.z.object({}),
494
+ showWhenTypingEnabled: import_zod3.z.boolean(),
495
+ sortBy: import_zod3.z.string(),
496
+ usePlayerPreferences: import_zod3.z.boolean()
497
+ }) }
297
498
  };
298
- var localAntiAddictionWarningEndpoint = {
299
- name: "Anti Addiction Warning",
300
- description: "GET ANTI_ADDICTION_RNet_FetchWarningMessagePolicyState",
301
- queryName: "ANTI_ADDICTION_RNet_FetchWarningMessagePolicyState",
302
- category: "Local Endpoints",
499
+ var chatTournamentInfoEndpoint = {
500
+ name: "Tournament Info",
501
+ description: "Get in-tournament conversations",
502
+ category: "Local Endpoints - Chat",
303
503
  type: "local",
304
- suffix: "anti-addiction/v1/products/valorant/policies/warningMessage/anti-addiction-state",
504
+ suffix: "chat/v6/conversations/ares-tournaments",
305
505
  riotRequirements: { localAuth: true },
306
- responses: { "200": import_zod2.z.unknown() }
506
+ responses: { "200": import_zod3.z.object({}) }
307
507
  };
308
- var localClientConfigEndpoint = {
309
- name: "Client Config",
310
- description: "GET CLIENTCONFIG_RNET_GET_ValorantClientConfig",
311
- queryName: "CLIENTCONFIG_RNET_GET_ValorantClientConfig",
312
- category: "Local Endpoints",
313
- type: "local",
314
- suffix: "client-config/v2/namespace/valorant.client/player",
315
- riotRequirements: { localAuth: true },
316
- responses: { "200": import_zod2.z.unknown() }
508
+ var chatParticipantsEndpoint = withResponse(import_valorant_api_types2.endpoints.chatParticipantsEndpoint, import_zod3.z.object({
509
+ participants: import_zod3.z.array(import_zod3.z.object({
510
+ activePlatform: import_zod3.z.string().nullable(),
511
+ cid: import_zod3.z.string(),
512
+ game_name: import_zod3.z.string(),
513
+ game_tag: import_zod3.z.string(),
514
+ isInteractionAllowed: import_zod3.z.boolean(),
515
+ muted: import_zod3.z.boolean(),
516
+ name: import_zod3.z.string(),
517
+ pid: import_zod3.z.string(),
518
+ puuid: import_zod3.z.string(),
519
+ region: import_zod3.z.string()
520
+ }))
521
+ }));
522
+
523
+ // src/endpoints/riot/contracts.ts
524
+ var import_valorant_api_types3 = require("valorant-api-types");
525
+ var import_zod4 = require("zod");
526
+ var activeRecruitmentEventEndpoint = {
527
+ name: "Active Recruitment Event",
528
+ description: "The current agent recruitment event.",
529
+ category: "Contract Endpoints",
530
+ type: "pd",
531
+ suffix: "contracts/v1/agents/activeRecruitmentEvent",
532
+ riotRequirements: player,
533
+ responses: { "200": import_zod4.z.object({
534
+ AgentID: import_zod4.z.string(),
535
+ CounterID: import_zod4.z.string(),
536
+ MilestoneThreshold: import_zod4.z.number(),
537
+ StartDate: import_zod4.z.string(),
538
+ EndDate: import_zod4.z.string(),
539
+ IsActive: import_zod4.z.boolean(),
540
+ includedPlatforms: import_zod4.z.object({
541
+ console: import_zod4.z.object({
542
+ developmentOnly: import_zod4.z.boolean()
543
+ }),
544
+ mobile: import_zod4.z.object({
545
+ developmentOnly: import_zod4.z.boolean()
546
+ }),
547
+ pc: import_zod4.z.object({
548
+ developmentOnly: import_zod4.z.boolean()
549
+ })
550
+ })
551
+ }) }
317
552
  };
318
- var localEulaEndpoint = {
319
- name: "Eula",
320
- description: "Get the EULA",
321
- queryName: "LEGAL_INFO_RNet_EULA",
322
- category: "Local Endpoints",
323
- type: "local",
324
- suffix: "eula/v1/agreement/content",
325
- riotRequirements: { localAuth: true },
326
- responses: { "200": import_zod2.z.unknown() }
553
+ var contractsEndpoint = withResponse(import_valorant_api_types3.endpoints.contractsEndpoint, import_zod4.z.object({
554
+ Version: import_zod4.z.number(),
555
+ Subject: import_zod4.z.string(),
556
+ Contracts: import_zod4.z.array(import_zod4.z.object({
557
+ ContractDefinitionID: import_zod4.z.string(),
558
+ ContractProgression: import_zod4.z.object({
559
+ Version: import_zod4.z.number(),
560
+ TotalProgressionEarned: import_zod4.z.number()
561
+ }),
562
+ ProgressionLevelReached: import_zod4.z.number(),
563
+ ProgressionTowardsNextLevel: import_zod4.z.number()
564
+ })),
565
+ ActiveRecruitmentEventProgress: import_zod4.z.object({
566
+ AgentID: import_zod4.z.string(),
567
+ Version: import_zod4.z.number(),
568
+ CounterID: import_zod4.z.string(),
569
+ ProgressionEarned: import_zod4.z.number()
570
+ }),
571
+ Missions: import_zod4.z.array(import_zod4.z.object({
572
+ ID: import_zod4.z.string(),
573
+ Objectives: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.number()),
574
+ Complete: import_zod4.z.boolean(),
575
+ ExpirationTime: import_zod4.z.string()
576
+ })),
577
+ MissionMetadata: import_zod4.z.object({
578
+ WeeklyCheckpoint: import_zod4.z.string(),
579
+ WeeklyRefillTime: import_zod4.z.string()
580
+ }),
581
+ BTEMilestone: import_zod4.z.number()
582
+ }));
583
+
584
+ // src/endpoints/riot/currentGame.ts
585
+ var import_valorant_api_types4 = require("valorant-api-types");
586
+ var import_zod5 = require("zod");
587
+ var currentGameLoadoutsEndpoint = withResponse(import_valorant_api_types4.endpoints.currentGameLoadoutsEndpoint, import_zod5.z.object({
588
+ Loadouts: import_zod5.z.array(import_zod5.z.object({
589
+ CharacterID: import_zod5.z.string(),
590
+ Loadout: import_zod5.z.object({
591
+ Subject: import_zod5.z.string(),
592
+ Expressions: import_zod5.z.object({
593
+ AESSelections: import_zod5.z.array(import_zod5.z.object({
594
+ AssetID: import_zod5.z.string(),
595
+ TypeID: import_zod5.z.string()
596
+ }))
597
+ }),
598
+ DynamicOptions: import_zod5.z.object({}),
599
+ Items: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.object({
600
+ ID: import_zod5.z.string(),
601
+ TypeID: import_zod5.z.string(),
602
+ Sockets: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.object({
603
+ ID: import_zod5.z.string(),
604
+ Item: import_zod5.z.object({
605
+ ID: import_zod5.z.string(),
606
+ TypeID: import_zod5.z.string()
607
+ })
608
+ }))
609
+ }))
610
+ }),
611
+ Subject: import_zod5.z.string()
612
+ }))
613
+ }));
614
+
615
+ // src/endpoints/riot/esports.ts
616
+ var import_zod6 = require("zod");
617
+ var esportsLiveEventTimesEndpoint = {
618
+ name: "Esports Live Event Times",
619
+ description: "Live and upcoming esports matches, pick blocks and tournaments.",
620
+ category: "Esports Endpoints",
621
+ type: "pd",
622
+ suffix: "esports-service/v2/liveEventTimes",
623
+ riotRequirements: player,
624
+ responses: { "200": import_zod6.z.object({
625
+ Tournaments: import_zod6.z.array(import_zod6.z.object({
626
+ ID: import_zod6.z.string(),
627
+ StartTimeUTC: import_zod6.z.string(),
628
+ EndTimeUTC: import_zod6.z.string()
629
+ }))
630
+ }) }
327
631
  };
328
- var localPrivacyPolicyEndpoint = {
329
- name: "Privacy Policy",
330
- description: "Get privacy policy",
331
- queryName: "LEGAL_INFO_RNet_Privacy",
332
- category: "Local Endpoints",
333
- type: "local",
334
- suffix: "eula/v1/privacy-policy/content",
335
- riotRequirements: { localAuth: true },
336
- responses: { "200": import_zod2.z.unknown() }
632
+ var esportsUpcomingMatchesEndpoint = {
633
+ name: "Esports Upcoming Matches",
634
+ description: "Upcoming esports matches.",
635
+ category: "Esports Endpoints",
636
+ type: "pd",
637
+ suffix: "esports-service/v2/upcomingMatches",
638
+ riotRequirements: player,
639
+ responses: { "200": import_zod6.z.object({}) }
337
640
  };
338
- var localAvailableLocalesEndpoint = {
339
- name: "Available Locales",
340
- description: "Get available locales",
341
- queryName: "LOCALE_RNet_FetchAvailableLocales",
342
- category: "Local Endpoints",
343
- type: "local",
344
- suffix: "rnet-product-registry/v4/available-product-locales/products/valorant/patchlines/live",
345
- riotRequirements: { localAuth: true },
346
- responses: { "200": import_zod2.z.unknown() }
641
+ var esportsPickemLeaguesEndpoint = {
642
+ name: "Esports Pickem Leagues",
643
+ description: "Pick'em leagues.",
644
+ category: "Esports Endpoints",
645
+ type: "pd",
646
+ suffix: "esports-service/v1/pickem/leagues",
647
+ riotRequirements: player,
648
+ responses: { "200": import_zod6.z.object({
649
+ PickemLeagues: import_zod6.z.array(import_zod6.z.object({
650
+ LeagueID: import_zod6.z.string(),
651
+ EldsLeagueID: import_zod6.z.string(),
652
+ Tournament: import_zod6.z.object({
653
+ ID: import_zod6.z.string(),
654
+ EldsTournamentID: import_zod6.z.string(),
655
+ LeagueID: import_zod6.z.string(),
656
+ PickBlocks: import_zod6.z.array(import_zod6.z.object({
657
+ ID: import_zod6.z.string(),
658
+ EldsTournamentID: import_zod6.z.string(),
659
+ Slug: import_zod6.z.object({
660
+ Slug: import_zod6.z.string()
661
+ }),
662
+ PickOpenTime: import_zod6.z.string(),
663
+ PickCloseTime: import_zod6.z.string(),
664
+ State: import_zod6.z.string(),
665
+ OpenLevel: import_zod6.z.string(),
666
+ BlockType: import_zod6.z.string(),
667
+ PickBlockElements: import_zod6.z.array(import_zod6.z.object({
668
+ ID: import_zod6.z.string(),
669
+ PickBlockID: import_zod6.z.string(),
670
+ Section: import_zod6.z.object({
671
+ ID: import_zod6.z.string(),
672
+ EldsSectionID: import_zod6.z.string(),
673
+ CorrectPick: import_zod6.z.object({
674
+ Entries: import_zod6.z.array(import_zod6.z.object({
675
+ Index: import_zod6.z.number(),
676
+ Correctness: import_zod6.z.string(),
677
+ ParticipantID: import_zod6.z.string(),
678
+ Points: import_zod6.z.number(),
679
+ Rank: import_zod6.z.number()
680
+ })).nullable()
681
+ })
682
+ }),
683
+ Match: import_zod6.z.object({
684
+ ID: import_zod6.z.string(),
685
+ EldsMatchID: import_zod6.z.string(),
686
+ BaselinePoints: import_zod6.z.number(),
687
+ CorrectPick: import_zod6.z.string(),
688
+ ResultState: import_zod6.z.string()
689
+ }),
690
+ PickOpenTime: import_zod6.z.string(),
691
+ PickCloseTime: import_zod6.z.string(),
692
+ State: import_zod6.z.string(),
693
+ DisplayOrder: import_zod6.z.number()
694
+ })),
695
+ CompletionStatus: import_zod6.z.string()
696
+ })),
697
+ Participants: import_zod6.z.array(import_zod6.z.object({
698
+ ID: import_zod6.z.string(),
699
+ EldsTeamID: import_zod6.z.string()
700
+ }))
701
+ }),
702
+ Published: import_zod6.z.boolean()
703
+ }))
704
+ }) }
347
705
  };
706
+
707
+ // src/endpoints/riot/local.ts
708
+ var import_zod7 = require("zod");
348
709
  var localLocaleEndpoint = {
349
710
  name: "Locale",
350
711
  description: "Get the current locale",
351
- queryName: "LOCALE_RNet_FetchLocale",
352
712
  category: "Local Endpoints",
353
713
  type: "local",
354
714
  suffix: "riotclient/product-locales/products/valorant/patchlines/live",
355
715
  riotRequirements: { localAuth: true },
356
- responses: { "200": import_zod2.z.unknown() }
716
+ responses: { "200": import_zod7.z.string() }
357
717
  };
358
- var localReporterFeedbackEndpoint = {
359
- name: "Reporter Feedback",
360
- description: "GET REPORTER_FEEDBACK_RNet_GetReporterFeedback",
361
- queryName: "REPORTER_FEEDBACK_RNet_GetReporterFeedback",
362
- category: "Local Endpoints",
363
- type: "local",
364
- suffix: "player-reporting/v1/reporter-feedback",
365
- riotRequirements: { localAuth: true },
366
- responses: { "200": import_zod2.z.unknown() }
367
- };
368
- var localCommandLineArgsEndpoint = {
369
- name: "Command Line Args",
370
- description: "Gets the command-line args provided to the Riot client",
371
- queryName: "Riot Client Command-Line Args",
718
+ var localAvailableLocalesEndpoint = {
719
+ name: "Available Locales",
720
+ description: "Get available locales",
372
721
  category: "Local Endpoints",
373
722
  type: "local",
374
- suffix: "riotclient/command-line-args",
723
+ suffix: "rnet-product-registry/v4/available-product-locales/products/valorant/patchlines/live",
375
724
  riotRequirements: { localAuth: true },
376
- responses: { "200": import_zod2.z.unknown() }
725
+ responses: { "200": import_zod7.z.array(import_zod7.z.string()) }
377
726
  };
378
727
  var localRiotStatusEndpoint = {
379
728
  name: "Riot Status",
380
729
  description: "Get game status information such as maintenances and incidents Response is an escaped JSON string.",
381
- queryName: "RiotStatus_RNet_FetchStatus",
382
730
  category: "Local Endpoints",
383
731
  type: "local",
384
732
  suffix: "riot-status/v1/products/valorant/patchlines/live/deployments/{region}",
385
733
  riotRequirements: { localAuth: true },
386
- responses: { "200": import_zod2.z.unknown() }
387
- };
388
- var localRiotWarningEndpoint = {
389
- name: "Riot Warning",
390
- description: "GET RIOT_WARNING_RNet_GetRiotWarning",
391
- queryName: "RIOT_WARNING_RNet_GetRiotWarning",
392
- category: "Local Endpoints",
393
- type: "local",
394
- suffix: "ga-warning/v1/warnings",
395
- riotRequirements: { localAuth: true },
396
- responses: { "200": import_zod2.z.unknown() }
397
- };
398
- var localClientAuthorizationsEndpoint = {
399
- name: "Client Authorizations",
400
- description: "Gets tokens in use by the client",
401
- queryName: "RSO_RNet_FetchClientAuthorizations",
402
- category: "Local Endpoints",
403
- type: "local",
404
- suffix: "rso-auth/v2/authorizations/valorant-client",
405
- riotRequirements: { localAuth: true },
406
- responses: { "200": import_zod2.z.unknown() }
734
+ responses: { "200": import_zod7.z.string() }
407
735
  };
408
736
  var localAccessTokenEndpoint = {
409
737
  name: "Access Token",
410
738
  description: "Gets a Riot access token",
411
- queryName: "RSO_RNet_GetAccessToken",
412
739
  category: "Local Endpoints",
413
740
  type: "local",
414
741
  suffix: "rso-auth/v1/authorization/access-token",
415
742
  riotRequirements: { localAuth: true },
416
- responses: { "200": import_zod2.z.unknown() }
417
- };
418
- var localUserInfoTokenEndpoint = {
419
- name: "User Info Token",
420
- description: "GET RSO_RNet_GetUserInfoToken",
421
- queryName: "RSO_RNet_GetUserInfoToken",
422
- category: "Local Endpoints",
423
- type: "local",
424
- suffix: "rso-auth/v1/userinfo/valorant-client",
425
- riotRequirements: { localAuth: true },
426
- responses: { "200": import_zod2.z.unknown() }
427
- };
428
- var chatSettingsEndpoint = {
429
- name: "Settings",
430
- description: "Get chat settings",
431
- queryName: "TEXT_CHAT_RNet_FetchSettings",
432
- category: "Local Endpoints - Chat",
433
- type: "local",
434
- suffix: "chat/v1/settings",
435
- riotRequirements: { localAuth: true },
436
- responses: { "200": import_zod2.z.unknown() }
437
- };
438
- var chatTournamentInfoEndpoint = {
439
- name: "Tournament Info",
440
- description: "Get in-tournament conversations",
441
- queryName: "TEXT_CHAT_RNet_GetMUCInfos - tournaments",
442
- category: "Local Endpoints - Chat",
443
- type: "local",
444
- suffix: "chat/v6/conversations/ares-tournaments",
445
- riotRequirements: { localAuth: true },
446
- responses: { "200": import_zod2.z.unknown() }
743
+ responses: { "200": import_zod7.z.object({
744
+ clientId: import_zod7.z.string(),
745
+ expiry: import_zod7.z.number(),
746
+ scopes: import_zod7.z.array(import_zod7.z.string()),
747
+ token: import_zod7.z.string()
748
+ }) }
447
749
  };
448
750
  var localPluginStatusEndpoint = {
449
751
  name: "Plugin Status",
450
752
  description: "Gets plugin status",
451
- queryName: "URNetClient_CheckPluginStatus",
452
753
  category: "Local Endpoints",
453
754
  type: "local",
454
755
  suffix: "plugin-manager/v1/status",
455
756
  riotRequirements: { localAuth: true },
456
- responses: { "200": import_zod2.z.unknown() }
757
+ responses: { "200": import_zod7.z.object({
758
+ state: import_zod7.z.string()
759
+ }) }
457
760
  };
458
761
  var localRmsSessionEndpoint = {
459
762
  name: "Rms Session",
460
763
  description: "Gets the token for Riot Messaging Service",
461
- queryName: "URNetClient_CheckRMSSession",
462
764
  category: "Local Endpoints",
463
765
  type: "local",
464
766
  suffix: "riot-messaging-service/v1/session",
465
767
  riotRequirements: { localAuth: true },
466
- responses: { "200": import_zod2.z.unknown() }
768
+ responses: { "200": import_zod7.z.object({
769
+ state: import_zod7.z.string(),
770
+ token: import_zod7.z.string(),
771
+ tokenType: import_zod7.z.string()
772
+ }) }
467
773
  };
468
774
  var localProcessInfoEndpoint = {
469
775
  name: "Process Info",
470
776
  description: "Gets the Valorant process ID",
471
- queryName: "URNetClient_GetProcessInfo",
472
777
  category: "Local Endpoints",
473
778
  type: "local",
474
779
  suffix: "process-control/v1/process",
475
780
  riotRequirements: { localAuth: true },
476
- responses: { "200": import_zod2.z.unknown() }
781
+ responses: { "200": import_zod7.z.object({
782
+ pid: import_zod7.z.number(),
783
+ status: import_zod7.z.string()
784
+ }) }
477
785
  };
478
786
  var localLogPathEndpoint = {
479
787
  name: "Log Path",
480
788
  description: "Gets the Valorant log path",
481
- queryName: "Valorant Log Path",
482
789
  category: "Local Endpoints",
483
790
  type: "local",
484
791
  suffix: "product-session/v1/logs/path/VALORANT",
485
792
  riotRequirements: { localAuth: true },
486
- responses: { "200": import_zod2.z.unknown() }
793
+ responses: { "200": import_zod7.z.string() }
794
+ };
795
+ var localEulaEndpoint = {
796
+ name: "Eula",
797
+ description: "Get the EULA",
798
+ category: "Local Endpoints",
799
+ type: "local",
800
+ suffix: "eula/v1/agreement/content",
801
+ riotRequirements: { localAuth: true },
802
+ responses: { "200": import_zod7.z.string() }
803
+ };
804
+ var localPrivacyPolicyEndpoint = {
805
+ name: "Privacy Policy",
806
+ description: "Get privacy policy",
807
+ category: "Local Endpoints",
808
+ type: "local",
809
+ suffix: "eula/v1/privacy-policy/content",
810
+ riotRequirements: { localAuth: true },
811
+ responses: { "200": import_zod7.z.string() }
812
+ };
813
+
814
+ // src/endpoints/riot/party.ts
815
+ var import_valorant_api_types5 = require("valorant-api-types");
816
+ var import_zod8 = require("zod");
817
+ var customGameTeam = import_zod8.z.array(import_zod8.z.object({ Subject: import_zod8.z.string().describe("PUUID") }));
818
+ var customGameParty = import_zod8.z.object({
819
+ ID: import_zod8.z.string(),
820
+ MUCName: import_zod8.z.string(),
821
+ VoiceRoomID: import_zod8.z.string(),
822
+ Version: import_zod8.z.number(),
823
+ ClientVersion: import_zod8.z.string(),
824
+ Members: import_zod8.z.array(import_zod8.z.object({
825
+ Subject: import_zod8.z.string(),
826
+ CompetitiveTier: import_zod8.z.number(),
827
+ PlayerIdentity: import_zod8.z.object({
828
+ Subject: import_zod8.z.string(),
829
+ PlayerCardID: import_zod8.z.string(),
830
+ PlayerTitleID: import_zod8.z.string(),
831
+ AccountLevel: import_zod8.z.number(),
832
+ PreferredLevelBorderID: import_zod8.z.string(),
833
+ Incognito: import_zod8.z.boolean(),
834
+ HideAccountLevel: import_zod8.z.boolean()
835
+ }),
836
+ IsOwner: import_zod8.z.boolean(),
837
+ QueueEligibleRemainingAccountLevels: import_zod8.z.number(),
838
+ Pings: import_zod8.z.array(import_zod8.z.object({
839
+ Ping: import_zod8.z.number(),
840
+ GamePodID: import_zod8.z.string()
841
+ })),
842
+ IsReady: import_zod8.z.boolean(),
843
+ IsModerator: import_zod8.z.boolean(),
844
+ UseBroadcastHUD: import_zod8.z.boolean(),
845
+ PlatformType: import_zod8.z.string(),
846
+ PremierPrestige: import_zod8.z.object({}),
847
+ JoinedAt: import_zod8.z.string()
848
+ })),
849
+ State: import_zod8.z.string(),
850
+ PreviousState: import_zod8.z.string(),
851
+ StateTransitionReason: import_zod8.z.string(),
852
+ Accessibility: import_zod8.z.string(),
853
+ CustomGameData: import_zod8.z.object({
854
+ Settings: import_zod8.z.object({
855
+ Map: import_zod8.z.string(),
856
+ Mode: import_zod8.z.string(),
857
+ UseBots: import_zod8.z.boolean(),
858
+ GamePod: import_zod8.z.string(),
859
+ GameRules: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.string()).nullable(),
860
+ EsportsCustomLobbyName: import_zod8.z.string()
861
+ }),
862
+ Membership: import_zod8.z.object({
863
+ teamOne: customGameTeam,
864
+ teamTwo: customGameTeam,
865
+ teamSpectate: customGameTeam,
866
+ teamOneCoaches: customGameTeam,
867
+ teamTwoCoaches: customGameTeam
868
+ }),
869
+ MaxPartySize: import_zod8.z.number(),
870
+ AutobalanceEnabled: import_zod8.z.boolean(),
871
+ AutobalanceMinPlayers: import_zod8.z.number(),
872
+ HasRecoveryData: import_zod8.z.boolean()
873
+ }),
874
+ MatchmakingData: import_zod8.z.object({
875
+ QueueID: import_zod8.z.string(),
876
+ PreferredGamePods: import_zod8.z.array(import_zod8.z.string()),
877
+ SkillDisparityRRPenalty: import_zod8.z.number(),
878
+ MaxPartySize: import_zod8.z.number()
879
+ }),
880
+ QueueEntryTime: import_zod8.z.string(),
881
+ EstimatedQueueTimeSeconds: import_zod8.z.number(),
882
+ ErrorNotification: import_zod8.z.object({
883
+ ErrorType: import_zod8.z.string()
884
+ }).optional(),
885
+ RestrictedSeconds: import_zod8.z.number(),
886
+ EligibleQueues: import_zod8.z.array(import_zod8.z.string()),
887
+ CheatData: import_zod8.z.object({
888
+ GamePodOverride: import_zod8.z.string(),
889
+ ForcePostGameProcessing: import_zod8.z.boolean()
890
+ }),
891
+ InviteCode: import_zod8.z.string()
892
+ });
893
+ var setCustomGameTeamEndpoint = {
894
+ name: "Set Custom Game Team",
895
+ 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.",
896
+ queryName: "Party_ChangeTeamInCustomGame",
897
+ category: "Party Endpoints",
898
+ type: "glz",
899
+ method: "POST",
900
+ suffix: "parties/v1/parties/{party id}/customgamemembership/{team}",
901
+ headers: /* @__PURE__ */ new Map([["Content-Type", "application/json"]]),
902
+ body: import_zod8.z.object({ playerToPutOnTeam: import_zod8.z.string().describe("PUUID of the player to move") }),
903
+ riotRequirements: player,
904
+ responses: { "200": customGameParty }
905
+ };
906
+ var customGamePartyEndpoint = {
907
+ name: "Custom Game Party",
908
+ 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.",
909
+ queryName: "Party_FetchParty",
910
+ category: "Party Endpoints",
911
+ type: "glz",
912
+ suffix: "parties/v1/parties/{party id}",
913
+ riotRequirements: player,
914
+ responses: { "200": customGameParty }
915
+ };
916
+ var partyResponse = customGameParty.extend({ CustomGameData: customGameParty.shape.CustomGameData.optional() });
917
+ var partyGenerateCodeEndpoint = withResponse(import_valorant_api_types5.endpoints.partyGenerateCodeEndpoint, customGameParty);
918
+ var partyDisableCodeEndpoint = withResponse(import_valorant_api_types5.endpoints.partyDisableCodeEndpoint, customGameParty);
919
+ var setPartyAccessibilityEndpoint = withResponse(import_valorant_api_types5.endpoints.setPartyAccessibilityEndpoint, customGameParty);
920
+ var startCustomGameEndpoint = withResponse(import_valorant_api_types5.endpoints.startCustomGameEndpoint, customGameParty);
921
+ var setCustomGameSettingsEndpoint = withResponse(import_valorant_api_types5.endpoints.setCustomGameSettingsEndpoint, customGameParty);
922
+ var partyEndpoint = withResponse(import_valorant_api_types5.endpoints.partyEndpoint, partyResponse);
923
+ var changeQueueEndpoint = withResponse(import_valorant_api_types5.endpoints.changeQueueEndpoint, partyResponse);
924
+ var enterMatchmakingQueueEndpoint = withResponse(import_valorant_api_types5.endpoints.enterMatchmakingQueueEndpoint, partyResponse);
925
+ var leaveMatchmakingQueueEndpoint = withResponse(import_valorant_api_types5.endpoints.leaveMatchmakingQueueEndpoint, partyResponse);
926
+ var partyDeclineEndpoint = withResponse(import_valorant_api_types5.endpoints.partyDeclineEndpoint, partyResponse);
927
+ var partyInviteEndpoint = withResponse(import_valorant_api_types5.endpoints.partyInviteEndpoint, partyResponse);
928
+ var partySetMemberReadyEndpoint = withResponse(import_valorant_api_types5.endpoints.partySetMemberReadyEndpoint, partyResponse);
929
+ var refreshCompetitiveTierEndpoint = withResponse(import_valorant_api_types5.endpoints.refreshCompetitiveTierEndpoint, partyResponse);
930
+ var refreshPlayerIdentityEndpoint = withResponse(import_valorant_api_types5.endpoints.refreshPlayerIdentityEndpoint, partyResponse);
931
+ var refreshPingsEndpoint = withResponse(import_valorant_api_types5.endpoints.refreshPingsEndpoint, partyResponse);
932
+
933
+ // src/endpoints/riot/pregame.ts
934
+ var import_valorant_api_types6 = require("valorant-api-types");
935
+ var import_zod9 = require("zod");
936
+ var pregameMatchEndpoint = withResponse(import_valorant_api_types6.endpoints.pregameMatchEndpoint, import_zod9.z.object({
937
+ ID: import_zod9.z.string(),
938
+ Version: import_zod9.z.number(),
939
+ Teams: import_zod9.z.array(import_zod9.z.object({
940
+ TeamID: import_zod9.z.string(),
941
+ TeamNumber: import_zod9.z.number(),
942
+ Players: import_zod9.z.array(import_zod9.z.object({
943
+ Subject: import_zod9.z.string(),
944
+ CharacterID: import_zod9.z.string(),
945
+ CharacterSelectionState: import_zod9.z.string(),
946
+ PregamePlayerState: import_zod9.z.string(),
947
+ CompetitiveTier: import_zod9.z.number(),
948
+ PlayerIdentity: import_zod9.z.object({
949
+ Subject: import_zod9.z.string(),
950
+ PlayerCardID: import_zod9.z.string(),
951
+ PlayerTitleID: import_zod9.z.string(),
952
+ AccountLevel: import_zod9.z.number(),
953
+ PreferredLevelBorderID: import_zod9.z.string(),
954
+ Incognito: import_zod9.z.boolean(),
955
+ HideAccountLevel: import_zod9.z.boolean()
956
+ }),
957
+ SeasonalBadgeInfo: import_zod9.z.object({
958
+ SeasonID: import_zod9.z.string(),
959
+ NumberOfWins: import_zod9.z.number(),
960
+ Rank: import_zod9.z.number(),
961
+ LeaderboardRank: import_zod9.z.number()
962
+ }),
963
+ IsCaptain: import_zod9.z.boolean(),
964
+ PlatformType: import_zod9.z.string(),
965
+ PremierPrestige: import_zod9.z.object({})
966
+ }))
967
+ })),
968
+ AllyTeam: import_zod9.z.object({
969
+ TeamID: import_zod9.z.string(),
970
+ TeamNumber: import_zod9.z.number(),
971
+ Players: import_zod9.z.array(import_zod9.z.object({
972
+ Subject: import_zod9.z.string(),
973
+ CharacterID: import_zod9.z.string(),
974
+ CharacterSelectionState: import_zod9.z.string(),
975
+ PregamePlayerState: import_zod9.z.string(),
976
+ CompetitiveTier: import_zod9.z.number(),
977
+ PlayerIdentity: import_zod9.z.object({
978
+ Subject: import_zod9.z.string(),
979
+ PlayerCardID: import_zod9.z.string(),
980
+ PlayerTitleID: import_zod9.z.string(),
981
+ AccountLevel: import_zod9.z.number(),
982
+ PreferredLevelBorderID: import_zod9.z.string(),
983
+ Incognito: import_zod9.z.boolean(),
984
+ HideAccountLevel: import_zod9.z.boolean()
985
+ }),
986
+ SeasonalBadgeInfo: import_zod9.z.object({
987
+ SeasonID: import_zod9.z.string(),
988
+ NumberOfWins: import_zod9.z.number(),
989
+ Rank: import_zod9.z.number(),
990
+ LeaderboardRank: import_zod9.z.number()
991
+ }),
992
+ IsCaptain: import_zod9.z.boolean(),
993
+ PlatformType: import_zod9.z.string(),
994
+ PremierPrestige: import_zod9.z.object({})
995
+ }))
996
+ }),
997
+ EnemyTeamSize: import_zod9.z.number(),
998
+ EnemyTeamLockCount: import_zod9.z.number(),
999
+ PregameState: import_zod9.z.string(),
1000
+ LastUpdated: import_zod9.z.string(),
1001
+ MapID: import_zod9.z.string(),
1002
+ CastedVotes: import_zod9.z.object({}),
1003
+ MapSelectStep: import_zod9.z.number(),
1004
+ Team1: import_zod9.z.string(),
1005
+ GamePodID: import_zod9.z.string(),
1006
+ Mode: import_zod9.z.string(),
1007
+ VoiceSessionID: import_zod9.z.string(),
1008
+ MUCName: import_zod9.z.string(),
1009
+ TeamMatchToken: import_zod9.z.string(),
1010
+ QueueID: import_zod9.z.string(),
1011
+ ProvisioningFlowID: import_zod9.z.string(),
1012
+ IsRanked: import_zod9.z.boolean(),
1013
+ PhaseTimeRemainingNS: import_zod9.z.number(),
1014
+ StepTimeRemainingNS: import_zod9.z.number(),
1015
+ altModesFlagADA: import_zod9.z.boolean(),
1016
+ /** Rules of the match by name. Only the rules the lobby set are present. */
1017
+ GameRules: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.string())
1018
+ }));
1019
+ var pregameLoadoutsEndpoint = withResponse(import_valorant_api_types6.endpoints.pregameLoadoutsEndpoint, import_zod9.z.object({
1020
+ Loadouts: import_zod9.z.array(import_zod9.z.object({
1021
+ Subject: import_zod9.z.string(),
1022
+ Expressions: import_zod9.z.object({
1023
+ AESSelections: import_zod9.z.array(import_zod9.z.object({
1024
+ AssetID: import_zod9.z.string(),
1025
+ TypeID: import_zod9.z.string()
1026
+ }))
1027
+ }),
1028
+ DynamicOptions: import_zod9.z.object({}),
1029
+ Items: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.object({
1030
+ ID: import_zod9.z.string(),
1031
+ TypeID: import_zod9.z.string(),
1032
+ Sockets: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.object({
1033
+ ID: import_zod9.z.string(),
1034
+ Item: import_zod9.z.object({
1035
+ ID: import_zod9.z.string(),
1036
+ TypeID: import_zod9.z.string()
1037
+ })
1038
+ }))
1039
+ }))
1040
+ })),
1041
+ LoadoutsValid: import_zod9.z.boolean()
1042
+ }));
1043
+
1044
+ // src/endpoints/riot/premier.ts
1045
+ var import_zod10 = require("zod");
1046
+ var premierSeasonsEndpoint = {
1047
+ name: "Premier Seasons",
1048
+ description: "All Premier seasons of the shard. The affinity in the path is the region of the context.",
1049
+ category: "Premier Endpoints",
1050
+ type: "pd",
1051
+ suffix: "premier/v1/affinities/{region}/premier-seasons",
1052
+ riotRequirements: player,
1053
+ responses: { "200": import_zod10.z.object({
1054
+ PremierSeasons: import_zod10.z.array(import_zod10.z.object({
1055
+ ID: import_zod10.z.string(),
1056
+ Name: import_zod10.z.string(),
1057
+ PreviousPremierSeasonID: import_zod10.z.string(),
1058
+ NextPremierSeasonID: import_zod10.z.string(),
1059
+ IsActive: import_zod10.z.boolean(),
1060
+ StartTime: import_zod10.z.string(),
1061
+ EndTime: import_zod10.z.string(),
1062
+ Events: import_zod10.z.array(import_zod10.z.object({
1063
+ ID: import_zod10.z.string(),
1064
+ Type: import_zod10.z.string(),
1065
+ StartDateTime: import_zod10.z.string(),
1066
+ EndDateTime: import_zod10.z.string(),
1067
+ MapSelectionStrategy: import_zod10.z.string(),
1068
+ MapPoolMapIDs: import_zod10.z.array(import_zod10.z.string()),
1069
+ PointsRequiredToParticipate: import_zod10.z.number()
1070
+ })),
1071
+ ScheduledEvents: import_zod10.z.array(import_zod10.z.object({
1072
+ EventID: import_zod10.z.string(),
1073
+ EventType: import_zod10.z.string(),
1074
+ Conference: import_zod10.z.string(),
1075
+ DivisionGroup: import_zod10.z.string(),
1076
+ EventPresetName: import_zod10.z.string(),
1077
+ StartDateTime: import_zod10.z.string(),
1078
+ EndDateTime: import_zod10.z.string(),
1079
+ TournamentRoundTimes: import_zod10.z.array(import_zod10.z.object({
1080
+ StartDateTime: import_zod10.z.string(),
1081
+ EndDateTime: import_zod10.z.string()
1082
+ }))
1083
+ })),
1084
+ Conferences: import_zod10.z.array(import_zod10.z.object({
1085
+ id: import_zod10.z.string(),
1086
+ key: import_zod10.z.string(),
1087
+ isSuper: import_zod10.z.boolean(),
1088
+ gamePods: import_zod10.z.array(import_zod10.z.string()),
1089
+ timezone: import_zod10.z.string(),
1090
+ superConference: import_zod10.z.string().optional(),
1091
+ leaderboardPlayoffQualificationDateTime: import_zod10.z.string(),
1092
+ leaderboardPromotionFinalizationDateTime: import_zod10.z.string()
1093
+ })),
1094
+ Divisions: import_zod10.z.array(import_zod10.z.object({
1095
+ Division: import_zod10.z.number(),
1096
+ DivisionName: import_zod10.z.string(),
1097
+ DivisionGroup: import_zod10.z.string(),
1098
+ EventPresetName: import_zod10.z.string()
1099
+ })),
1100
+ DivisionThresholds: import_zod10.z.array(import_zod10.z.object({
1101
+ playoffThresholdType: import_zod10.z.string(),
1102
+ playoffThresholdValue: import_zod10.z.number(),
1103
+ promotionThresholdType: import_zod10.z.string(),
1104
+ promotionThresholdValue: import_zod10.z.number(),
1105
+ shouldPromoteToSuperConference: import_zod10.z.boolean(),
1106
+ skipReseedCriteria: import_zod10.z.string(),
1107
+ conference: import_zod10.z.string().optional(),
1108
+ division: import_zod10.z.number().optional(),
1109
+ promotionConference: import_zod10.z.string().optional(),
1110
+ skipReseedCriteriaValue: import_zod10.z.number().optional()
1111
+ })),
1112
+ EventPresets: import_zod10.z.object({
1113
+ PRO: import_zod10.z.object({
1114
+ EventPresetsByEventType: import_zod10.z.object({
1115
+ LEAGUE: import_zod10.z.object({
1116
+ EventPresetName: import_zod10.z.string(),
1117
+ eventType: import_zod10.z.string(),
1118
+ bestOfN: import_zod10.z.number(),
1119
+ matchmakingStrategy: import_zod10.z.string(),
1120
+ queueID: import_zod10.z.string(),
1121
+ pointsConfig: import_zod10.z.object({
1122
+ PointsForWin: import_zod10.z.number(),
1123
+ PointsForLoss: import_zod10.z.number()
1124
+ })
1125
+ }),
1126
+ SCRIM: import_zod10.z.object({
1127
+ EventPresetName: import_zod10.z.string(),
1128
+ eventType: import_zod10.z.string(),
1129
+ bestOfN: import_zod10.z.number(),
1130
+ matchmakingStrategy: import_zod10.z.string(),
1131
+ queueID: import_zod10.z.string(),
1132
+ pointsConfig: import_zod10.z.object({
1133
+ PointsForWin: import_zod10.z.number(),
1134
+ PointsForLoss: import_zod10.z.number()
1135
+ })
1136
+ }),
1137
+ TOURNAMENT: import_zod10.z.object({
1138
+ EventPresetName: import_zod10.z.string(),
1139
+ eventType: import_zod10.z.string(),
1140
+ bestOfN: import_zod10.z.number(),
1141
+ matchmakingStrategy: import_zod10.z.string(),
1142
+ queueID: import_zod10.z.string(),
1143
+ pointsConfig: import_zod10.z.object({
1144
+ PointsForWin: import_zod10.z.number(),
1145
+ PointsForLoss: import_zod10.z.number()
1146
+ })
1147
+ })
1148
+ })
1149
+ }),
1150
+ REGULAR: import_zod10.z.object({
1151
+ EventPresetsByEventType: import_zod10.z.object({
1152
+ LEAGUE: import_zod10.z.object({
1153
+ EventPresetName: import_zod10.z.string(),
1154
+ eventType: import_zod10.z.string(),
1155
+ bestOfN: import_zod10.z.number(),
1156
+ matchmakingStrategy: import_zod10.z.string(),
1157
+ queueID: import_zod10.z.string(),
1158
+ pointsConfig: import_zod10.z.object({
1159
+ PointsForWin: import_zod10.z.number(),
1160
+ PointsForLoss: import_zod10.z.number()
1161
+ })
1162
+ }),
1163
+ SCRIM: import_zod10.z.object({
1164
+ EventPresetName: import_zod10.z.string(),
1165
+ eventType: import_zod10.z.string(),
1166
+ bestOfN: import_zod10.z.number(),
1167
+ matchmakingStrategy: import_zod10.z.string(),
1168
+ queueID: import_zod10.z.string(),
1169
+ pointsConfig: import_zod10.z.object({
1170
+ PointsForWin: import_zod10.z.number(),
1171
+ PointsForLoss: import_zod10.z.number()
1172
+ })
1173
+ }),
1174
+ TOURNAMENT: import_zod10.z.object({
1175
+ EventPresetName: import_zod10.z.string(),
1176
+ eventType: import_zod10.z.string(),
1177
+ bestOfN: import_zod10.z.number(),
1178
+ matchmakingStrategy: import_zod10.z.string(),
1179
+ queueID: import_zod10.z.string(),
1180
+ pointsConfig: import_zod10.z.object({
1181
+ PointsForWin: import_zod10.z.number(),
1182
+ PointsForLoss: import_zod10.z.number()
1183
+ })
1184
+ })
1185
+ })
1186
+ })
1187
+ }),
1188
+ FlawlessPointRequirement: import_zod10.z.number(),
1189
+ ChampionshipPointRequirement: import_zod10.z.number(),
1190
+ ChampionshipEventID: import_zod10.z.string(),
1191
+ EnrollmentPhaseStartDateTime: import_zod10.z.string(),
1192
+ EnrollmentPhaseEndDateTime: import_zod10.z.string(),
1193
+ LeaderboardPlayoffQualificationDateTime: import_zod10.z.string(),
1194
+ LeaderboardPromotionFinalizationDateTime: import_zod10.z.string(),
1195
+ LeaderboardFinalizationDateTime: import_zod10.z.string(),
1196
+ ContenderEligibilityExpiryDateTime: import_zod10.z.string(),
1197
+ StageLockTime: import_zod10.z.string(),
1198
+ ParticipationRewardsActIDs: import_zod10.z.array(import_zod10.z.string()),
1199
+ ParticipationRewards: import_zod10.z.object({
1200
+ EntitlementRewards: import_zod10.z.array(import_zod10.z.object({
1201
+ ItemTypeID: import_zod10.z.string(),
1202
+ ItemID: import_zod10.z.string(),
1203
+ Amount: import_zod10.z.number()
1204
+ }))
1205
+ }),
1206
+ TournamentWinnerRewards: import_zod10.z.object({}),
1207
+ DivisionWinnerRewards: import_zod10.z.object({
1208
+ ADVANCED: import_zod10.z.object({
1209
+ EntitlementRewards: import_zod10.z.array(import_zod10.z.object({
1210
+ ItemTypeID: import_zod10.z.string(),
1211
+ ItemID: import_zod10.z.string(),
1212
+ Amount: import_zod10.z.number()
1213
+ }))
1214
+ }).optional(),
1215
+ CONTENDER: import_zod10.z.object({
1216
+ EntitlementRewards: import_zod10.z.array(import_zod10.z.object({
1217
+ ItemTypeID: import_zod10.z.string(),
1218
+ ItemID: import_zod10.z.string(),
1219
+ Amount: import_zod10.z.number()
1220
+ }))
1221
+ }).optional(),
1222
+ ELITE: import_zod10.z.object({
1223
+ EntitlementRewards: import_zod10.z.array(import_zod10.z.object({
1224
+ ItemTypeID: import_zod10.z.string(),
1225
+ ItemID: import_zod10.z.string(),
1226
+ Amount: import_zod10.z.number()
1227
+ }))
1228
+ }).optional(),
1229
+ INTERMEDIATE: import_zod10.z.object({
1230
+ EntitlementRewards: import_zod10.z.array(import_zod10.z.object({
1231
+ ItemTypeID: import_zod10.z.string(),
1232
+ ItemID: import_zod10.z.string(),
1233
+ Amount: import_zod10.z.number()
1234
+ }))
1235
+ }).optional(),
1236
+ OPEN: import_zod10.z.object({
1237
+ EntitlementRewards: import_zod10.z.array(import_zod10.z.object({
1238
+ ItemTypeID: import_zod10.z.string(),
1239
+ ItemID: import_zod10.z.string(),
1240
+ Amount: import_zod10.z.number()
1241
+ }))
1242
+ }).optional(),
1243
+ INVITE: import_zod10.z.object({
1244
+ EntitlementRewards: import_zod10.z.array(import_zod10.z.object({
1245
+ ItemTypeID: import_zod10.z.string(),
1246
+ ItemID: import_zod10.z.string(),
1247
+ Amount: import_zod10.z.number()
1248
+ }))
1249
+ }).optional()
1250
+ }),
1251
+ RosterRecentActivityNumSeasons: import_zod10.z.number()
1252
+ }))
1253
+ }) }
1254
+ };
1255
+ var premierActiveSeasonEndpoint = {
1256
+ name: "Premier Active Season",
1257
+ description: "The Premier season that is running now.",
1258
+ category: "Premier Endpoints",
1259
+ type: "pd",
1260
+ suffix: "premier/v1/affinities/{region}/premier-seasons/active",
1261
+ riotRequirements: player,
1262
+ responses: { "200": import_zod10.z.object({
1263
+ ID: import_zod10.z.string(),
1264
+ Name: import_zod10.z.string(),
1265
+ PreviousPremierSeasonID: import_zod10.z.string(),
1266
+ NextPremierSeasonID: import_zod10.z.string(),
1267
+ IsActive: import_zod10.z.boolean(),
1268
+ StartTime: import_zod10.z.string(),
1269
+ EndTime: import_zod10.z.string(),
1270
+ Events: import_zod10.z.array(import_zod10.z.object({
1271
+ ID: import_zod10.z.string(),
1272
+ Type: import_zod10.z.string(),
1273
+ StartDateTime: import_zod10.z.string(),
1274
+ EndDateTime: import_zod10.z.string(),
1275
+ MapSelectionStrategy: import_zod10.z.string(),
1276
+ MapPoolMapIDs: import_zod10.z.array(import_zod10.z.string()),
1277
+ PointsRequiredToParticipate: import_zod10.z.number()
1278
+ })),
1279
+ ScheduledEvents: import_zod10.z.array(import_zod10.z.object({
1280
+ EventID: import_zod10.z.string(),
1281
+ EventType: import_zod10.z.string(),
1282
+ Conference: import_zod10.z.string(),
1283
+ DivisionGroup: import_zod10.z.string(),
1284
+ EventPresetName: import_zod10.z.string(),
1285
+ StartDateTime: import_zod10.z.string(),
1286
+ EndDateTime: import_zod10.z.string(),
1287
+ TournamentRoundTimes: import_zod10.z.array(import_zod10.z.object({
1288
+ StartDateTime: import_zod10.z.string(),
1289
+ EndDateTime: import_zod10.z.string()
1290
+ }))
1291
+ })),
1292
+ Conferences: import_zod10.z.array(import_zod10.z.object({
1293
+ id: import_zod10.z.string(),
1294
+ key: import_zod10.z.string(),
1295
+ isSuper: import_zod10.z.boolean(),
1296
+ gamePods: import_zod10.z.array(import_zod10.z.string()),
1297
+ timezone: import_zod10.z.string(),
1298
+ superConference: import_zod10.z.string().optional(),
1299
+ leaderboardPlayoffQualificationDateTime: import_zod10.z.string(),
1300
+ leaderboardPromotionFinalizationDateTime: import_zod10.z.string()
1301
+ })),
1302
+ Divisions: import_zod10.z.array(import_zod10.z.object({
1303
+ Division: import_zod10.z.number(),
1304
+ DivisionName: import_zod10.z.string(),
1305
+ DivisionGroup: import_zod10.z.string(),
1306
+ EventPresetName: import_zod10.z.string()
1307
+ })),
1308
+ DivisionThresholds: import_zod10.z.array(import_zod10.z.object({
1309
+ playoffThresholdType: import_zod10.z.string(),
1310
+ playoffThresholdValue: import_zod10.z.number(),
1311
+ promotionThresholdType: import_zod10.z.string(),
1312
+ promotionThresholdValue: import_zod10.z.number(),
1313
+ shouldPromoteToSuperConference: import_zod10.z.boolean(),
1314
+ skipReseedCriteria: import_zod10.z.string(),
1315
+ conference: import_zod10.z.string().optional(),
1316
+ division: import_zod10.z.number().optional(),
1317
+ promotionConference: import_zod10.z.string().optional(),
1318
+ skipReseedCriteriaValue: import_zod10.z.number().optional()
1319
+ })),
1320
+ EventPresets: import_zod10.z.object({
1321
+ PRO: import_zod10.z.object({
1322
+ EventPresetsByEventType: import_zod10.z.object({
1323
+ LEAGUE: import_zod10.z.object({
1324
+ EventPresetName: import_zod10.z.string(),
1325
+ eventType: import_zod10.z.string(),
1326
+ bestOfN: import_zod10.z.number(),
1327
+ matchmakingStrategy: import_zod10.z.string(),
1328
+ queueID: import_zod10.z.string(),
1329
+ pointsConfig: import_zod10.z.object({
1330
+ PointsForWin: import_zod10.z.number(),
1331
+ PointsForLoss: import_zod10.z.number()
1332
+ })
1333
+ }),
1334
+ SCRIM: import_zod10.z.object({
1335
+ EventPresetName: import_zod10.z.string(),
1336
+ eventType: import_zod10.z.string(),
1337
+ bestOfN: import_zod10.z.number(),
1338
+ matchmakingStrategy: import_zod10.z.string(),
1339
+ queueID: import_zod10.z.string(),
1340
+ pointsConfig: import_zod10.z.object({
1341
+ PointsForWin: import_zod10.z.number(),
1342
+ PointsForLoss: import_zod10.z.number()
1343
+ })
1344
+ }),
1345
+ TOURNAMENT: import_zod10.z.object({
1346
+ EventPresetName: import_zod10.z.string(),
1347
+ eventType: import_zod10.z.string(),
1348
+ bestOfN: import_zod10.z.number(),
1349
+ matchmakingStrategy: import_zod10.z.string(),
1350
+ queueID: import_zod10.z.string(),
1351
+ pointsConfig: import_zod10.z.object({
1352
+ PointsForWin: import_zod10.z.number(),
1353
+ PointsForLoss: import_zod10.z.number()
1354
+ })
1355
+ })
1356
+ })
1357
+ }),
1358
+ REGULAR: import_zod10.z.object({
1359
+ EventPresetsByEventType: import_zod10.z.object({
1360
+ LEAGUE: import_zod10.z.object({
1361
+ EventPresetName: import_zod10.z.string(),
1362
+ eventType: import_zod10.z.string(),
1363
+ bestOfN: import_zod10.z.number(),
1364
+ matchmakingStrategy: import_zod10.z.string(),
1365
+ queueID: import_zod10.z.string(),
1366
+ pointsConfig: import_zod10.z.object({
1367
+ PointsForWin: import_zod10.z.number(),
1368
+ PointsForLoss: import_zod10.z.number()
1369
+ })
1370
+ }),
1371
+ SCRIM: import_zod10.z.object({
1372
+ EventPresetName: import_zod10.z.string(),
1373
+ eventType: import_zod10.z.string(),
1374
+ bestOfN: import_zod10.z.number(),
1375
+ matchmakingStrategy: import_zod10.z.string(),
1376
+ queueID: import_zod10.z.string(),
1377
+ pointsConfig: import_zod10.z.object({
1378
+ PointsForWin: import_zod10.z.number(),
1379
+ PointsForLoss: import_zod10.z.number()
1380
+ })
1381
+ }),
1382
+ TOURNAMENT: import_zod10.z.object({
1383
+ EventPresetName: import_zod10.z.string(),
1384
+ eventType: import_zod10.z.string(),
1385
+ bestOfN: import_zod10.z.number(),
1386
+ matchmakingStrategy: import_zod10.z.string(),
1387
+ queueID: import_zod10.z.string(),
1388
+ pointsConfig: import_zod10.z.object({
1389
+ PointsForWin: import_zod10.z.number(),
1390
+ PointsForLoss: import_zod10.z.number()
1391
+ })
1392
+ })
1393
+ })
1394
+ })
1395
+ }),
1396
+ FlawlessPointRequirement: import_zod10.z.number(),
1397
+ ChampionshipPointRequirement: import_zod10.z.number(),
1398
+ ChampionshipEventID: import_zod10.z.string(),
1399
+ EnrollmentPhaseStartDateTime: import_zod10.z.string(),
1400
+ EnrollmentPhaseEndDateTime: import_zod10.z.string(),
1401
+ LeaderboardPlayoffQualificationDateTime: import_zod10.z.string(),
1402
+ LeaderboardPromotionFinalizationDateTime: import_zod10.z.string(),
1403
+ LeaderboardFinalizationDateTime: import_zod10.z.string(),
1404
+ ContenderEligibilityExpiryDateTime: import_zod10.z.string(),
1405
+ StageLockTime: import_zod10.z.string(),
1406
+ ParticipationRewards: import_zod10.z.object({}),
1407
+ TournamentWinnerRewards: import_zod10.z.object({}),
1408
+ DivisionWinnerRewards: import_zod10.z.object({}),
1409
+ RosterRecentActivityNumSeasons: import_zod10.z.number()
1410
+ }) }
1411
+ };
1412
+ var premierConferencesEndpoint = {
1413
+ name: "Premier Conferences",
1414
+ description: "Premier conferences of the region.",
1415
+ category: "Premier Endpoints",
1416
+ type: "pd",
1417
+ suffix: "premier/v1/affinities/{region}/conferences",
1418
+ riotRequirements: player,
1419
+ responses: { "200": import_zod10.z.object({
1420
+ PremierConferences: import_zod10.z.array(import_zod10.z.object({
1421
+ id: import_zod10.z.string(),
1422
+ key: import_zod10.z.string(),
1423
+ isSuper: import_zod10.z.boolean(),
1424
+ gamePods: import_zod10.z.array(import_zod10.z.string()),
1425
+ timezone: import_zod10.z.string(),
1426
+ superConference: import_zod10.z.string().optional(),
1427
+ leaderboardPlayoffQualificationDateTime: import_zod10.z.string(),
1428
+ leaderboardPromotionFinalizationDateTime: import_zod10.z.string()
1429
+ }))
1430
+ }) }
1431
+ };
1432
+ var premierMatchLimitEndpoint = {
1433
+ name: "Premier Match Limit",
1434
+ description: "How many Premier matches can still be played and when the limit resets.",
1435
+ category: "Premier Endpoints",
1436
+ type: "pd",
1437
+ suffix: "premier/v1/matchlimitinfo",
1438
+ riotRequirements: player,
1439
+ responses: { "200": import_zod10.z.object({
1440
+ leagueMatchLimit: import_zod10.z.number(),
1441
+ tournamentLimit: import_zod10.z.number(),
1442
+ timeUntilNextResetSeconds: import_zod10.z.number()
1443
+ }) }
1444
+ };
1445
+ var premierEligibilityEndpoint = {
1446
+ name: "Premier Eligibility",
1447
+ description: "Whether the player can join a Premier roster.",
1448
+ category: "Premier Endpoints",
1449
+ type: "pd",
1450
+ suffix: "premier/v1/player/eligibility",
1451
+ riotRequirements: player,
1452
+ responses: { "200": import_zod10.z.object({
1453
+ subject: import_zod10.z.string(),
1454
+ accountVerificationStatus: import_zod10.z.boolean(),
1455
+ rankedPlacementCompletionStatus: import_zod10.z.boolean(),
1456
+ matchLimitReached: import_zod10.z.boolean(),
1457
+ isOnProvidedRoster: import_zod10.z.boolean()
1458
+ }) }
1459
+ };
1460
+ var premierPlayerV2Endpoint = {
1461
+ name: "Premier Player V2",
1462
+ description: "Premier membership of a player: roster id and pending invites.",
1463
+ category: "Premier Endpoints",
1464
+ type: "pd",
1465
+ suffix: "premier/v2/players/{puuid}",
1466
+ riotRequirements: player,
1467
+ responses: { "200": import_zod10.z.object({
1468
+ puuid: import_zod10.z.string(),
1469
+ rosterId: import_zod10.z.string(),
1470
+ version: import_zod10.z.number(),
1471
+ createdAt: import_zod10.z.number(),
1472
+ updatedAt: import_zod10.z.number()
1473
+ }) }
1474
+ };
1475
+ var premierPlayerV3Endpoint = {
1476
+ name: "Premier Player V3",
1477
+ description: "Like v2, with prestige and contender eligibility.",
1478
+ category: "Premier Endpoints",
1479
+ type: "pd",
1480
+ suffix: "premier/v3/players/{puuid}",
1481
+ riotRequirements: player,
1482
+ responses: { "200": import_zod10.z.object({
1483
+ puuid: import_zod10.z.string(),
1484
+ rosterId: import_zod10.z.string(),
1485
+ prestige: import_zod10.z.object({
1486
+ earnedPrestige: import_zod10.z.boolean(),
1487
+ earnedAura: import_zod10.z.boolean(),
1488
+ showTag: import_zod10.z.boolean(),
1489
+ showPlating: import_zod10.z.boolean(),
1490
+ showAura: import_zod10.z.boolean()
1491
+ }),
1492
+ contenderEligibilityExpiry: import_zod10.z.string(),
1493
+ socialVersion: import_zod10.z.number(),
1494
+ premierVersion: import_zod10.z.number(),
1495
+ updatedAt: import_zod10.z.number(),
1496
+ seasons: import_zod10.z.object({
1497
+ "08d281c5-4426-3aaa-3316-ebaf5f2c858a": import_zod10.z.object({
1498
+ seasonId: import_zod10.z.string(),
1499
+ hasEarnedPrestigeAura: import_zod10.z.boolean(),
1500
+ hasEarnedParticipation: import_zod10.z.boolean(),
1501
+ hasEarnedDivisionWinner: import_zod10.z.boolean()
1502
+ }),
1503
+ "91be4c20-439d-8e24-f577-4ca8a98e8dc8": import_zod10.z.object({
1504
+ seasonId: import_zod10.z.string(),
1505
+ hasEarnedPrestigeAura: import_zod10.z.boolean(),
1506
+ hasEarnedParticipation: import_zod10.z.boolean(),
1507
+ hasEarnedDivisionWinner: import_zod10.z.boolean()
1508
+ })
1509
+ })
1510
+ }) }
1511
+ };
1512
+
1513
+ // src/endpoints/riot/presence.ts
1514
+ var import_valorant_api_types7 = require("valorant-api-types");
1515
+ var import_zod11 = require("zod");
1516
+
1517
+ // src/internal/base64.ts
1518
+ function toBase64(text2) {
1519
+ return Buffer.from(text2, "utf8").toString("base64");
1520
+ }
1521
+ function fromBase64(encoded) {
1522
+ return Buffer.from(encoded, "base64").toString("utf8");
1523
+ }
1524
+ function basicAuth(user, password) {
1525
+ return `Basic ${toBase64(`${user}:${password}`)}`;
1526
+ }
1527
+
1528
+ // src/endpoints/riot/presence.ts
1529
+ var valorantPresence = import_zod11.z.object({
1530
+ isIdle: import_zod11.z.boolean(),
1531
+ isValid: import_zod11.z.boolean(),
1532
+ matchPresenceData: import_zod11.z.object({
1533
+ gameScoreType: import_zod11.z.string(),
1534
+ matchMap: import_zod11.z.string(),
1535
+ provisioningFlow: import_zod11.z.string(),
1536
+ queueId: import_zod11.z.string(),
1537
+ sessionLoopState: import_zod11.z.string()
1538
+ }),
1539
+ maxPartySize: import_zod11.z.number(),
1540
+ partyId: import_zod11.z.string(),
1541
+ partyOwnerMatchScoreAllyTeam: import_zod11.z.number(),
1542
+ partyOwnerMatchScoreEnemyTeam: import_zod11.z.number(),
1543
+ partyPresenceData: import_zod11.z.object({
1544
+ customGameName: import_zod11.z.string(),
1545
+ customGameTeam: import_zod11.z.string(),
1546
+ isPartyCrossPlayEnabled: import_zod11.z.boolean(),
1547
+ isPartyOwner: import_zod11.z.boolean(),
1548
+ isPlayerCrossPlayEnabled: import_zod11.z.boolean(),
1549
+ maxPartySize: import_zod11.z.number(),
1550
+ partyAccessibility: import_zod11.z.string(),
1551
+ partyClientVersion: import_zod11.z.string(),
1552
+ partyId: import_zod11.z.string(),
1553
+ partyLFM: import_zod11.z.boolean(),
1554
+ partyOwnerMatchMap: import_zod11.z.string(),
1555
+ partyOwnerMatchScoreAllyTeam: import_zod11.z.number(),
1556
+ partyOwnerMatchScoreEnemyTeam: import_zod11.z.number(),
1557
+ partyOwnerProvisioningFlow: import_zod11.z.string(),
1558
+ partyOwnerSessionLoopState: import_zod11.z.string(),
1559
+ partyPrecisePlatformTypes: import_zod11.z.number(),
1560
+ partySize: import_zod11.z.number(),
1561
+ partyState: import_zod11.z.string(),
1562
+ partyVersion: import_zod11.z.number(),
1563
+ queueEntryTime: import_zod11.z.string(),
1564
+ rosterId: import_zod11.z.string(),
1565
+ tournamentId: import_zod11.z.string()
1566
+ }),
1567
+ partySize: import_zod11.z.number(),
1568
+ playerPresenceData: import_zod11.z.object({
1569
+ accountLevel: import_zod11.z.number(),
1570
+ competitiveTier: import_zod11.z.number(),
1571
+ leaderboardPosition: import_zod11.z.number(),
1572
+ platformOverride: import_zod11.z.string(),
1573
+ playerCardId: import_zod11.z.string(),
1574
+ playerTitleId: import_zod11.z.string(),
1575
+ tempValueAA: import_zod11.z.number()
1576
+ }),
1577
+ premierPresenceData: import_zod11.z.object({
1578
+ division: import_zod11.z.number(),
1579
+ plating: import_zod11.z.number(),
1580
+ rosterId: import_zod11.z.string(),
1581
+ rosterName: import_zod11.z.string(),
1582
+ rosterTag: import_zod11.z.string(),
1583
+ rosterType: import_zod11.z.string(),
1584
+ score: import_zod11.z.number(),
1585
+ showAura: import_zod11.z.boolean(),
1586
+ showPlating: import_zod11.z.boolean(),
1587
+ showTag: import_zod11.z.boolean()
1588
+ }),
1589
+ provisioningFlow: import_zod11.z.string(),
1590
+ queueId: import_zod11.z.string()
1591
+ });
1592
+ function decodePresence(raw) {
1593
+ if (!raw) return null;
1594
+ try {
1595
+ return valorantPresence.parse(JSON.parse(fromBase64(raw)));
1596
+ } catch {
1597
+ return null;
1598
+ }
1599
+ }
1600
+ var presenceEndpoint = withResponse(import_valorant_api_types7.endpoints.presenceEndpoint, import_zod11.z.object({
1601
+ presences: import_zod11.z.array(import_zod11.z.object({
1602
+ activePlatform: import_zod11.z.string().nullable(),
1603
+ basic: import_zod11.z.string(),
1604
+ game_name: import_zod11.z.string(),
1605
+ game_tag: import_zod11.z.string(),
1606
+ msg: import_zod11.z.string().nullable(),
1607
+ name: import_zod11.z.string(),
1608
+ packedData: import_zod11.z.string().nullable(),
1609
+ patchline: import_zod11.z.string().nullable(),
1610
+ pid: import_zod11.z.string(),
1611
+ platform: import_zod11.z.string().nullable(),
1612
+ product: import_zod11.z.string(),
1613
+ puuid: import_zod11.z.string(),
1614
+ region: import_zod11.z.string(),
1615
+ resource: import_zod11.z.string(),
1616
+ state: import_zod11.z.string(),
1617
+ summary: import_zod11.z.string(),
1618
+ time: import_zod11.z.number(),
1619
+ private: import_zod11.z.string().nullable().transform(decodePresence)
1620
+ }))
1621
+ }));
1622
+
1623
+ // src/endpoints/riot/pvp.ts
1624
+ var import_valorant_api_types8 = require("valorant-api-types");
1625
+ var import_zod12 = require("zod");
1626
+ var playerLoadoutV3Endpoint = {
1627
+ name: "Player Loadout V3",
1628
+ description: "Current loadout. The v2 route used by `pvp.playerLoadout` answers 404 on current clients.",
1629
+ category: "PVP Endpoints",
1630
+ type: "pd",
1631
+ suffix: "personalization/v3/players/{puuid}/playerloadout",
1632
+ riotRequirements: player,
1633
+ responses: { "200": import_zod12.z.object({
1634
+ Subject: import_zod12.z.string(),
1635
+ Version: import_zod12.z.number(),
1636
+ Guns: import_zod12.z.array(import_zod12.z.object({
1637
+ ID: import_zod12.z.string(),
1638
+ SkinID: import_zod12.z.string(),
1639
+ SkinLevelID: import_zod12.z.string(),
1640
+ ChromaID: import_zod12.z.string(),
1641
+ CharmInstanceID: import_zod12.z.string().optional(),
1642
+ CharmID: import_zod12.z.string().optional(),
1643
+ CharmLevelID: import_zod12.z.string().optional()
1644
+ })),
1645
+ ActiveExpressions: import_zod12.z.array(import_zod12.z.object({
1646
+ TypeID: import_zod12.z.string(),
1647
+ AssetID: import_zod12.z.string()
1648
+ })),
1649
+ DynamicOptions: import_zod12.z.object({}),
1650
+ Identity: import_zod12.z.object({
1651
+ PlayerCardID: import_zod12.z.string(),
1652
+ PlayerTitleID: import_zod12.z.string(),
1653
+ AccountLevel: import_zod12.z.number(),
1654
+ PreferredLevelBorderID: import_zod12.z.string(),
1655
+ HideAccountLevel: import_zod12.z.boolean()
1656
+ }),
1657
+ Incognito: import_zod12.z.boolean()
1658
+ }) }
1659
+ };
1660
+ var configEndpoint = withResponse(
1661
+ { ...onSharedHost(import_valorant_api_types8.endpoints.configEndpoint), riotRequirements: player },
1662
+ import_zod12.z.object({
1663
+ LastApplication: import_zod12.z.string().datetime({ offset: true }).transform((value) => new Date(value)),
1664
+ /** Game settings by name. Every value is a string, and the set of names changes with each patch. */
1665
+ Collapsed: import_zod12.z.record(import_zod12.z.string(), import_zod12.z.string())
1666
+ })
1667
+ );
1668
+
1669
+ // src/endpoints/riot/restrictions.ts
1670
+ var import_zod13 = require("zod");
1671
+ var avoidListEndpoint = {
1672
+ name: "Avoid List",
1673
+ description: "Players the account avoids in matchmaking.",
1674
+ category: "Restriction Endpoints",
1675
+ type: "pd",
1676
+ suffix: "restrictions/v1/avoidList",
1677
+ riotRequirements: player,
1678
+ responses: { "200": import_zod13.z.object({
1679
+ Subject: import_zod13.z.string()
1680
+ }) }
1681
+ };
1682
+ var activeFutureInterventionsEndpoint = {
1683
+ name: "Active Future Interventions",
1684
+ description: "Upcoming or active restrictions of the account, by category.",
1685
+ category: "Restriction Endpoints",
1686
+ type: "pd",
1687
+ suffix: "restrictions/v1/activeFutureInterventions",
1688
+ riotRequirements: player,
1689
+ responses: { "200": import_zod13.z.object({
1690
+ Subject: import_zod13.z.string()
1691
+ }) }
1692
+ };
1693
+
1694
+ // src/endpoints/riot/store.ts
1695
+ var import_valorant_api_types9 = require("valorant-api-types");
1696
+ var import_zod14 = require("zod");
1697
+ var agentStoreEndpoint = {
1698
+ name: "Agent Store",
1699
+ description: "Agents offered in the store.",
1700
+ category: "Store Endpoints",
1701
+ type: "pd",
1702
+ suffix: "store/v1/storefronts/agent",
1703
+ riotRequirements: player,
1704
+ responses: { "200": import_zod14.z.object({
1705
+ AgentStore: import_zod14.z.object({
1706
+ AgentStoreOffers: import_zod14.z.array(import_zod14.z.object({
1707
+ AgentID: import_zod14.z.string(),
1708
+ StoreOffers: import_zod14.z.array(import_zod14.z.object({
1709
+ OfferID: import_zod14.z.string(),
1710
+ IsDirectPurchase: import_zod14.z.boolean(),
1711
+ StartDate: import_zod14.z.string(),
1712
+ Cost: import_zod14.z.record(import_zod14.z.string(), import_zod14.z.number()),
1713
+ Rewards: import_zod14.z.array(import_zod14.z.object({
1714
+ ItemTypeID: import_zod14.z.string(),
1715
+ ItemID: import_zod14.z.string(),
1716
+ Quantity: import_zod14.z.number()
1717
+ }))
1718
+ }))
1719
+ })),
1720
+ CurrentFeaturedAgent: import_zod14.z.string(),
1721
+ NextFeaturedAgent: import_zod14.z.string()
1722
+ })
1723
+ }) }
1724
+ };
1725
+ var allEntitlementsEndpoint = {
1726
+ name: "All Entitlements",
1727
+ description: "Everything the player owns, grouped by item type. This is the call without an item type, which is the shape `store.ownedItems` describes.",
1728
+ category: "Store Endpoints",
1729
+ type: "pd",
1730
+ suffix: "store/v1/entitlements/{puuid}",
1731
+ riotRequirements: player,
1732
+ responses: { "200": import_zod14.z.object({
1733
+ EntitlementsByTypes: import_zod14.z.array(import_zod14.z.object({
1734
+ ItemTypeID: import_zod14.z.string(),
1735
+ Entitlements: import_zod14.z.array(import_zod14.z.object({
1736
+ TypeID: import_zod14.z.string(),
1737
+ ItemID: import_zod14.z.string(),
1738
+ InstanceID: import_zod14.z.string().optional()
1739
+ }))
1740
+ }))
1741
+ }) }
1742
+ };
1743
+ var ownedItemsEndpoint = withResponse(import_valorant_api_types9.endpoints.ownedItemsEndpoint, import_zod14.z.object({
1744
+ ItemTypeID: import_zod14.z.string(),
1745
+ Entitlements: import_zod14.z.array(import_zod14.z.object({
1746
+ TypeID: import_zod14.z.string(),
1747
+ ItemID: import_zod14.z.string()
1748
+ }))
1749
+ }));
1750
+
1751
+ // src/endpoints/riot/storefront.ts
1752
+ var import_zod15 = require("zod");
1753
+ var storefrontV3Endpoint = {
1754
+ name: "Storefront V3",
1755
+ 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.",
1756
+ category: "Store Endpoints",
1757
+ type: "pd",
1758
+ method: "POST",
1759
+ suffix: "store/v3/storefront/{puuid}",
1760
+ headers: /* @__PURE__ */ new Map([["Content-Type", "application/json"]]),
1761
+ riotRequirements: player,
1762
+ responses: { "200": import_zod15.z.object({
1763
+ FeaturedBundle: import_zod15.z.object({
1764
+ Bundle: import_zod15.z.object({
1765
+ ID: import_zod15.z.string(),
1766
+ DataAssetID: import_zod15.z.string(),
1767
+ CurrencyID: import_zod15.z.string(),
1768
+ Items: import_zod15.z.array(import_zod15.z.object({
1769
+ Item: import_zod15.z.object({
1770
+ ItemTypeID: import_zod15.z.string(),
1771
+ ItemID: import_zod15.z.string(),
1772
+ Amount: import_zod15.z.number()
1773
+ }),
1774
+ BasePrice: import_zod15.z.number(),
1775
+ CurrencyID: import_zod15.z.string(),
1776
+ DiscountPercent: import_zod15.z.number(),
1777
+ DiscountedPrice: import_zod15.z.number(),
1778
+ IsPromoItem: import_zod15.z.boolean()
1779
+ })),
1780
+ ItemOffers: import_zod15.z.array(import_zod15.z.object({
1781
+ BundleItemOfferID: import_zod15.z.string(),
1782
+ Offer: import_zod15.z.object({
1783
+ OfferID: import_zod15.z.string(),
1784
+ IsDirectPurchase: import_zod15.z.boolean(),
1785
+ StartDate: import_zod15.z.string(),
1786
+ Cost: import_zod15.z.object({
1787
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1788
+ }),
1789
+ Rewards: import_zod15.z.array(import_zod15.z.object({
1790
+ ItemTypeID: import_zod15.z.string(),
1791
+ ItemID: import_zod15.z.string(),
1792
+ Quantity: import_zod15.z.number()
1793
+ }))
1794
+ }),
1795
+ DiscountPercent: import_zod15.z.number(),
1796
+ DiscountedCost: import_zod15.z.object({
1797
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1798
+ })
1799
+ })),
1800
+ TotalBaseCost: import_zod15.z.object({
1801
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1802
+ }),
1803
+ TotalDiscountedCost: import_zod15.z.object({
1804
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1805
+ }),
1806
+ TotalDiscountPercent: import_zod15.z.number(),
1807
+ DurationRemainingInSeconds: import_zod15.z.number(),
1808
+ WholesaleOnly: import_zod15.z.boolean(),
1809
+ IsGiftable: import_zod15.z.number()
1810
+ }),
1811
+ Bundles: import_zod15.z.array(import_zod15.z.object({
1812
+ ID: import_zod15.z.string(),
1813
+ DataAssetID: import_zod15.z.string(),
1814
+ CurrencyID: import_zod15.z.string(),
1815
+ Items: import_zod15.z.array(import_zod15.z.object({
1816
+ Item: import_zod15.z.object({
1817
+ ItemTypeID: import_zod15.z.string(),
1818
+ ItemID: import_zod15.z.string(),
1819
+ Amount: import_zod15.z.number()
1820
+ }),
1821
+ BasePrice: import_zod15.z.number(),
1822
+ CurrencyID: import_zod15.z.string(),
1823
+ DiscountPercent: import_zod15.z.number(),
1824
+ DiscountedPrice: import_zod15.z.number(),
1825
+ IsPromoItem: import_zod15.z.boolean()
1826
+ })),
1827
+ ItemOffers: import_zod15.z.array(import_zod15.z.object({
1828
+ BundleItemOfferID: import_zod15.z.string(),
1829
+ Offer: import_zod15.z.object({
1830
+ OfferID: import_zod15.z.string(),
1831
+ IsDirectPurchase: import_zod15.z.boolean(),
1832
+ StartDate: import_zod15.z.string(),
1833
+ Cost: import_zod15.z.object({
1834
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1835
+ }),
1836
+ Rewards: import_zod15.z.array(import_zod15.z.object({
1837
+ ItemTypeID: import_zod15.z.string(),
1838
+ ItemID: import_zod15.z.string(),
1839
+ Quantity: import_zod15.z.number()
1840
+ }))
1841
+ }),
1842
+ DiscountPercent: import_zod15.z.number(),
1843
+ DiscountedCost: import_zod15.z.object({
1844
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1845
+ })
1846
+ })),
1847
+ TotalBaseCost: import_zod15.z.object({
1848
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1849
+ }),
1850
+ TotalDiscountedCost: import_zod15.z.object({
1851
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1852
+ }),
1853
+ TotalDiscountPercent: import_zod15.z.number(),
1854
+ DurationRemainingInSeconds: import_zod15.z.number(),
1855
+ WholesaleOnly: import_zod15.z.boolean(),
1856
+ IsGiftable: import_zod15.z.number()
1857
+ })),
1858
+ FeaturedTileEntries: import_zod15.z.array(import_zod15.z.object({
1859
+ Type: import_zod15.z.number(),
1860
+ Entry: import_zod15.z.object({
1861
+ Bundle: import_zod15.z.object({
1862
+ ID: import_zod15.z.string(),
1863
+ DataAssetID: import_zod15.z.string(),
1864
+ CurrencyID: import_zod15.z.string(),
1865
+ Items: import_zod15.z.array(import_zod15.z.object({
1866
+ Item: import_zod15.z.object({
1867
+ ItemTypeID: import_zod15.z.string(),
1868
+ ItemID: import_zod15.z.string(),
1869
+ Amount: import_zod15.z.number()
1870
+ }),
1871
+ BasePrice: import_zod15.z.number(),
1872
+ CurrencyID: import_zod15.z.string(),
1873
+ DiscountPercent: import_zod15.z.number(),
1874
+ DiscountedPrice: import_zod15.z.number(),
1875
+ IsPromoItem: import_zod15.z.boolean()
1876
+ })),
1877
+ ItemOffers: import_zod15.z.array(import_zod15.z.object({
1878
+ BundleItemOfferID: import_zod15.z.string(),
1879
+ Offer: import_zod15.z.object({
1880
+ OfferID: import_zod15.z.string(),
1881
+ IsDirectPurchase: import_zod15.z.boolean(),
1882
+ StartDate: import_zod15.z.string(),
1883
+ Cost: import_zod15.z.object({
1884
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1885
+ }),
1886
+ Rewards: import_zod15.z.array(import_zod15.z.object({
1887
+ ItemTypeID: import_zod15.z.string(),
1888
+ ItemID: import_zod15.z.string(),
1889
+ Quantity: import_zod15.z.number()
1890
+ }))
1891
+ }),
1892
+ DiscountPercent: import_zod15.z.number(),
1893
+ DiscountedCost: import_zod15.z.object({
1894
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1895
+ })
1896
+ })),
1897
+ TotalBaseCost: import_zod15.z.object({
1898
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1899
+ }),
1900
+ TotalDiscountedCost: import_zod15.z.object({
1901
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1902
+ }),
1903
+ TotalDiscountPercent: import_zod15.z.number(),
1904
+ DurationRemainingInSeconds: import_zod15.z.number(),
1905
+ WholesaleOnly: import_zod15.z.boolean(),
1906
+ IsGiftable: import_zod15.z.number()
1907
+ })
1908
+ })
1909
+ })),
1910
+ BundleRemainingDurationInSeconds: import_zod15.z.number()
1911
+ }),
1912
+ SkinsPanelLayout: import_zod15.z.object({
1913
+ SingleItemOffers: import_zod15.z.array(import_zod15.z.string()),
1914
+ SingleItemStoreOffers: import_zod15.z.array(import_zod15.z.object({
1915
+ OfferID: import_zod15.z.string(),
1916
+ IsDirectPurchase: import_zod15.z.boolean(),
1917
+ StartDate: import_zod15.z.string(),
1918
+ Cost: import_zod15.z.object({
1919
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1920
+ }),
1921
+ Rewards: import_zod15.z.array(import_zod15.z.object({
1922
+ ItemTypeID: import_zod15.z.string(),
1923
+ ItemID: import_zod15.z.string(),
1924
+ Quantity: import_zod15.z.number()
1925
+ }))
1926
+ })),
1927
+ SingleItemOffersRemainingDurationInSeconds: import_zod15.z.number()
1928
+ }),
1929
+ UpgradeCurrencyStore: import_zod15.z.object({
1930
+ UpgradeCurrencyOffers: import_zod15.z.array(import_zod15.z.object({
1931
+ OfferID: import_zod15.z.string(),
1932
+ StorefrontItemID: import_zod15.z.string(),
1933
+ Offer: import_zod15.z.object({
1934
+ OfferID: import_zod15.z.string(),
1935
+ IsDirectPurchase: import_zod15.z.boolean(),
1936
+ StartDate: import_zod15.z.string(),
1937
+ Cost: import_zod15.z.object({
1938
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1939
+ }),
1940
+ Rewards: import_zod15.z.array(import_zod15.z.object({
1941
+ ItemTypeID: import_zod15.z.string(),
1942
+ ItemID: import_zod15.z.string(),
1943
+ Quantity: import_zod15.z.number()
1944
+ }))
1945
+ }),
1946
+ DiscountedPercent: import_zod15.z.number()
1947
+ }))
1948
+ }),
1949
+ AccessoryStore: import_zod15.z.object({
1950
+ AccessoryStoreOffers: import_zod15.z.array(import_zod15.z.object({
1951
+ Offer: import_zod15.z.object({
1952
+ OfferID: import_zod15.z.string(),
1953
+ IsDirectPurchase: import_zod15.z.boolean(),
1954
+ StartDate: import_zod15.z.string(),
1955
+ Cost: import_zod15.z.object({
1956
+ "85ca954a-41f2-ce94-9b45-8ca3dd39a00d": import_zod15.z.number()
1957
+ }),
1958
+ Rewards: import_zod15.z.array(import_zod15.z.object({
1959
+ ItemTypeID: import_zod15.z.string(),
1960
+ ItemID: import_zod15.z.string(),
1961
+ Quantity: import_zod15.z.number()
1962
+ }))
1963
+ }),
1964
+ ContractID: import_zod15.z.string()
1965
+ })),
1966
+ AccessoryStoreRemainingDurationInSeconds: import_zod15.z.number(),
1967
+ StorefrontID: import_zod15.z.string()
1968
+ }),
1969
+ PluginStores: import_zod15.z.array(import_zod15.z.object({
1970
+ PluginID: import_zod15.z.string(),
1971
+ PluginOffers: import_zod15.z.object({
1972
+ StoreOffers: import_zod15.z.array(import_zod15.z.object({
1973
+ PurchaseInformation: import_zod15.z.object({
1974
+ DataAssetID: import_zod15.z.string(),
1975
+ OfferID: import_zod15.z.string(),
1976
+ OfferType: import_zod15.z.number(),
1977
+ StartDate: import_zod15.z.string(),
1978
+ PrimaryCurrencyID: import_zod15.z.string(),
1979
+ Cost: import_zod15.z.object({
1980
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1981
+ }),
1982
+ DiscountedCost: import_zod15.z.object({
1983
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1984
+ }),
1985
+ DiscountedPercentage: import_zod15.z.number(),
1986
+ WholesaleOnly: import_zod15.z.boolean(),
1987
+ IsGiftable: import_zod15.z.number()
1988
+ }),
1989
+ SubOffers: import_zod15.z.array(import_zod15.z.object({
1990
+ PurchaseInformation: import_zod15.z.object({
1991
+ DataAssetID: import_zod15.z.string(),
1992
+ OfferID: import_zod15.z.string(),
1993
+ OfferType: import_zod15.z.number(),
1994
+ StartDate: import_zod15.z.string(),
1995
+ PrimaryCurrencyID: import_zod15.z.string(),
1996
+ Cost: import_zod15.z.object({
1997
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
1998
+ }),
1999
+ DiscountedCost: import_zod15.z.object({
2000
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": import_zod15.z.number()
2001
+ }),
2002
+ DiscountedPercentage: import_zod15.z.number(),
2003
+ Rewards: import_zod15.z.array(import_zod15.z.object({
2004
+ ItemTypeID: import_zod15.z.string(),
2005
+ ItemID: import_zod15.z.string(),
2006
+ Quantity: import_zod15.z.number()
2007
+ })),
2008
+ WholesaleOnly: import_zod15.z.boolean(),
2009
+ IsGiftable: import_zod15.z.number()
2010
+ })
2011
+ }))
2012
+ })),
2013
+ RemainingDurationInSeconds: import_zod15.z.number()
2014
+ }),
2015
+ StartDate: import_zod15.z.string()
2016
+ }))
2017
+ }) }
487
2018
  };
2019
+
2020
+ // src/endpoints/riot/voice.ts
2021
+ var import_zod16 = require("zod");
488
2022
  var voiceAudioPropertiesEndpoint = {
489
2023
  name: "Audio Properties",
490
2024
  description: "Get audio properties such as if the microphone is in use",
491
- queryName: "VOICE_CHAT_RNet_FetchAudioProperties",
492
2025
  category: "Local Endpoints - Voice",
493
2026
  type: "local",
494
2027
  suffix: "voice-chat/v1/audio-properties",
495
2028
  riotRequirements: { localAuth: true },
496
- responses: { "200": import_zod2.z.unknown() }
2029
+ responses: { "200": import_zod16.z.object({
2030
+ fastEnergyMeter: import_zod16.z.number(),
2031
+ isLoopbackEnabled: import_zod16.z.boolean(),
2032
+ isMicActive: import_zod16.z.boolean(),
2033
+ isSpeakerActive: import_zod16.z.boolean(),
2034
+ micEnergy: import_zod16.z.number(),
2035
+ micVolume: import_zod16.z.number(),
2036
+ noiseFloorMeter: import_zod16.z.number(),
2037
+ speakerEnergy: import_zod16.z.number(),
2038
+ speakerVolume: import_zod16.z.number(),
2039
+ speechThresholdMeter: import_zod16.z.number()
2040
+ }) }
497
2041
  };
498
2042
  var voiceCaptureDevicesEndpoint = {
499
2043
  name: "Capture Devices",
500
2044
  description: "Get microphone input device info",
501
- queryName: "VOICE_CHAT_RNet_FetchCaptureDevices",
502
2045
  category: "Local Endpoints - Voice",
503
2046
  type: "local",
504
2047
  suffix: "voice-chat/v2/devices/capture",
505
2048
  riotRequirements: { localAuth: true },
506
- responses: { "200": import_zod2.z.unknown() }
507
- };
508
- var voicePushToTalkEndpoint = {
509
- name: "Push To Talk",
510
- description: "GET VOICE_CHAT_RNet_FetchPTTSettings",
511
- queryName: "VOICE_CHAT_RNet_FetchPTTSettings",
512
- category: "Local Endpoints - Voice",
513
- type: "local",
514
- suffix: "voice-chat/v2/push-to-talk/valorant",
515
- riotRequirements: { localAuth: true },
516
- responses: { "200": import_zod2.z.unknown() }
2049
+ responses: { "200": import_zod16.z.array(import_zod16.z.object({
2050
+ handle: import_zod16.z.string(),
2051
+ is_current_device: import_zod16.z.boolean(),
2052
+ is_default: import_zod16.z.boolean(),
2053
+ is_effective_device: import_zod16.z.boolean(),
2054
+ name: import_zod16.z.string()
2055
+ })) }
517
2056
  };
518
2057
  var voiceRenderDevicesEndpoint = {
519
2058
  name: "Render Devices",
520
2059
  description: "Get audio output devices",
521
- queryName: "VOICE_CHAT_RNet_FetchRenderDevices",
522
2060
  category: "Local Endpoints - Voice",
523
2061
  type: "local",
524
2062
  suffix: "voice-chat/v2/devices/render",
525
2063
  riotRequirements: { localAuth: true },
526
- responses: { "200": import_zod2.z.unknown() }
2064
+ responses: { "200": import_zod16.z.array(import_zod16.z.object({
2065
+ handle: import_zod16.z.string(),
2066
+ is_current_device: import_zod16.z.boolean(),
2067
+ is_default: import_zod16.z.boolean(),
2068
+ is_effective_device: import_zod16.z.boolean(),
2069
+ name: import_zod16.z.string()
2070
+ })) }
527
2071
  };
528
- var voiceSessionsEndpoint = {
529
- name: "Sessions",
530
- description: "GET VOICE_CHAT_RNet_FetchSessions",
531
- queryName: "VOICE_CHAT_RNet_FetchSessions",
532
- category: "Local Endpoints - Voice",
533
- type: "local",
534
- suffix: "voice-chat/v3/sessions/valorant",
535
- riotRequirements: { localAuth: true },
536
- responses: { "200": import_zod2.z.unknown() }
2072
+
2073
+ // src/api/groups/pvp.ts
2074
+ var pvp = {
2075
+ content: import_valorant_api_types10.endpoints.fetchContentEndpoint,
2076
+ accountXp: import_valorant_api_types10.endpoints.accountXPEndpoint,
2077
+ setPlayerLoadout: import_valorant_api_types10.endpoints.setPlayerLoadoutEndpoint,
2078
+ playerMmr: import_valorant_api_types10.endpoints.playerMMREndpoint,
2079
+ matchHistory: import_valorant_api_types10.endpoints.matchHistoryEndpoint,
2080
+ matchDetails: import_valorant_api_types10.endpoints.matchDetailsEndpoint,
2081
+ competitiveUpdates: import_valorant_api_types10.endpoints.competitiveUpdatesEndpoint,
2082
+ leaderboard: import_valorant_api_types10.endpoints.leaderboardEndpoint,
2083
+ penalties: import_valorant_api_types10.endpoints.penaltiesEndpoint,
2084
+ config: configEndpoint,
2085
+ nameService: import_valorant_api_types10.endpoints.nameServiceEndpoint,
2086
+ playerLoadoutV3: playerLoadoutV3Endpoint
537
2087
  };
538
- var voiceSettingsEndpoint = {
539
- name: "Settings",
540
- description: "GET VOICE_CHAT_RNet_FetchSettings",
541
- queryName: "VOICE_CHAT_RNet_FetchSettings",
542
- category: "Local Endpoints - Voice",
543
- type: "local",
544
- suffix: "voice-chat/v3/settings/valorant",
545
- riotRequirements: { localAuth: true },
546
- responses: { "200": import_zod2.z.unknown() }
2088
+
2089
+ // src/api/groups/party.ts
2090
+ var import_valorant_api_types11 = require("valorant-api-types");
2091
+ var party = {
2092
+ get: partyEndpoint,
2093
+ player: import_valorant_api_types11.endpoints.partyPlayerEndpoint,
2094
+ removePlayer: import_valorant_api_types11.endpoints.partyRemovePlayerEndpoint,
2095
+ setMemberReady: partySetMemberReadyEndpoint,
2096
+ refreshCompetitiveTier: refreshCompetitiveTierEndpoint,
2097
+ refreshPlayerIdentity: refreshPlayerIdentityEndpoint,
2098
+ refreshPings: refreshPingsEndpoint,
2099
+ changeQueue: changeQueueEndpoint,
2100
+ startCustomGame: startCustomGameEndpoint,
2101
+ enterMatchmakingQueue: enterMatchmakingQueueEndpoint,
2102
+ leaveMatchmakingQueue: leaveMatchmakingQueueEndpoint,
2103
+ setAccessibility: setPartyAccessibilityEndpoint,
2104
+ setCustomGameSettings: setCustomGameSettingsEndpoint,
2105
+ invite: partyInviteEndpoint,
2106
+ requestToJoin: import_valorant_api_types11.endpoints.partyRequestEndpoint,
2107
+ declineRequest: partyDeclineEndpoint,
2108
+ customGameConfigs: import_valorant_api_types11.endpoints.customGameConfigsEndpoint,
2109
+ disableCode: partyDisableCodeEndpoint,
2110
+ generateCode: partyGenerateCodeEndpoint,
2111
+ joinByCode: import_valorant_api_types11.endpoints.partyJoinByCodeEndpoint,
2112
+ setCustomGameTeam: setCustomGameTeamEndpoint,
2113
+ getCustomGame: customGamePartyEndpoint
547
2114
  };
548
- var pregameChatTokenEndpoint = {
549
- name: "Chat Token",
550
- description: "Get a chat token",
551
- queryName: "Pregame_FetchChatToken",
552
- category: "Pre-Game Endpoints",
553
- type: "glz",
554
- suffix: "pregame/v1/matches/{pre-game match id}/chattoken",
555
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
556
- responses: { "200": import_zod2.z.unknown() }
557
- };
558
- var pregameVoiceTokenEndpoint = {
559
- name: "Voice Token",
560
- description: "Get a voice token",
561
- queryName: "Pregame_FetchVoiceToken",
562
- category: "Pre-Game Endpoints",
563
- type: "glz",
564
- suffix: "pregame/v1/matches/{pre-game match id}/voicetoken",
565
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
566
- responses: { "200": import_zod2.z.unknown() }
567
- };
568
- var sessionGetEndpoint = {
569
- name: "Get",
570
- description: "Get information about the current game session",
571
- queryName: "Session_Get",
572
- category: "Session Endpoints",
573
- type: "glz",
574
- suffix: "session/v1/sessions/{puuid}",
575
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
576
- responses: { "200": import_zod2.z.unknown() }
577
- };
578
- var sessionReconnectEndpoint = {
579
- name: "Reconnect",
580
- description: "GET Session_ReConnect",
581
- queryName: "Session_ReConnect",
582
- category: "Session Endpoints",
583
- type: "glz",
584
- suffix: "session/v1/sessions/{puuid}/reconnect",
585
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
586
- responses: { "200": import_zod2.z.unknown() }
587
- };
588
- var storeOrderEndpoint = {
589
- name: "Order",
590
- description: "GET Store_GetOrder",
591
- queryName: "Store_GetOrder",
592
- category: "Store Endpoints",
593
- type: "pd",
594
- suffix: "store/v1/order/{order id}",
595
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
596
- responses: { "200": import_zod2.z.unknown() }
597
- };
598
- var localPlayerSettingsEndpoint = {
599
- name: "Player Settings",
600
- description: "Get client settings",
601
- queryName: "RiotKV_RNet_GetSettings",
602
- category: "Local Endpoints",
603
- type: "local",
604
- suffix: "player-preferences/v1/data-json/Ares.PlayerSettings",
605
- riotRequirements: { localAuth: true },
606
- responses: { "200": import_zod2.z.unknown() }
2115
+
2116
+ // src/api/groups/store.ts
2117
+ var import_valorant_api_types12 = require("valorant-api-types");
2118
+ var store = {
2119
+ wallet: import_valorant_api_types12.endpoints.walletEndpoint,
2120
+ ownedItems: ownedItemsEndpoint,
2121
+ storefrontV3: storefrontV3Endpoint,
2122
+ agentStore: agentStoreEndpoint,
2123
+ allEntitlements: allEntitlementsEndpoint
607
2124
  };
608
2125
 
609
- // src/extra/store.ts
610
- var import_zod3 = require("zod");
611
- var offerSchema = import_zod3.z.object({
612
- OfferID: import_zod3.z.string(),
613
- IsDirectPurchase: import_zod3.z.boolean(),
614
- StartDate: import_zod3.z.string(),
615
- Cost: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.number()),
616
- Rewards: import_zod3.z.array(import_zod3.z.object({
617
- ItemTypeID: import_zod3.z.string(),
618
- ItemID: import_zod3.z.string(),
619
- Quantity: import_zod3.z.number()
620
- }).passthrough())
2126
+ // src/api/groups/pregame.ts
2127
+ var import_valorant_api_types13 = require("valorant-api-types");
2128
+ var pregame = {
2129
+ player: import_valorant_api_types13.endpoints.pregamePlayerEndpoint,
2130
+ match: pregameMatchEndpoint,
2131
+ loadouts: pregameLoadoutsEndpoint,
2132
+ selectCharacter: selectCharacterEndpoint,
2133
+ lockCharacter: lockCharacterEndpoint,
2134
+ quit: import_valorant_api_types13.endpoints.pregameQuitEndpoint
2135
+ };
2136
+
2137
+ // src/api/groups/currentGame.ts
2138
+ var import_valorant_api_types14 = require("valorant-api-types");
2139
+ var currentGame = {
2140
+ player: import_valorant_api_types14.endpoints.currentGamePlayerEndpoint,
2141
+ match: import_valorant_api_types14.endpoints.currentGameMatchEndpoint,
2142
+ loadouts: currentGameLoadoutsEndpoint,
2143
+ quit: import_valorant_api_types14.endpoints.currentGameQuitEndpoint
2144
+ };
2145
+
2146
+ // src/api/groups/contracts.ts
2147
+ var import_valorant_api_types15 = require("valorant-api-types");
2148
+ var contracts = {
2149
+ itemUpgrades: import_valorant_api_types15.endpoints.itemUpgradesEndpoint,
2150
+ list: contractsEndpoint,
2151
+ activate: import_valorant_api_types15.endpoints.activateContractEndpoint,
2152
+ activeRecruitmentEvent: activeRecruitmentEventEndpoint
2153
+ };
2154
+
2155
+ // src/api/groups/local.ts
2156
+ var import_valorant_api_types16 = require("valorant-api-types");
2157
+ var local = {
2158
+ help: import_valorant_api_types16.endpoints.localHelpEndpoint,
2159
+ sessions: import_valorant_api_types16.endpoints.sessionsEndpoint,
2160
+ rsoUserInfo: import_valorant_api_types16.endpoints.rsoUserInfoEndpoint,
2161
+ clientRegion: import_valorant_api_types16.endpoints.clientRegionEndpoint,
2162
+ accountAlias: import_valorant_api_types16.endpoints.accountAliasEndpoint,
2163
+ entitlementsToken: import_valorant_api_types16.endpoints.entitlementsTokenEndpoint,
2164
+ chatSession: import_valorant_api_types16.endpoints.chatSessionEndpoint,
2165
+ friends: import_valorant_api_types16.endpoints.friendsEndpoint,
2166
+ sendFriendRequest: import_valorant_api_types16.endpoints.sendFriendRequestEndpoint,
2167
+ removeFriendRequest: import_valorant_api_types16.endpoints.removeFriendRequestEndpoint,
2168
+ presence: presenceEndpoint,
2169
+ friendRequests: import_valorant_api_types16.endpoints.friendRequestsEndpoint,
2170
+ swaggerDocs: import_valorant_api_types16.endpoints.localSwaggerDocsEndpoint,
2171
+ eula: localEulaEndpoint,
2172
+ privacyPolicy: localPrivacyPolicyEndpoint,
2173
+ availableLocales: localAvailableLocalesEndpoint,
2174
+ locale: localLocaleEndpoint,
2175
+ riotStatus: localRiotStatusEndpoint,
2176
+ accessToken: localAccessTokenEndpoint,
2177
+ pluginStatus: localPluginStatusEndpoint,
2178
+ rmsSession: localRmsSessionEndpoint,
2179
+ processInfo: localProcessInfoEndpoint,
2180
+ logPath: localLogPathEndpoint
2181
+ };
2182
+
2183
+ // src/api/groups/chat.ts
2184
+ var import_valorant_api_types17 = require("valorant-api-types");
2185
+ var chat = {
2186
+ partyInfo: import_valorant_api_types17.endpoints.partyChatInfoEndpoint,
2187
+ pregameInfo: import_valorant_api_types17.endpoints.pregameChatInfoEndpoint,
2188
+ currentGameInfo: import_valorant_api_types17.endpoints.currentGameChatInfoEndpoint,
2189
+ allInfo: import_valorant_api_types17.endpoints.allChatInfoEndpoint,
2190
+ participants: chatParticipantsEndpoint,
2191
+ send: import_valorant_api_types17.endpoints.sendChatEndpoint,
2192
+ history: import_valorant_api_types17.endpoints.chatHistoryEndpoint,
2193
+ settings: chatSettingsEndpoint,
2194
+ tournamentInfo: chatTournamentInfoEndpoint
2195
+ };
2196
+
2197
+ // src/api/groups/voice.ts
2198
+ var voice = {
2199
+ audioProperties: voiceAudioPropertiesEndpoint,
2200
+ captureDevices: voiceCaptureDevicesEndpoint,
2201
+ renderDevices: voiceRenderDevicesEndpoint
2202
+ };
2203
+
2204
+ // src/api/groups/premier.ts
2205
+ var premier = {
2206
+ seasons: premierSeasonsEndpoint,
2207
+ activeSeason: premierActiveSeasonEndpoint,
2208
+ conferences: premierConferencesEndpoint,
2209
+ matchLimit: premierMatchLimitEndpoint,
2210
+ eligibility: premierEligibilityEndpoint,
2211
+ playerV2: premierPlayerV2Endpoint,
2212
+ playerV3: premierPlayerV3Endpoint
2213
+ };
2214
+
2215
+ // src/api/groups/esports.ts
2216
+ var esports = {
2217
+ liveEventTimes: esportsLiveEventTimesEndpoint,
2218
+ upcomingMatches: esportsUpcomingMatchesEndpoint,
2219
+ pickemLeagues: esportsPickemLeaguesEndpoint
2220
+ };
2221
+
2222
+ // src/api/groups/restrictions.ts
2223
+ var restrictions = {
2224
+ avoidList: avoidListEndpoint,
2225
+ activeFutureInterventions: activeFutureInterventionsEndpoint
2226
+ };
2227
+
2228
+ // src/api/groups/account.ts
2229
+ var account = {
2230
+ dailyTicket: dailyTicketEndpoint,
2231
+ dailyTicketQueueConfig: dailyTicketQueueConfigEndpoint,
2232
+ favorites: favoritesEndpoint,
2233
+ goldstars: goldstarsEndpoint,
2234
+ goldstarsPlayer: goldstarsPlayerEndpoint,
2235
+ bloomlineQueues: bloomlineQueuesEndpoint,
2236
+ bloomlinePlayer: bloomlinePlayerEndpoint
2237
+ };
2238
+
2239
+ // src/api/groups/auth.ts
2240
+ var import_valorant_api_types18 = require("valorant-api-types");
2241
+ var auth = {
2242
+ cookies: import_valorant_api_types18.endpoints.authCookiesEndpoint,
2243
+ request: import_valorant_api_types18.endpoints.authRequestEndpoint,
2244
+ multiFactor: import_valorant_api_types18.endpoints.multiFactorAuthenticationEndpoint,
2245
+ cookieReauth: import_valorant_api_types18.endpoints.cookieReauthEndpoint,
2246
+ entitlement: import_valorant_api_types18.endpoints.entitlementEndpoint,
2247
+ playerInfo: import_valorant_api_types18.endpoints.playerInfoEndpoint,
2248
+ riotGeo: import_valorant_api_types18.endpoints.riotGeoEndpoint,
2249
+ pasToken: import_valorant_api_types18.endpoints.pasTokenEndpoint,
2250
+ riotClientConfig: import_valorant_api_types18.endpoints.riotClientConfigEndpoint
2251
+ };
2252
+
2253
+ // src/endpoints/catalog/index.ts
2254
+ var import_zod19 = require("zod");
2255
+
2256
+ // src/endpoints/catalog/factory.ts
2257
+ var import_zod17 = require("zod");
2258
+
2259
+ // src/envelope.ts
2260
+ var enveloped = /* @__PURE__ */ new WeakSet();
2261
+ function markEnveloped(endpoint2) {
2262
+ enveloped.add(endpoint2);
2263
+ return endpoint2;
2264
+ }
2265
+ function unwrapEnvelope(endpoint2, body) {
2266
+ if (enveloped.has(endpoint2) && typeof body === "object" && body !== null && "data" in body) {
2267
+ return body.data;
2268
+ }
2269
+ return body;
2270
+ }
2271
+
2272
+ // src/endpoints/catalog/factory.ts
2273
+ var BASE = "https://valorant-api.com/v1/";
2274
+ function query(queryParams = []) {
2275
+ return new Map([
2276
+ ["language", import_zod17.z.string().optional().describe("Language code such as `fr-FR`. Defaults to `en-US`.")],
2277
+ ...queryParams
2278
+ ]);
2279
+ }
2280
+ function endpoint(name, description, path, schema, queryParams = []) {
2281
+ return markEnveloped({
2282
+ name,
2283
+ description,
2284
+ category: "Valorant-API.com",
2285
+ type: "other",
2286
+ suffix: `${BASE}${path}`,
2287
+ query: query(queryParams),
2288
+ responses: { "200": schema }
2289
+ });
2290
+ }
2291
+ function collection(title, singular, path, schema, queryParams = []) {
2292
+ return {
2293
+ list: endpoint(title, `List of ${title.toLowerCase()}`, path, import_zod17.z.array(schema), queryParams),
2294
+ one: endpoint(singular, `One ${singular.toLowerCase()} by UUID`, `${path}/{uuid}`, schema)
2295
+ };
2296
+ }
2297
+
2298
+ // src/endpoints/catalog/schemas.ts
2299
+ var import_zod18 = require("zod");
2300
+ var text = import_zod18.z.string().nullish();
2301
+ var asset = import_zod18.z.object({
2302
+ uuid: import_zod18.z.string(),
2303
+ displayName: text,
2304
+ displayIcon: text,
2305
+ assetPath: text
2306
+ }).passthrough();
2307
+ var agentSchema = asset.extend({
2308
+ description: text,
2309
+ developerName: text,
2310
+ characterTags: import_zod18.z.array(import_zod18.z.string()).nullish(),
2311
+ displayIconSmall: text,
2312
+ bustPortrait: text,
2313
+ fullPortrait: text,
2314
+ killfeedPortrait: text,
2315
+ background: text,
2316
+ isPlayableCharacter: import_zod18.z.boolean(),
2317
+ role: import_zod18.z.object({ uuid: import_zod18.z.string(), displayName: text, description: text, displayIcon: text }).passthrough().nullish(),
2318
+ abilities: import_zod18.z.array(import_zod18.z.object({ slot: import_zod18.z.string(), displayName: text, description: text, displayIcon: text }).passthrough()).nullish()
2319
+ });
2320
+ var mapSchema = asset.extend({
2321
+ coordinates: text,
2322
+ listViewIcon: text,
2323
+ splash: text,
2324
+ mapUrl: text,
2325
+ xMultiplier: import_zod18.z.number(),
2326
+ yMultiplier: import_zod18.z.number(),
2327
+ xScalarToAdd: import_zod18.z.number(),
2328
+ yScalarToAdd: import_zod18.z.number(),
2329
+ callouts: import_zod18.z.array(import_zod18.z.object({ regionName: import_zod18.z.string(), superRegionName: import_zod18.z.string(), location: import_zod18.z.object({ x: import_zod18.z.number(), y: import_zod18.z.number() }) }).passthrough()).nullish()
2330
+ });
2331
+ var weaponSchema = asset.extend({
2332
+ category: import_zod18.z.string(),
2333
+ defaultSkinUuid: import_zod18.z.string(),
2334
+ killStreamIcon: text,
2335
+ weaponStats: import_zod18.z.object({}).passthrough().nullish(),
2336
+ shopData: import_zod18.z.object({}).passthrough().nullish(),
2337
+ skins: import_zod18.z.array(import_zod18.z.object({}).passthrough())
2338
+ });
2339
+ var skinSchema = asset.extend({
2340
+ themeUuid: import_zod18.z.string(),
2341
+ contentTierUuid: text,
2342
+ wallpaper: text,
2343
+ chromas: import_zod18.z.array(asset.passthrough()),
2344
+ levels: import_zod18.z.array(asset.passthrough())
2345
+ });
2346
+ var seasonSchema = import_zod18.z.object({
2347
+ uuid: import_zod18.z.string(),
2348
+ displayName: text,
2349
+ type: text,
2350
+ startTime: import_zod18.z.string(),
2351
+ endTime: import_zod18.z.string(),
2352
+ parentUuid: text,
2353
+ assetPath: text
621
2354
  }).passthrough();
622
- var bundleSchema = import_zod3.z.object({
623
- ID: import_zod3.z.string(),
624
- DataAssetID: import_zod3.z.string(),
625
- CurrencyID: import_zod3.z.string(),
626
- Items: import_zod3.z.array(import_zod3.z.unknown()),
627
- ItemOffers: import_zod3.z.array(import_zod3.z.unknown()).nullish(),
628
- TotalBaseCost: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.number()).nullish(),
629
- TotalDiscountedCost: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.number()).nullish(),
630
- TotalDiscountPercent: import_zod3.z.number(),
631
- DurationRemainingInSeconds: import_zod3.z.number(),
632
- WholesaleOnly: import_zod3.z.boolean()
2355
+ var versionSchema = import_zod18.z.object({
2356
+ manifestId: import_zod18.z.string(),
2357
+ branch: import_zod18.z.string(),
2358
+ version: import_zod18.z.string(),
2359
+ buildVersion: import_zod18.z.string(),
2360
+ engineVersion: import_zod18.z.string(),
2361
+ riotClientVersion: import_zod18.z.string().describe("Value of the X-Riot-ClientVersion header"),
2362
+ riotClientBuild: import_zod18.z.string(),
2363
+ buildDate: import_zod18.z.string()
633
2364
  }).passthrough();
634
- var storefrontV3Endpoint = {
635
- name: "Storefront V3",
636
- 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.",
637
- queryName: "Store_GetStorefrontV3",
638
- category: "Store Endpoints",
639
- type: "pd",
640
- method: "POST",
641
- suffix: "store/v3/storefront/{puuid}",
642
- headers: /* @__PURE__ */ new Map([["Content-Type", "application/json"]]),
643
- riotRequirements: {
644
- token: true,
645
- entitlement: true,
646
- clientPlatform: true,
647
- clientVersion: true
648
- },
649
- responses: {
650
- "200": import_zod3.z.object({
651
- FeaturedBundle: import_zod3.z.object({
652
- Bundle: bundleSchema,
653
- Bundles: import_zod3.z.array(bundleSchema),
654
- BundleRemainingDurationInSeconds: import_zod3.z.number()
655
- }).passthrough(),
656
- SkinsPanelLayout: import_zod3.z.object({
657
- SingleItemOffers: import_zod3.z.array(import_zod3.z.string()),
658
- SingleItemStoreOffers: import_zod3.z.array(offerSchema),
659
- SingleItemOffersRemainingDurationInSeconds: import_zod3.z.number()
660
- }).passthrough(),
661
- UpgradeCurrencyStore: import_zod3.z.object({
662
- UpgradeCurrencyOffers: import_zod3.z.array(import_zod3.z.object({ OfferID: import_zod3.z.string(), StorefrontItemID: import_zod3.z.string() }).passthrough())
663
- }).passthrough(),
664
- AccessoryStore: import_zod3.z.object({
665
- AccessoryStoreOffers: import_zod3.z.array(import_zod3.z.object({ Offer: offerSchema, ContractID: import_zod3.z.string() }).passthrough()),
666
- AccessoryStoreRemainingDurationInSeconds: import_zod3.z.number(),
667
- StorefrontID: import_zod3.z.string()
668
- }).passthrough(),
669
- BonusStore: import_zod3.z.object({
670
- BonusStoreOffers: import_zod3.z.array(import_zod3.z.unknown()),
671
- BonusStoreRemainingDurationInSeconds: import_zod3.z.number()
672
- }).passthrough().optional().describe("Only present while the night market is active"),
673
- PluginStores: import_zod3.z.array(import_zod3.z.object({ PluginID: import_zod3.z.string(), PluginOffers: import_zod3.z.unknown(), StartDate: import_zod3.z.string() }).passthrough()).optional()
674
- }).passthrough()
675
- }
2365
+
2366
+ // src/endpoints/catalog/index.ts
2367
+ var playable = [["isPlayableCharacter", import_zod19.z.boolean().optional().describe("Only return playable agents. Skips the duplicate Sova.")]];
2368
+ var agents = collection("Agents", "Agent", "agents", agentSchema, playable);
2369
+ var buddies = collection("Buddies", "Buddy", "buddies", asset);
2370
+ var buddyLevels = collection("Buddy Levels", "Buddy Level", "buddies/levels", asset);
2371
+ var bundles = collection("Bundles", "Bundle", "bundles", asset);
2372
+ var ceremonies = collection("Ceremonies", "Ceremony", "ceremonies", asset);
2373
+ var competitiveTiers = collection("Competitive Tiers", "Competitive Tier Set", "competitivetiers", import_zod19.z.object({ uuid: import_zod19.z.string(), tiers: import_zod19.z.array(import_zod19.z.object({ tier: import_zod19.z.number(), tierName: text, division: text, color: text }).passthrough()) }).passthrough());
2374
+ var contentTiers = collection("Content Tiers", "Content Tier", "contenttiers", asset);
2375
+ var contracts2 = collection("Contracts", "Contract", "contracts", asset);
2376
+ var currencies = collection("Currencies", "Currency", "currencies", asset);
2377
+ var events = collection("Events", "Event", "events", asset);
2378
+ var flex = collection("Flex", "Flex Item", "flex", asset);
2379
+ var gamemodes = collection("Gamemodes", "Gamemode", "gamemodes", asset);
2380
+ var gamemodeEquippables = collection("Gamemode Equippables", "Gamemode Equippable", "gamemodes/equippables", asset);
2381
+ var gear = collection("Gear", "Gear Item", "gear", asset);
2382
+ var levelBorders = collection("Level Borders", "Level Border", "levelborders", asset);
2383
+ var maps = collection("Maps", "Map", "maps", mapSchema);
2384
+ var missions = collection("Missions", "Mission", "missions", import_zod19.z.object({ uuid: import_zod19.z.string(), displayName: text }).passthrough());
2385
+ var playerCards = collection("Player Cards", "Player Card", "playercards", asset);
2386
+ var playerTitles = collection("Player Titles", "Player Title", "playertitles", import_zod19.z.object({ uuid: import_zod19.z.string(), displayName: text, titleText: text }).passthrough());
2387
+ var seasons = collection("Seasons", "Season", "seasons", seasonSchema);
2388
+ var competitiveSeasons = collection("Competitive Seasons", "Competitive Season", "seasons/competitive", import_zod19.z.object({ uuid: import_zod19.z.string(), seasonUuid: import_zod19.z.string(), startTime: import_zod19.z.string(), endTime: import_zod19.z.string() }).passthrough());
2389
+ var sprays = collection("Sprays", "Spray", "sprays", asset);
2390
+ var sprayLevels = collection("Spray Levels", "Spray Level", "sprays/levels", asset);
2391
+ var themes = collection("Themes", "Theme", "themes", asset);
2392
+ var weapons = collection("Weapons", "Weapon", "weapons", weaponSchema);
2393
+ var weaponSkins = collection("Weapon Skins", "Weapon Skin", "weapons/skins", skinSchema);
2394
+ var weaponSkinChromas = collection("Weapon Skin Chromas", "Weapon Skin Chroma", "weapons/skinchromas", asset);
2395
+ var weaponSkinLevels = collection("Weapon Skin Levels", "Weapon Skin Level", "weapons/skinlevels", asset);
2396
+ var catalogEndpoints = {
2397
+ agents: agents.list,
2398
+ agent: agents.one,
2399
+ buddies: buddies.list,
2400
+ buddy: buddies.one,
2401
+ buddyLevels: buddyLevels.list,
2402
+ buddyLevel: buddyLevels.one,
2403
+ bundles: bundles.list,
2404
+ bundle: bundles.one,
2405
+ ceremonies: ceremonies.list,
2406
+ ceremony: ceremonies.one,
2407
+ competitiveTiers: competitiveTiers.list,
2408
+ competitiveTier: competitiveTiers.one,
2409
+ contentTiers: contentTiers.list,
2410
+ contentTier: contentTiers.one,
2411
+ contracts: contracts2.list,
2412
+ contract: contracts2.one,
2413
+ currencies: currencies.list,
2414
+ currency: currencies.one,
2415
+ events: events.list,
2416
+ event: events.one,
2417
+ flex: flex.list,
2418
+ flexItem: flex.one,
2419
+ gamemodes: gamemodes.list,
2420
+ gamemode: gamemodes.one,
2421
+ gamemodeEquippables: gamemodeEquippables.list,
2422
+ gamemodeEquippable: gamemodeEquippables.one,
2423
+ gear: gear.list,
2424
+ gearItem: gear.one,
2425
+ levelBorders: levelBorders.list,
2426
+ levelBorder: levelBorders.one,
2427
+ maps: maps.list,
2428
+ map: maps.one,
2429
+ missions: missions.list,
2430
+ mission: missions.one,
2431
+ playerCards: playerCards.list,
2432
+ playerCard: playerCards.one,
2433
+ playerTitles: playerTitles.list,
2434
+ playerTitle: playerTitles.one,
2435
+ seasons: seasons.list,
2436
+ season: seasons.one,
2437
+ competitiveSeasons: competitiveSeasons.list,
2438
+ competitiveSeason: competitiveSeasons.one,
2439
+ sprays: sprays.list,
2440
+ spray: sprays.one,
2441
+ sprayLevels: sprayLevels.list,
2442
+ sprayLevel: sprayLevels.one,
2443
+ themes: themes.list,
2444
+ theme: themes.one,
2445
+ version: endpoint("Version", "Current game version and the matching client version", "version", versionSchema),
2446
+ weapons: weapons.list,
2447
+ weapon: weapons.one,
2448
+ weaponSkins: weaponSkins.list,
2449
+ weaponSkin: weaponSkins.one,
2450
+ weaponSkinChromas: weaponSkinChromas.list,
2451
+ weaponSkinChroma: weaponSkinChromas.one,
2452
+ weaponSkinLevels: weaponSkinLevels.list,
2453
+ weaponSkinLevel: weaponSkinLevels.one
676
2454
  };
677
2455
 
2456
+ // src/api/groups/catalog.ts
2457
+ var catalog = catalogEndpoints;
2458
+
678
2459
  // src/api/registry.ts
679
2460
  var registry = {
680
- pvp: {
681
- content: import_valorant_api_types.endpoints.fetchContentEndpoint,
682
- accountXp: import_valorant_api_types.endpoints.accountXPEndpoint,
683
- playerLoadout: import_valorant_api_types.endpoints.playerLoadoutEndpoint,
684
- setPlayerLoadout: import_valorant_api_types.endpoints.setPlayerLoadoutEndpoint,
685
- playerMmr: import_valorant_api_types.endpoints.playerMMREndpoint,
686
- matchHistory: import_valorant_api_types.endpoints.matchHistoryEndpoint,
687
- matchDetails: import_valorant_api_types.endpoints.matchDetailsEndpoint,
688
- competitiveUpdates: import_valorant_api_types.endpoints.competitiveUpdatesEndpoint,
689
- leaderboard: import_valorant_api_types.endpoints.leaderboardEndpoint,
690
- penalties: import_valorant_api_types.endpoints.penaltiesEndpoint,
691
- config: import_valorant_api_types.endpoints.configEndpoint,
692
- nameService: import_valorant_api_types.endpoints.nameServiceEndpoint
693
- },
694
- party: {
695
- get: import_valorant_api_types.endpoints.partyEndpoint,
696
- player: import_valorant_api_types.endpoints.partyPlayerEndpoint,
697
- removePlayer: import_valorant_api_types.endpoints.partyRemovePlayerEndpoint,
698
- setMemberReady: import_valorant_api_types.endpoints.partySetMemberReadyEndpoint,
699
- refreshCompetitiveTier: import_valorant_api_types.endpoints.refreshCompetitiveTierEndpoint,
700
- refreshPlayerIdentity: import_valorant_api_types.endpoints.refreshPlayerIdentityEndpoint,
701
- refreshPings: import_valorant_api_types.endpoints.refreshPingsEndpoint,
702
- changeQueue: import_valorant_api_types.endpoints.changeQueueEndpoint,
703
- startCustomGame: import_valorant_api_types.endpoints.startCustomGameEndpoint,
704
- enterMatchmakingQueue: import_valorant_api_types.endpoints.enterMatchmakingQueueEndpoint,
705
- leaveMatchmakingQueue: import_valorant_api_types.endpoints.leaveMatchmakingQueueEndpoint,
706
- setAccessibility: import_valorant_api_types.endpoints.setPartyAccessibilityEndpoint,
707
- setCustomGameSettings: import_valorant_api_types.endpoints.setCustomGameSettingsEndpoint,
708
- invite: import_valorant_api_types.endpoints.partyInviteEndpoint,
709
- requestToJoin: import_valorant_api_types.endpoints.partyRequestEndpoint,
710
- declineRequest: import_valorant_api_types.endpoints.partyDeclineEndpoint,
711
- customGameConfigs: import_valorant_api_types.endpoints.customGameConfigsEndpoint,
712
- chatToken: import_valorant_api_types.endpoints.partyChatTokenEndpoint,
713
- voiceToken: import_valorant_api_types.endpoints.partyVoiceTokenEndpoint,
714
- disableCode: import_valorant_api_types.endpoints.partyDisableCodeEndpoint,
715
- generateCode: import_valorant_api_types.endpoints.partyGenerateCodeEndpoint,
716
- joinByCode: import_valorant_api_types.endpoints.partyJoinByCodeEndpoint
717
- },
718
- store: {
719
- prices: import_valorant_api_types.endpoints.pricesEndpoint,
720
- storefront: import_valorant_api_types.endpoints.storefrontEndpoint,
721
- wallet: import_valorant_api_types.endpoints.walletEndpoint,
722
- ownedItems: import_valorant_api_types.endpoints.ownedItemsEndpoint,
723
- storefrontV3: storefrontV3Endpoint,
724
- order: storeOrderEndpoint
725
- },
726
- pregame: {
727
- player: import_valorant_api_types.endpoints.pregamePlayerEndpoint,
728
- match: import_valorant_api_types.endpoints.pregameMatchEndpoint,
729
- loadouts: import_valorant_api_types.endpoints.pregameLoadoutsEndpoint,
730
- selectCharacter: import_valorant_api_types.endpoints.selectCharacterEndpoint,
731
- lockCharacter: import_valorant_api_types.endpoints.lockCharacterEndpoint,
732
- quit: import_valorant_api_types.endpoints.pregameQuitEndpoint,
733
- chatToken: pregameChatTokenEndpoint,
734
- voiceToken: pregameVoiceTokenEndpoint
735
- },
736
- currentGame: {
737
- player: import_valorant_api_types.endpoints.currentGamePlayerEndpoint,
738
- match: import_valorant_api_types.endpoints.currentGameMatchEndpoint,
739
- loadouts: import_valorant_api_types.endpoints.currentGameLoadoutsEndpoint,
740
- quit: import_valorant_api_types.endpoints.currentGameQuitEndpoint,
741
- allChatToken: currentGameAllChatTokenEndpoint,
742
- teamChatToken: currentGameTeamChatTokenEndpoint
743
- },
744
- contracts: {
745
- itemUpgrades: import_valorant_api_types.endpoints.itemUpgradesEndpoint,
746
- list: import_valorant_api_types.endpoints.contractsEndpoint,
747
- activate: import_valorant_api_types.endpoints.activateContractEndpoint,
748
- activeStory: contractsActiveStoryEndpoint
749
- },
750
- local: {
751
- help: import_valorant_api_types.endpoints.localHelpEndpoint,
752
- sessions: import_valorant_api_types.endpoints.sessionsEndpoint,
753
- rsoUserInfo: import_valorant_api_types.endpoints.rsoUserInfoEndpoint,
754
- clientRegion: import_valorant_api_types.endpoints.clientRegionEndpoint,
755
- accountAlias: import_valorant_api_types.endpoints.accountAliasEndpoint,
756
- entitlementsToken: import_valorant_api_types.endpoints.entitlementsTokenEndpoint,
757
- chatSession: import_valorant_api_types.endpoints.chatSessionEndpoint,
758
- friends: import_valorant_api_types.endpoints.friendsEndpoint,
759
- sendFriendRequest: import_valorant_api_types.endpoints.sendFriendRequestEndpoint,
760
- removeFriendRequest: import_valorant_api_types.endpoints.removeFriendRequestEndpoint,
761
- presence: import_valorant_api_types.endpoints.presenceEndpoint,
762
- friendRequests: import_valorant_api_types.endpoints.friendRequestsEndpoint,
763
- swaggerDocs: import_valorant_api_types.endpoints.localSwaggerDocsEndpoint,
764
- antiAddictionShutdown: localAntiAddictionShutdownEndpoint,
765
- antiAddictionWarning: localAntiAddictionWarningEndpoint,
766
- clientConfig: localClientConfigEndpoint,
767
- eula: localEulaEndpoint,
768
- privacyPolicy: localPrivacyPolicyEndpoint,
769
- availableLocales: localAvailableLocalesEndpoint,
770
- locale: localLocaleEndpoint,
771
- reporterFeedback: localReporterFeedbackEndpoint,
772
- commandLineArgs: localCommandLineArgsEndpoint,
773
- riotStatus: localRiotStatusEndpoint,
774
- riotWarning: localRiotWarningEndpoint,
775
- clientAuthorizations: localClientAuthorizationsEndpoint,
776
- accessToken: localAccessTokenEndpoint,
777
- userInfoToken: localUserInfoTokenEndpoint,
778
- pluginStatus: localPluginStatusEndpoint,
779
- rmsSession: localRmsSessionEndpoint,
780
- processInfo: localProcessInfoEndpoint,
781
- logPath: localLogPathEndpoint,
782
- playerSettings: localPlayerSettingsEndpoint
783
- },
784
- chat: {
785
- partyInfo: import_valorant_api_types.endpoints.partyChatInfoEndpoint,
786
- pregameInfo: import_valorant_api_types.endpoints.pregameChatInfoEndpoint,
787
- currentGameInfo: import_valorant_api_types.endpoints.currentGameChatInfoEndpoint,
788
- allInfo: import_valorant_api_types.endpoints.allChatInfoEndpoint,
789
- participants: import_valorant_api_types.endpoints.chatParticipantsEndpoint,
790
- send: import_valorant_api_types.endpoints.sendChatEndpoint,
791
- history: import_valorant_api_types.endpoints.chatHistoryEndpoint,
792
- settings: chatSettingsEndpoint,
793
- tournamentInfo: chatTournamentInfoEndpoint
794
- },
795
- session: {
796
- get: sessionGetEndpoint,
797
- reconnect: sessionReconnectEndpoint
798
- },
799
- voice: {
800
- audioProperties: voiceAudioPropertiesEndpoint,
801
- captureDevices: voiceCaptureDevicesEndpoint,
802
- renderDevices: voiceRenderDevicesEndpoint,
803
- pushToTalk: voicePushToTalkEndpoint,
804
- sessions: voiceSessionsEndpoint,
805
- settings: voiceSettingsEndpoint
806
- },
807
- auth: {
808
- cookies: import_valorant_api_types.endpoints.authCookiesEndpoint,
809
- request: import_valorant_api_types.endpoints.authRequestEndpoint,
810
- multiFactor: import_valorant_api_types.endpoints.multiFactorAuthenticationEndpoint,
811
- cookieReauth: import_valorant_api_types.endpoints.cookieReauthEndpoint,
812
- entitlement: import_valorant_api_types.endpoints.entitlementEndpoint,
813
- playerInfo: import_valorant_api_types.endpoints.playerInfoEndpoint,
814
- riotGeo: import_valorant_api_types.endpoints.riotGeoEndpoint,
815
- pasToken: import_valorant_api_types.endpoints.pasTokenEndpoint,
816
- riotClientConfig: import_valorant_api_types.endpoints.riotClientConfigEndpoint
817
- },
818
- catalog: catalogEndpoints
2461
+ pvp,
2462
+ party,
2463
+ store,
2464
+ pregame,
2465
+ currentGame,
2466
+ contracts,
2467
+ local,
2468
+ chat,
2469
+ voice,
2470
+ premier,
2471
+ esports,
2472
+ restrictions,
2473
+ account,
2474
+ auth,
2475
+ catalog
819
2476
  };
820
2477
 
821
2478
  // src/auth.ts
822
- var import_valorant_api_types2 = require("valorant-api-types");
2479
+ var import_valorant_api_types19 = require("valorant-api-types");
823
2480
 
824
2481
  // src/errors.ts
825
2482
  var ValorantError = class extends Error {
@@ -948,7 +2605,7 @@ function createAuthFlows(client) {
948
2605
  return toLoginResult(data);
949
2606
  },
950
2607
  async reauthenticate(options) {
951
- const response = await client.send(import_valorant_api_types2.endpoints.cookieReauthEndpoint);
2608
+ const response = await client.send(import_valorant_api_types19.endpoints.cookieReauthEndpoint);
952
2609
  const tokens = parseAuthRedirect(response.headers.get("location") ?? "");
953
2610
  if (tokens === void 0) throw new ValorantError("Cookie reauthentication failed: the session cookies are missing or expired, log in again");
954
2611
  applyTokens(tokens);
@@ -980,7 +2637,7 @@ function createAuthFlows(client) {
980
2637
  }
981
2638
 
982
2639
  // src/context.ts
983
- var DEFAULT_PLATFORM = btoa(JSON.stringify({
2640
+ var DEFAULT_PLATFORM = toBase64(JSON.stringify({
984
2641
  platformType: "PC",
985
2642
  platformOS: "Windows",
986
2643
  platformOSVersion: "10.0.19042.1.256.64bit",
@@ -1139,6 +2796,258 @@ var localTransport = async (request) => {
1139
2796
  });
1140
2797
  };
1141
2798
 
2799
+ // src/internal/body.ts
2800
+ var import_zod20 = require("zod");
2801
+ function parseBody(text2) {
2802
+ if (text2 === "") return void 0;
2803
+ try {
2804
+ return JSON.parse(text2);
2805
+ } catch {
2806
+ return text2;
2807
+ }
2808
+ }
2809
+ function safeParse(schema, data) {
2810
+ try {
2811
+ return schema.safeParse(data);
2812
+ } catch (thrown) {
2813
+ if (thrown instanceof import_zod20.ZodError) return { success: false, error: thrown };
2814
+ const message = thrown instanceof Error ? thrown.message : String(thrown);
2815
+ return { success: false, error: new import_zod20.ZodError([{ code: "custom", path: [], message: `Schema transform threw: ${message}` }]) };
2816
+ }
2817
+ }
2818
+
2819
+ // src/internal/cookies.ts
2820
+ function storeCookies(context, setCookies) {
2821
+ for (const line of setCookies) {
2822
+ const [pair = "", ...attributes] = line.split(";").map((part) => part.trim());
2823
+ const separator = pair.indexOf("=");
2824
+ if (separator <= 0) continue;
2825
+ const name = pair.slice(0, separator);
2826
+ const value = pair.slice(separator + 1);
2827
+ const expired = value === "" || attributes.some((a) => a.toLowerCase() === "max-age=0");
2828
+ context.setCookie(name, expired ? void 0 : value);
2829
+ }
2830
+ }
2831
+
2832
+ // src/internal/retry.ts
2833
+ var RETRYABLE_STATUS = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
2834
+ var IDEMPOTENT = /* @__PURE__ */ new Set(["GET", "HEAD", "PUT", "DELETE"]);
2835
+ function isIdempotent(method) {
2836
+ return IDEMPOTENT.has(method);
2837
+ }
2838
+ function isRetryableStatus(status, method) {
2839
+ return RETRYABLE_STATUS.has(status) && (status === 429 || isIdempotent(method));
2840
+ }
2841
+ function parseRetryAfter(value) {
2842
+ if (value === null) return void 0;
2843
+ const seconds = Number(value);
2844
+ if (Number.isFinite(seconds)) return seconds * 1e3;
2845
+ const date = Date.parse(value);
2846
+ return Number.isNaN(date) ? void 0 : Math.max(0, date - Date.now());
2847
+ }
2848
+ function backoff(attempt, retry) {
2849
+ const base = retry?.baseDelayMs ?? 500;
2850
+ const max = retry?.maxDelayMs ?? 8e3;
2851
+ return Math.min(max, base * 2 ** attempt) * (0.5 + Math.random() / 2);
2852
+ }
2853
+ function sleep(ms, signal) {
2854
+ return new Promise((resolve) => {
2855
+ const timer = setTimeout(done, ms);
2856
+ signal?.addEventListener("abort", done, { once: true });
2857
+ function done() {
2858
+ clearTimeout(timer);
2859
+ signal?.removeEventListener("abort", done);
2860
+ resolve();
2861
+ }
2862
+ });
2863
+ }
2864
+
2865
+ // src/internal/failure.ts
2866
+ function toApiError(endpoint2, request, response) {
2867
+ const body = parseBody(response.text);
2868
+ const args = [response.status, endpoint2.name, request.url, body, response.headers];
2869
+ if (response.status === 429) return new ValorantRateLimitError(...args, parseRetryAfter(response.headers.get("retry-after")));
2870
+ const needsToken = endpoint2.riotRequirements?.token === true;
2871
+ const badClaims = typeof body === "object" && body !== null && body.errorCode === "BAD_CLAIMS";
2872
+ if (needsToken && (response.status === 401 || response.status === 400 && badClaims)) return new ValorantAuthError(...args);
2873
+ return new ValorantApiError(...args);
2874
+ }
2875
+
2876
+ // src/internal/normalize.ts
2877
+ var import_zod21 = require("zod");
2878
+ var cache = /* @__PURE__ */ new WeakMap();
2879
+ var children = {
2880
+ ZodObject: (def, map) => {
2881
+ const shape = def["shape"]();
2882
+ return { ...def, shape: () => Object.fromEntries(Object.entries(shape).map(([key, value]) => [key, map(value)])) };
2883
+ },
2884
+ ZodArray: (def, map) => ({ ...def, type: map(def["type"]) }),
2885
+ ZodOptional: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
2886
+ ZodNullable: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
2887
+ ZodDefault: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
2888
+ ZodCatch: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
2889
+ ZodReadonly: (def, map) => ({ ...def, innerType: map(def["innerType"]) }),
2890
+ ZodBranded: (def, map) => ({ ...def, type: map(def["type"]) }),
2891
+ ZodEffects: (def, map) => ({ ...def, schema: map(def["schema"]) }),
2892
+ ZodUnion: (def, map) => ({ ...def, options: def["options"].map(map) }),
2893
+ ZodIntersection: (def, map) => ({ ...def, left: map(def["left"]), right: map(def["right"]) }),
2894
+ ZodRecord: (def, map) => ({ ...def, keyType: map(def["keyType"]), valueType: map(def["valueType"]) }),
2895
+ ZodTuple: (def, map) => ({ ...def, items: def["items"].map(map) }),
2896
+ ZodDiscriminatedUnion: (def, map) => {
2897
+ const optionsMap = new Map([...def["optionsMap"]].map(([key, option]) => [key, map(option)]));
2898
+ return { ...def, options: [...optionsMap.values()], optionsMap };
2899
+ }
2900
+ };
2901
+ function lenientPc(literal) {
2902
+ return import_zod21.z.preprocess((value) => typeof value === "string" ? value.toUpperCase() : value, literal);
2903
+ }
2904
+ function normalizePlatformLiterals(schema) {
2905
+ const known = cache.get(schema);
2906
+ if (known) return known;
2907
+ const def = schema._def;
2908
+ let result = schema;
2909
+ if (def.typeName === "ZodLiteral" && def["value"] === "PC") {
2910
+ result = lenientPc(schema);
2911
+ } else if (def.typeName === "ZodLazy") {
2912
+ const getter = def["getter"];
2913
+ result = new schema.constructor({ ...def, getter: () => normalizePlatformLiterals(getter()) });
2914
+ } else if (def.typeName && children[def.typeName]) {
2915
+ const Type = schema.constructor;
2916
+ result = new Type(children[def.typeName](def, normalizePlatformLiterals));
2917
+ }
2918
+ cache.set(schema, result);
2919
+ return result;
2920
+ }
2921
+
2922
+ // src/lobby/mappings.ts
2923
+ var CustomGameTeam = {
2924
+ Defenders: "TeamOne",
2925
+ Attackers: "TeamTwo",
2926
+ Spectators: "TeamSpectate",
2927
+ DefenderCoaches: "TeamOneCoaches",
2928
+ AttackerCoaches: "TeamTwoCoaches"
2929
+ };
2930
+ var MEMBERSHIP_KEY = {
2931
+ TeamOne: "teamOne",
2932
+ TeamTwo: "teamTwo",
2933
+ TeamSpectate: "teamSpectate",
2934
+ TeamOneCoaches: "teamOneCoaches",
2935
+ TeamTwoCoaches: "teamTwoCoaches"
2936
+ };
2937
+ var CustomGameMap = {
2938
+ Ascent: "/Game/Maps/Ascent/Ascent",
2939
+ Split: "/Game/Maps/Bonsai/Bonsai",
2940
+ Fracture: "/Game/Maps/Canyon/Canyon",
2941
+ Bind: "/Game/Maps/Duality/Duality",
2942
+ Breeze: "/Game/Maps/Foxtrot/Foxtrot",
2943
+ Abyss: "/Game/Maps/Infinity/Infinity",
2944
+ Lotus: "/Game/Maps/Jam/Jam",
2945
+ Sunset: "/Game/Maps/Juliett/Juliett",
2946
+ Pearl: "/Game/Maps/Pitt/Pitt",
2947
+ Summit: "/Game/Maps/Plummet/Plummet",
2948
+ Icebox: "/Game/Maps/Port/Port",
2949
+ Corrode: "/Game/Maps/Rook/Rook",
2950
+ Haven: "/Game/Maps/Triad/Triad"
2951
+ };
2952
+ var CustomGameMode = {
2953
+ Standard: "/Game/GameModes/Bomb/BombGameMode.BombGameMode_C",
2954
+ SpikeRush: "/Game/GameModes/QuickBomb/QuickBombGameMode.QuickBombGameMode_C",
2955
+ Deathmatch: "/Game/GameModes/Deathmatch/DeathmatchGameMode.DeathmatchGameMode_C",
2956
+ Escalation: "/Game/GameModes/GunGame/GunGameTeamsGameMode.GunGameTeamsGameMode_C",
2957
+ Skirmish: "/Game/GameModes/Skirmish/SkirmishGameMode.SkirmishGameMode_C"
2958
+ };
2959
+ var RULE_KEY = {
2960
+ allowGameModifiers: "AllowGameModifiers",
2961
+ playOutAllRounds: "PlayOutAllRounds",
2962
+ skipMatchHistory: "SkipMatchHistory",
2963
+ tournamentMode: "TournamentMode",
2964
+ overtimeWinByTwo: "IsOvertimeWinByTwo"
2965
+ };
2966
+ function reverse(table) {
2967
+ return new Map(Object.entries(table).map(([name, value]) => [value, name]));
2968
+ }
2969
+ var mapNames = reverse(CustomGameMap);
2970
+ var modeNames = reverse(CustomGameMode);
2971
+ function customGameMapName(path) {
2972
+ return mapNames.get(path);
2973
+ }
2974
+ function customGameModeName(path) {
2975
+ return modeNames.get(path);
2976
+ }
2977
+ function teamOfPlayer(membership, puuid) {
2978
+ for (const team of Object.values(CustomGameTeam)) {
2979
+ if (membership[MEMBERSHIP_KEY[team]]?.some((member) => member.Subject === puuid)) return team;
2980
+ }
2981
+ return void 0;
2982
+ }
2983
+
2984
+ // src/lobby/flows.ts
2985
+ var DEFAULT_RULES = {
2986
+ AllowGameModifiers: "false",
2987
+ PlayOutAllRounds: "false",
2988
+ SkipMatchHistory: "false",
2989
+ TournamentMode: "false",
2990
+ IsOvertimeWinByTwo: "false"
2991
+ };
2992
+ function ruleStrings(rules) {
2993
+ const out = {};
2994
+ for (const [name, key] of Object.entries(RULE_KEY)) {
2995
+ const value = rules?.[name];
2996
+ if (value !== void 0) out[key] = value ? "true" : "false";
2997
+ }
2998
+ return out;
2999
+ }
3000
+ function currentRules(gameRules) {
3001
+ const out = {};
3002
+ for (const key of Object.keys(DEFAULT_RULES)) {
3003
+ const value = gameRules?.[key];
3004
+ if (value === "true" || value === "false") out[key] = value;
3005
+ }
3006
+ return out;
3007
+ }
3008
+ function createPartyFlows(client) {
3009
+ async function partyIdOf(target) {
3010
+ if (target.partyId !== void 0) return target.partyId;
3011
+ return (await client.party.player({ validation: "off" })).CurrentPartyID;
3012
+ }
3013
+ return {
3014
+ async assignToTeam(team, options = {}) {
3015
+ const partyId = await partyIdOf(options);
3016
+ const puuid = options.puuid ?? client.context.require("puuid");
3017
+ return client.party.setCustomGameTeam({ params: { partyId, team }, body: { playerToPutOnTeam: puuid } });
3018
+ },
3019
+ async configureLobby(options) {
3020
+ const partyId = await partyIdOf(options);
3021
+ const { Settings: current } = (await client.party.getCustomGame({ params: { partyId }, validation: "off" })).CustomGameData;
3022
+ await client.party.setCustomGameSettings({
3023
+ params: { partyId },
3024
+ validation: "off",
3025
+ body: {
3026
+ Map: options.map ?? current.Map,
3027
+ Mode: options.mode ?? current.Mode,
3028
+ UseBots: current.UseBots,
3029
+ GamePod: options.gamePod ?? current.GamePod,
3030
+ GameRules: { ...DEFAULT_RULES, ...currentRules(current.GameRules), ...ruleStrings(options.rules) }
3031
+ }
3032
+ });
3033
+ return (await client.party.getCustomGame({ params: { partyId } })).CustomGameData.Settings;
3034
+ }
3035
+ };
3036
+ }
3037
+
3038
+ // src/internal/gamelog.ts
3039
+ var VERSION_LINE = /CI server version: (release-[\w.]+-shipping-\d+-\d+)/;
3040
+ async function readInstalledClientVersion(logPath) {
3041
+ const { readFile } = await import("fs/promises");
3042
+ const { join } = await import("path");
3043
+ const file = logPath ?? join(process.env["LOCALAPPDATA"] ?? "", "VALORANT", "Saved", "Logs", "ShooterGame.log");
3044
+ try {
3045
+ return VERSION_LINE.exec(await readFile(file, "latin1"))?.[1];
3046
+ } catch {
3047
+ return void 0;
3048
+ }
3049
+ }
3050
+
1142
3051
  // src/local.ts
1143
3052
  function parseLockfile(content) {
1144
3053
  const [name, pid, port, password, protocol] = content.trim().split(":");
@@ -1166,7 +3075,6 @@ function createLocalFlows(client) {
1166
3075
  const sessions = await client.local.sessions();
1167
3076
  const valorant = Object.values(sessions).find((session) => session.productId === "valorant");
1168
3077
  if (valorant) {
1169
- ctx.set("clientVersion", valorant.version);
1170
3078
  const region = launchArgument(valorant.launchConfiguration.arguments, "ares-deployment");
1171
3079
  if (region !== void 0 && isRegion(region)) ctx.update({ region, shard: shardForRegion(region) });
1172
3080
  }
@@ -1175,9 +3083,9 @@ function createLocalFlows(client) {
1175
3083
  const affinity = Object.values(info.affinity ?? {}).find(isRegion);
1176
3084
  if (affinity !== void 0) ctx.applyAffinity(affinity);
1177
3085
  }
1178
- if (!ctx.has("clientVersion") && options?.fetchClientVersion !== false) {
1179
- await client.auth.fetchClientVersion().catch(() => void 0);
1180
- }
3086
+ const installed = await readInstalledClientVersion(options?.gameLogPath);
3087
+ if (installed !== void 0) ctx.set("clientVersion", installed);
3088
+ else if (options?.fetchClientVersion !== false) await client.auth.fetchClientVersion().catch(() => void 0);
1181
3089
  },
1182
3090
  async events() {
1183
3091
  return openEventStream(ctx);
@@ -1196,7 +3104,7 @@ async function openEventStream(ctx) {
1196
3104
  throw new ValorantError('The local event stream needs the optional "ws" package: npm install ws', { cause });
1197
3105
  }
1198
3106
  const socket = new WebSocket(`wss://127.0.0.1:${ctx.require("localPort")}`, {
1199
- headers: { Authorization: `Basic ${btoa(`riot:${ctx.require("localPassword")}`)}` },
3107
+ headers: { Authorization: basicAuth("riot", ctx.require("localPassword")) },
1200
3108
  rejectUnauthorized: false
1201
3109
  });
1202
3110
  const listeners = /* @__PURE__ */ new Set();
@@ -1222,8 +3130,20 @@ async function openEventStream(ctx) {
1222
3130
  };
1223
3131
  }
1224
3132
 
3133
+ // src/pregame/flows.ts
3134
+ function createPregameFlows(client) {
3135
+ return {
3136
+ async pickAgent(agent, options = {}) {
3137
+ const preGameMatchId = options.matchId ?? (await client.pregame.player({ validation: "off" })).MatchID;
3138
+ const params = { preGameMatchId, agentId: agent };
3139
+ const selected = await client.pregame.selectCharacter({ params });
3140
+ return options.lock ? client.pregame.lockCharacter({ params }) : selected;
3141
+ }
3142
+ };
3143
+ }
3144
+
1225
3145
  // src/request.ts
1226
- var import_valorant_api_types3 = require("valorant-api-types");
3146
+ var import_valorant_api_types20 = require("valorant-api-types");
1227
3147
 
1228
3148
  // src/types.ts
1229
3149
  function paramName(variable) {
@@ -1250,11 +3170,11 @@ function resolveBase(endpoint2, ctx) {
1250
3170
  switch (endpoint2.type) {
1251
3171
  case "pd":
1252
3172
  case "shared":
1253
- return (0, import_valorant_api_types3.typeToPrefix)({ type: endpoint2.type, shard: ctx.require("shard") });
3173
+ return (0, import_valorant_api_types20.typeToPrefix)({ type: endpoint2.type, shard: ctx.require("shard") });
1254
3174
  case "glz":
1255
- return (0, import_valorant_api_types3.typeToPrefix)({ type: "glz", shard: ctx.require("shard"), region: ctx.require("region") });
3175
+ return (0, import_valorant_api_types20.typeToPrefix)({ type: "glz", shard: ctx.require("shard"), region: ctx.require("region") });
1256
3176
  case "local":
1257
- return (0, import_valorant_api_types3.typeToPrefix)({ type: "local", port: ctx.require("localPort") });
3177
+ return (0, import_valorant_api_types20.typeToPrefix)({ type: "local", port: ctx.require("localPort") });
1258
3178
  case "other":
1259
3179
  return "";
1260
3180
  }
@@ -1275,7 +3195,7 @@ function resolveHeaders(endpoint2, input, ctx, url) {
1275
3195
  const userAgent = ctx.get("userAgent");
1276
3196
  if (userAgent) headers["User-Agent"] = userAgent;
1277
3197
  if (need.token) headers["Authorization"] = `Bearer ${ctx.require("accessToken")}`;
1278
- if (need.localAuth) headers["Authorization"] = `Basic ${btoa(`riot:${ctx.require("localPassword")}`)}`;
3198
+ if (need.localAuth) headers["Authorization"] = basicAuth("riot", ctx.require("localPassword"));
1279
3199
  if (need.entitlement) headers["X-Riot-Entitlements-JWT"] = ctx.require("entitlementToken");
1280
3200
  if (need.clientVersion) headers["X-Riot-ClientVersion"] = ctx.require("clientVersion");
1281
3201
  if (need.clientPlatform) headers["X-Riot-ClientPlatform"] = ctx.require("clientPlatform");
@@ -1304,8 +3224,6 @@ function buildRequest(endpoint2, input, ctx) {
1304
3224
  }
1305
3225
 
1306
3226
  // src/client.ts
1307
- var RETRYABLE_STATUS = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
1308
- var IDEMPOTENT = /* @__PURE__ */ new Set(["GET", "HEAD", "PUT", "DELETE"]);
1309
3227
  var ValorantClient = class {
1310
3228
  context;
1311
3229
  #options;
@@ -1321,7 +3239,7 @@ var ValorantClient = class {
1321
3239
  const input = options;
1322
3240
  const validation = input.validation ?? this.#options.validation ?? "loose";
1323
3241
  if (validation === "strict" && endpoint2.body !== void 0 && input.body !== void 0) {
1324
- const parsed = endpoint2.body.safeParse(input.body);
3242
+ const parsed = normalizePlatformLiterals(endpoint2.body).safeParse(input.body);
1325
3243
  if (!parsed.success) throw new ValorantValidationError("request", endpoint2.name, parsed.error, input.body);
1326
3244
  }
1327
3245
  const retry = this.#options.retry === false ? void 0 : this.#options.retry ?? {};
@@ -1334,13 +3252,13 @@ var ValorantClient = class {
1334
3252
  try {
1335
3253
  response = await this.#transportFor(endpoint2)({ ...request, signal: this.#signal(input) });
1336
3254
  } catch (cause) {
1337
- if (canRetry && IDEMPOTENT.has(request.method) && input.signal?.aborted !== true) {
3255
+ if (canRetry && isIdempotent(request.method) && input.signal?.aborted !== true) {
1338
3256
  await sleep(backoff(attempt, retry), input.signal);
1339
3257
  continue;
1340
3258
  }
1341
3259
  throw new ValorantNetworkError(`${endpoint2.name} could not reach ${new URL(request.url).host}`, request.url, { cause });
1342
3260
  }
1343
- if (isAuthHost(request.url)) this.#storeCookies(response.setCookies);
3261
+ if (isAuthHost(request.url)) storeCookies(this.context, response.setCookies);
1344
3262
  this.#options.logger?.debug?.(`${request.method} ${request.url} -> ${response.status}`);
1345
3263
  if (response.status < 400) {
1346
3264
  return {
@@ -1349,13 +3267,13 @@ var ValorantClient = class {
1349
3267
  data: this.#parseResponse(endpoint2, response, validation)
1350
3268
  };
1351
3269
  }
1352
- const error = this.#toError(endpoint2, request, response);
3270
+ const error = toApiError(endpoint2, request, response);
1353
3271
  if (error instanceof ValorantAuthError && this.#options.refreshTokens && !refreshed) {
1354
3272
  refreshed = true;
1355
3273
  await this.#refreshOnce();
1356
3274
  continue;
1357
3275
  }
1358
- if (canRetry && RETRYABLE_STATUS.has(response.status) && (response.status === 429 || IDEMPOTENT.has(request.method))) {
3276
+ if (canRetry && isRetryableStatus(response.status, request.method)) {
1359
3277
  const retryAfter = error instanceof ValorantRateLimitError ? error.retryAfterMs : void 0;
1360
3278
  await sleep(retryAfter ?? backoff(attempt, retry), input.signal);
1361
3279
  continue;
@@ -1373,6 +3291,8 @@ var ValorantClient = class {
1373
3291
  }
1374
3292
  Object.assign(api["auth"], createAuthFlows(this));
1375
3293
  Object.assign(api["local"], createLocalFlows(this));
3294
+ Object.assign(api["party"], createPartyFlows(this));
3295
+ Object.assign(api["pregame"], createPregameFlows(this));
1376
3296
  return api;
1377
3297
  }
1378
3298
  #transportFor(endpoint2) {
@@ -1387,20 +3307,10 @@ var ValorantClient = class {
1387
3307
  const timeout = AbortSignal.timeout(input.timeoutMs ?? this.#options.timeoutMs ?? 15e3);
1388
3308
  return input.signal ? AbortSignal.any([input.signal, timeout]) : timeout;
1389
3309
  }
1390
- #storeCookies(setCookies) {
1391
- for (const line of setCookies) {
1392
- const [pair = "", ...attributes] = line.split(";").map((part) => part.trim());
1393
- const separator = pair.indexOf("=");
1394
- if (separator <= 0) continue;
1395
- const name = pair.slice(0, separator);
1396
- const value = pair.slice(separator + 1);
1397
- const expired = value === "" || attributes.some((a) => a.toLowerCase() === "max-age=0");
1398
- this.context.setCookie(name, expired ? void 0 : value);
1399
- }
1400
- }
1401
3310
  #parseResponse(endpoint2, response, validation) {
1402
3311
  const data = unwrapEnvelope(endpoint2, parseBody(response.text));
1403
- const schema = endpoint2.responses?.[String(response.status)];
3312
+ const published = endpoint2.responses?.[String(response.status)];
3313
+ const schema = published && normalizePlatformLiterals(published);
1404
3314
  if (schema === void 0 || validation === "off") return data;
1405
3315
  const parsed = safeParse(schema, data);
1406
3316
  if (parsed.success) return parsed.data;
@@ -1411,15 +3321,6 @@ var ValorantClient = class {
1411
3321
  }
1412
3322
  return data;
1413
3323
  }
1414
- #toError(endpoint2, request, response) {
1415
- const body = parseBody(response.text);
1416
- const args = [response.status, endpoint2.name, request.url, body, response.headers];
1417
- if (response.status === 429) return new ValorantRateLimitError(...args, parseRetryAfter(response.headers.get("retry-after")));
1418
- const needsToken = endpoint2.riotRequirements?.token === true;
1419
- const badClaims = typeof body === "object" && body !== null && body.errorCode === "BAD_CLAIMS";
1420
- if (needsToken && (response.status === 401 || response.status === 400 && badClaims)) return new ValorantAuthError(...args);
1421
- return new ValorantApiError(...args);
1422
- }
1423
3324
  #refreshOnce() {
1424
3325
  this.#refreshing ??= Promise.resolve(this.#options.refreshTokens(this)).finally(() => {
1425
3326
  this.#refreshing = void 0;
@@ -1427,51 +3328,54 @@ var ValorantClient = class {
1427
3328
  return this.#refreshing;
1428
3329
  }
1429
3330
  };
1430
- function safeParse(schema, data) {
1431
- try {
1432
- return schema.safeParse(data);
1433
- } catch (thrown) {
1434
- if (thrown instanceof import_zod4.ZodError) return { success: false, error: thrown };
1435
- const message = thrown instanceof Error ? thrown.message : String(thrown);
1436
- return { success: false, error: new import_zod4.ZodError([{ code: "custom", path: [], message: `Schema transform threw: ${message}` }]) };
1437
- }
1438
- }
1439
- function parseBody(text2) {
1440
- if (text2 === "") return void 0;
1441
- try {
1442
- return JSON.parse(text2);
1443
- } catch {
1444
- return text2;
1445
- }
1446
- }
1447
- function parseRetryAfter(value) {
1448
- if (value === null) return void 0;
1449
- const seconds = Number(value);
1450
- if (Number.isFinite(seconds)) return seconds * 1e3;
1451
- const date = Date.parse(value);
1452
- return Number.isNaN(date) ? void 0 : Math.max(0, date - Date.now());
1453
- }
1454
- function backoff(attempt, retry) {
1455
- const base = retry?.baseDelayMs ?? 500;
1456
- const max = retry?.maxDelayMs ?? 8e3;
1457
- return Math.min(max, base * 2 ** attempt) * (0.5 + Math.random() / 2);
1458
- }
1459
- function sleep(ms, signal) {
1460
- return new Promise((resolve) => {
1461
- const timer = setTimeout(done, ms);
1462
- signal?.addEventListener("abort", done, { once: true });
1463
- function done() {
1464
- clearTimeout(timer);
1465
- signal?.removeEventListener("abort", done);
1466
- resolve();
1467
- }
1468
- });
3331
+
3332
+ // src/pregame/agents.ts
3333
+ var Agent = {
3334
+ Astra: "41fb69c1-4189-7b37-f117-bcaf1e96f1bf",
3335
+ Breach: "5f8d3a7f-467b-97f3-062c-13acf203c006",
3336
+ Brimstone: "9f0d8ba9-4140-b941-57d3-a7ad57c6b417",
3337
+ Chamber: "22697a3d-45bf-8dd7-4fec-84a9e28c69d7",
3338
+ Clove: "1dbf2edd-4729-0984-3115-daa5eed44993",
3339
+ Cypher: "117ed9e3-49f3-6512-3ccf-0cada7e3823b",
3340
+ Deadlock: "cc8b64c8-4b25-4ff9-6e7f-37b4da43d235",
3341
+ Fade: "dade69b4-4f5a-8528-247b-219e5a1facd6",
3342
+ Gekko: "e370fa57-4757-3604-3648-499e1f642d3f",
3343
+ Harbor: "95b78ed7-4637-86d9-7e41-71ba8c293152",
3344
+ Hush: "ddd5a15c-4fbe-42fa-3789-11a55ca5ee04",
3345
+ Iso: "0e38b510-41a8-5780-5e8f-568b2a4f2d6c",
3346
+ Jett: "add6443a-41bd-e414-f6ad-e58d267f4e95",
3347
+ KayO: "601dbbe7-43ce-be57-2a40-4abd24953621",
3348
+ Killjoy: "1e58de9c-4950-5125-93e9-a0aee9f98746",
3349
+ Miks: "7c8a4701-4de6-9355-b254-e09bc2a34b72",
3350
+ Neon: "bb2a4828-46eb-8cd1-e765-15848195d751",
3351
+ Omen: "8e253930-4c05-31dd-1b6c-968525494517",
3352
+ Phoenix: "eb93336a-449b-9c1b-0a54-a891f7921d69",
3353
+ Raze: "f94c3b30-42be-e959-889c-5aa313dba261",
3354
+ Reyna: "a3bfb853-43b2-7238-a4f1-ad90e9e46bcc",
3355
+ Sage: "569fdd95-4d10-43ab-ca70-79becc718b46",
3356
+ Skye: "6f2a04ca-43e0-be17-7f36-b3908627744d",
3357
+ Sova: "320b2a48-4d9b-a075-30f1-1f93a9b638fa",
3358
+ Tejo: "b444168c-4e35-8076-db47-ef9bf368f384",
3359
+ Veto: "92eeef5d-43b5-1d4a-8d03-b3927a09034b",
3360
+ Viper: "707eab51-4836-f488-046a-cda6bf494859",
3361
+ Vyse: "efba5359-4016-a1e5-7626-b1ae76895940",
3362
+ Waylay: "df1cb487-4902-002e-5c17-d28e83e78588",
3363
+ Yoru: "7f94d92c-4234-0a36-9646-3a87eb8b5c89"
3364
+ };
3365
+ var names = new Map(Object.entries(Agent).map(([name, id]) => [id, name]));
3366
+ function agentName(id) {
3367
+ return names.get(id);
1469
3368
  }
1470
3369
 
1471
3370
  // src/index.ts
1472
3371
  __reExport(index_exports, require("valorant-api-types"), module.exports);
1473
3372
  // Annotate the CommonJS export names for ESM import in node:
1474
3373
  0 && (module.exports = {
3374
+ Agent,
3375
+ CustomGameMap,
3376
+ CustomGameMode,
3377
+ CustomGameTeam,
3378
+ MEMBERSHIP_KEY,
1475
3379
  MissingContextError,
1476
3380
  MissingParameterError,
1477
3381
  ValorantApiError,
@@ -1482,6 +3386,9 @@ __reExport(index_exports, require("valorant-api-types"), module.exports);
1482
3386
  ValorantNetworkError,
1483
3387
  ValorantRateLimitError,
1484
3388
  ValorantValidationError,
3389
+ agentName,
3390
+ customGameMapName,
3391
+ customGameModeName,
1485
3392
  fetchTransport,
1486
3393
  isRegion,
1487
3394
  localTransport,
@@ -1490,6 +3397,7 @@ __reExport(index_exports, require("valorant-api-types"), module.exports);
1490
3397
  readLockfile,
1491
3398
  registry,
1492
3399
  shardForRegion,
3400
+ teamOfPlayer,
1493
3401
  ...require("valorant-api-types")
1494
3402
  });
1495
3403
  //# sourceMappingURL=index.cjs.map