@voxary/valorant-client 0.1.0 → 0.2.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.js CHANGED
@@ -1,771 +1,1886 @@
1
- // src/client.ts
2
- import { ZodError } from "zod";
3
-
4
- // src/api/registry.ts
1
+ // src/api/groups/pvp.ts
5
2
  import { endpoints as e } from "valorant-api-types";
6
3
 
7
- // src/extra/catalog.ts
4
+ // src/endpoints/riot/account.ts
8
5
  import { z } from "zod";
9
6
 
10
- // src/envelope.ts
11
- var enveloped = /* @__PURE__ */ new WeakSet();
12
- function markEnveloped(endpoint2) {
13
- enveloped.add(endpoint2);
14
- return endpoint2;
15
- }
16
- function unwrapEnvelope(endpoint2, body) {
17
- if (enveloped.has(endpoint2) && typeof body === "object" && body !== null && "data" in body) {
18
- return body.data;
19
- }
20
- return body;
21
- }
7
+ // src/endpoints/riot/shared.ts
8
+ var player = { token: true, entitlement: true, clientVersion: true, clientPlatform: true };
22
9
 
23
- // src/extra/catalog.ts
24
- var BASE = "https://valorant-api.com/v1/";
25
- var text = z.string().nullish();
26
- var asset = z.object({
27
- uuid: z.string(),
28
- displayName: text,
29
- displayIcon: text,
30
- assetPath: text
31
- }).passthrough();
32
- var agentSchema = asset.extend({
33
- description: text,
34
- developerName: text,
35
- characterTags: z.array(z.string()).nullish(),
36
- displayIconSmall: text,
37
- bustPortrait: text,
38
- fullPortrait: text,
39
- killfeedPortrait: text,
40
- background: text,
41
- isPlayableCharacter: z.boolean(),
42
- role: z.object({ uuid: z.string(), displayName: text, description: text, displayIcon: text }).passthrough().nullish(),
43
- abilities: z.array(z.object({ slot: z.string(), displayName: text, description: text, displayIcon: text }).passthrough()).nullish()
44
- });
45
- var mapSchema = asset.extend({
46
- coordinates: text,
47
- listViewIcon: text,
48
- splash: text,
49
- mapUrl: text,
50
- xMultiplier: z.number(),
51
- yMultiplier: z.number(),
52
- xScalarToAdd: z.number(),
53
- yScalarToAdd: z.number(),
54
- callouts: z.array(z.object({ regionName: z.string(), superRegionName: z.string(), location: z.object({ x: z.number(), y: z.number() }) }).passthrough()).nullish()
55
- });
56
- var weaponSchema = asset.extend({
57
- category: z.string(),
58
- defaultSkinUuid: z.string(),
59
- killStreamIcon: text,
60
- weaponStats: z.object({}).passthrough().nullish(),
61
- shopData: z.object({}).passthrough().nullish(),
62
- skins: z.array(z.object({}).passthrough())
63
- });
64
- var skinSchema = asset.extend({
65
- themeUuid: z.string(),
66
- contentTierUuid: text,
67
- wallpaper: text,
68
- chromas: z.array(asset.passthrough()),
69
- levels: z.array(asset.passthrough())
70
- });
71
- var seasonSchema = z.object({
72
- uuid: z.string(),
73
- displayName: text,
74
- type: text,
75
- startTime: z.string(),
76
- endTime: z.string(),
77
- parentUuid: text,
78
- assetPath: text
79
- }).passthrough();
80
- var versionSchema = z.object({
81
- manifestId: z.string(),
82
- branch: z.string(),
83
- version: z.string(),
84
- buildVersion: z.string(),
85
- engineVersion: z.string(),
86
- riotClientVersion: z.string().describe("Value of the X-Riot-ClientVersion header"),
87
- riotClientBuild: z.string(),
88
- buildDate: z.string()
89
- }).passthrough();
90
- function query(extra = []) {
91
- return new Map([
92
- ["language", z.string().optional().describe("Language code such as `fr-FR`. Defaults to `en-US`.")],
93
- ...extra
94
- ]);
95
- }
96
- function endpoint(name, description, path, schema, extra = []) {
97
- return markEnveloped({
98
- name,
99
- description,
100
- category: "Valorant-API.com",
101
- type: "other",
102
- suffix: `${BASE}${path}`,
103
- query: query(extra),
104
- responses: { "200": schema }
105
- });
106
- }
107
- function collection(title, singular, path, schema, extra = []) {
108
- return {
109
- list: endpoint(title, `List of ${title.toLowerCase()}`, path, z.array(schema), extra),
110
- one: endpoint(singular, `One ${singular.toLowerCase()} by UUID`, `${path}/{uuid}`, schema)
111
- };
112
- }
113
- var playable = [["isPlayableCharacter", z.boolean().optional().describe("Only return playable agents. Skips the duplicate Sova.")]];
114
- var agents = collection("Agents", "Agent", "agents", agentSchema, playable);
115
- var buddies = collection("Buddies", "Buddy", "buddies", asset);
116
- var buddyLevels = collection("Buddy Levels", "Buddy Level", "buddies/levels", asset);
117
- var bundles = collection("Bundles", "Bundle", "bundles", asset);
118
- var ceremonies = collection("Ceremonies", "Ceremony", "ceremonies", asset);
119
- var competitiveTiers = collection("Competitive Tiers", "Competitive Tier Set", "competitivetiers", z.object({ uuid: z.string(), tiers: z.array(z.object({ tier: z.number(), tierName: text, division: text, color: text }).passthrough()) }).passthrough());
120
- var contentTiers = collection("Content Tiers", "Content Tier", "contenttiers", asset);
121
- var contracts = collection("Contracts", "Contract", "contracts", asset);
122
- var currencies = collection("Currencies", "Currency", "currencies", asset);
123
- var events = collection("Events", "Event", "events", asset);
124
- var flex = collection("Flex", "Flex Item", "flex", asset);
125
- var gamemodes = collection("Gamemodes", "Gamemode", "gamemodes", asset);
126
- var gamemodeEquippables = collection("Gamemode Equippables", "Gamemode Equippable", "gamemodes/equippables", asset);
127
- var gear = collection("Gear", "Gear Item", "gear", asset);
128
- var levelBorders = collection("Level Borders", "Level Border", "levelborders", asset);
129
- var maps = collection("Maps", "Map", "maps", mapSchema);
130
- var missions = collection("Missions", "Mission", "missions", z.object({ uuid: z.string(), displayName: text }).passthrough());
131
- var playerCards = collection("Player Cards", "Player Card", "playercards", asset);
132
- var playerTitles = collection("Player Titles", "Player Title", "playertitles", z.object({ uuid: z.string(), displayName: text, titleText: text }).passthrough());
133
- var seasons = collection("Seasons", "Season", "seasons", seasonSchema);
134
- var competitiveSeasons = collection("Competitive Seasons", "Competitive Season", "seasons/competitive", z.object({ uuid: z.string(), seasonUuid: z.string(), startTime: z.string(), endTime: z.string() }).passthrough());
135
- var sprays = collection("Sprays", "Spray", "sprays", asset);
136
- var sprayLevels = collection("Spray Levels", "Spray Level", "sprays/levels", asset);
137
- var themes = collection("Themes", "Theme", "themes", asset);
138
- var weapons = collection("Weapons", "Weapon", "weapons", weaponSchema);
139
- var weaponSkins = collection("Weapon Skins", "Weapon Skin", "weapons/skins", skinSchema);
140
- var weaponSkinChromas = collection("Weapon Skin Chromas", "Weapon Skin Chroma", "weapons/skinchromas", asset);
141
- var weaponSkinLevels = collection("Weapon Skin Levels", "Weapon Skin Level", "weapons/skinlevels", asset);
142
- var catalogEndpoints = {
143
- agents: agents.list,
144
- agent: agents.one,
145
- buddies: buddies.list,
146
- buddy: buddies.one,
147
- buddyLevels: buddyLevels.list,
148
- buddyLevel: buddyLevels.one,
149
- bundles: bundles.list,
150
- bundle: bundles.one,
151
- ceremonies: ceremonies.list,
152
- ceremony: ceremonies.one,
153
- competitiveTiers: competitiveTiers.list,
154
- competitiveTier: competitiveTiers.one,
155
- contentTiers: contentTiers.list,
156
- contentTier: contentTiers.one,
157
- contracts: contracts.list,
158
- contract: contracts.one,
159
- currencies: currencies.list,
160
- currency: currencies.one,
161
- events: events.list,
162
- event: events.one,
163
- flex: flex.list,
164
- flexItem: flex.one,
165
- gamemodes: gamemodes.list,
166
- gamemode: gamemodes.one,
167
- gamemodeEquippables: gamemodeEquippables.list,
168
- gamemodeEquippable: gamemodeEquippables.one,
169
- gear: gear.list,
170
- gearItem: gear.one,
171
- levelBorders: levelBorders.list,
172
- levelBorder: levelBorders.one,
173
- maps: maps.list,
174
- map: maps.one,
175
- missions: missions.list,
176
- mission: missions.one,
177
- playerCards: playerCards.list,
178
- playerCard: playerCards.one,
179
- playerTitles: playerTitles.list,
180
- playerTitle: playerTitles.one,
181
- seasons: seasons.list,
182
- season: seasons.one,
183
- competitiveSeasons: competitiveSeasons.list,
184
- competitiveSeason: competitiveSeasons.one,
185
- sprays: sprays.list,
186
- spray: sprays.one,
187
- sprayLevels: sprayLevels.list,
188
- sprayLevel: sprayLevels.one,
189
- themes: themes.list,
190
- theme: themes.one,
191
- version: endpoint("Version", "Current game version and the matching client version", "version", versionSchema),
192
- weapons: weapons.list,
193
- weapon: weapons.one,
194
- weaponSkins: weaponSkins.list,
195
- weaponSkin: weaponSkins.one,
196
- weaponSkinChromas: weaponSkinChromas.list,
197
- weaponSkinChroma: weaponSkinChromas.one,
198
- weaponSkinLevels: weaponSkinLevels.list,
199
- weaponSkinLevel: weaponSkinLevels.one
10
+ // src/endpoints/riot/account.ts
11
+ var dailyTicketEndpoint = {
12
+ name: "Daily Ticket",
13
+ description: "Daily ticket rewards and the matches already counted.",
14
+ category: "Account Endpoints",
15
+ type: "pd",
16
+ suffix: "daily-ticket/v1/{puuid}",
17
+ riotRequirements: player,
18
+ responses: { "200": z.object({
19
+ Version: z.number(),
20
+ DailyRewards: z.object({
21
+ RemainingLifetimeSeconds: z.number(),
22
+ BonusMilestonesPending: z.number(),
23
+ Milestones: z.array(z.object({
24
+ Progress: z.number(),
25
+ BonusApplied: z.boolean()
26
+ }))
27
+ }),
28
+ ProcessedMatches: z.array(z.object({
29
+ ID: z.string(),
30
+ CreatedAt: z.string(),
31
+ DailyExpireTime: z.string(),
32
+ PreviousDailyExpireTime: z.string(),
33
+ ProgressBefore: z.number(),
34
+ ProgressAfter: z.number(),
35
+ XP: z.number(),
36
+ SoftCurrency: z.number(),
37
+ WasPenalized: z.boolean(),
38
+ BonusesApplied: z.number(),
39
+ DailyBonusState: z.array(z.boolean())
40
+ }))
41
+ }) }
42
+ };
43
+ var dailyTicketQueueConfigEndpoint = {
44
+ name: "Daily Ticket Queue Config",
45
+ description: "Which queues count for the daily ticket.",
46
+ category: "Account Endpoints",
47
+ type: "pd",
48
+ suffix: "daily-ticket/v1/queue-config",
49
+ riotRequirements: player,
50
+ responses: { "200": z.object({
51
+ default: z.object({
52
+ flatProgressPerMatch: z.number(),
53
+ progressPerRoundWin: z.boolean()
54
+ }),
55
+ queueOverrides: z.object({
56
+ abilitydraftarena: z.object({
57
+ flatProgressPerMatch: z.number(),
58
+ progressPerRoundWin: z.boolean()
59
+ }),
60
+ competitive: z.object({
61
+ flatProgressPerMatch: z.number(),
62
+ progressPerRoundWin: z.boolean()
63
+ }),
64
+ console_abilitydraftarena: z.object({
65
+ flatProgressPerMatch: z.number(),
66
+ progressPerRoundWin: z.boolean()
67
+ }),
68
+ console_competitive: z.object({
69
+ flatProgressPerMatch: z.number(),
70
+ progressPerRoundWin: z.boolean()
71
+ }),
72
+ console_dodgeball: z.object({
73
+ flatProgressPerMatch: z.number(),
74
+ progressPerRoundWin: z.boolean()
75
+ }),
76
+ console_fortcollins: z.object({
77
+ flatProgressPerMatch: z.number(),
78
+ progressPerRoundWin: z.boolean()
79
+ }),
80
+ console_hurm: z.object({
81
+ flatProgressPerMatch: z.number(),
82
+ progressPerRoundWin: z.boolean()
83
+ }),
84
+ console_newmap: z.object({
85
+ flatProgressPerMatch: z.number(),
86
+ progressPerRoundWin: z.boolean()
87
+ }),
88
+ console_skirmish2v2: z.object({
89
+ flatProgressPerMatch: z.number(),
90
+ progressPerRoundWin: z.boolean()
91
+ }),
92
+ console_skirmishascension1v1: z.object({
93
+ flatProgressPerMatch: z.number(),
94
+ progressPerRoundWin: z.boolean()
95
+ }),
96
+ console_skirmishascension2v2: z.object({
97
+ flatProgressPerMatch: z.number(),
98
+ progressPerRoundWin: z.boolean()
99
+ }),
100
+ console_snowball: z.object({
101
+ flatProgressPerMatch: z.number(),
102
+ progressPerRoundWin: z.boolean()
103
+ }),
104
+ console_spikerush: z.object({
105
+ flatProgressPerMatch: z.number(),
106
+ progressPerRoundWin: z.boolean()
107
+ }),
108
+ console_swiftplay: z.object({
109
+ flatProgressPerMatch: z.number(),
110
+ progressPerRoundWin: z.boolean()
111
+ }),
112
+ console_unrated: z.object({
113
+ flatProgressPerMatch: z.number(),
114
+ progressPerRoundWin: z.boolean()
115
+ }),
116
+ console_valaram: z.object({
117
+ flatProgressPerMatch: z.number(),
118
+ progressPerRoundWin: z.boolean()
119
+ }),
120
+ dodgeball: z.object({
121
+ flatProgressPerMatch: z.number(),
122
+ progressPerRoundWin: z.boolean()
123
+ }),
124
+ fortcollins: z.object({
125
+ flatProgressPerMatch: z.number(),
126
+ progressPerRoundWin: z.boolean()
127
+ }),
128
+ ggteam: z.object({
129
+ flatProgressPerMatch: z.number(),
130
+ progressPerRoundWin: z.boolean()
131
+ }),
132
+ hurm: z.object({
133
+ flatProgressPerMatch: z.number(),
134
+ progressPerRoundWin: z.boolean()
135
+ }),
136
+ newmap: z.object({
137
+ flatProgressPerMatch: z.number(),
138
+ progressPerRoundWin: z.boolean()
139
+ }),
140
+ premier: z.object({
141
+ flatProgressPerMatch: z.number(),
142
+ progressPerRoundWin: z.boolean()
143
+ }),
144
+ skirmish2v2: z.object({
145
+ flatProgressPerMatch: z.number(),
146
+ progressPerRoundWin: z.boolean()
147
+ }),
148
+ skirmishascension1v1: z.object({
149
+ flatProgressPerMatch: z.number(),
150
+ progressPerRoundWin: z.boolean()
151
+ }),
152
+ skirmishascension2v2: z.object({
153
+ flatProgressPerMatch: z.number(),
154
+ progressPerRoundWin: z.boolean()
155
+ }),
156
+ snowball: z.object({
157
+ flatProgressPerMatch: z.number(),
158
+ progressPerRoundWin: z.boolean()
159
+ }),
160
+ spikerush: z.object({
161
+ flatProgressPerMatch: z.number(),
162
+ progressPerRoundWin: z.boolean()
163
+ }),
164
+ swiftplay: z.object({
165
+ flatProgressPerMatch: z.number(),
166
+ progressPerRoundWin: z.boolean()
167
+ }),
168
+ unrated: z.object({
169
+ flatProgressPerMatch: z.number(),
170
+ progressPerRoundWin: z.boolean()
171
+ }),
172
+ valaram: z.object({
173
+ flatProgressPerMatch: z.number(),
174
+ progressPerRoundWin: z.boolean()
175
+ })
176
+ })
177
+ }) }
178
+ };
179
+ var favoritesEndpoint = {
180
+ name: "Favorites",
181
+ description: "Favorited store content of the player.",
182
+ category: "Account Endpoints",
183
+ type: "pd",
184
+ suffix: "favorites/v1/players/{puuid}/favorites",
185
+ riotRequirements: player,
186
+ responses: { "200": z.object({
187
+ Subject: z.string(),
188
+ FavoritedContent: z.record(z.string(), z.object({
189
+ FavoriteID: z.string(),
190
+ ItemID: z.string()
191
+ }))
192
+ }) }
193
+ };
194
+ var goldstarsEndpoint = {
195
+ name: "Goldstars",
196
+ description: "Goldstar definitions. Field names are obfuscated by the game.",
197
+ category: "Account Endpoints",
198
+ type: "pd",
199
+ suffix: "goldstars/v1/goldstars",
200
+ riotRequirements: player,
201
+ responses: { "200": z.array(z.object({
202
+ id: z.string(),
203
+ tempT: z.number()
204
+ })) }
205
+ };
206
+ var goldstarsPlayerEndpoint = {
207
+ name: "Goldstars Player",
208
+ description: "Goldstars of a player. Field names are obfuscated by the game.",
209
+ category: "Account Endpoints",
210
+ type: "pd",
211
+ suffix: "goldstars/v1/players/{puuid}",
212
+ riotRequirements: player,
213
+ responses: { "200": z.object({
214
+ puuid: z.string(),
215
+ version: z.number(),
216
+ tempS: z.object({
217
+ "00000000-0000-0000-0000-000000000000": z.object({
218
+ tempS: z.string(),
219
+ tempA: z.record(z.string(), z.object({
220
+ id: z.string(),
221
+ tempC: z.number(),
222
+ tempB: z.number()
223
+ }))
224
+ }),
225
+ "8102cd81-43a0-d0d7-bd59-47b8fe9bed1b": z.object({
226
+ tempS: z.string(),
227
+ tempA: z.record(z.string(), z.object({
228
+ id: z.string(),
229
+ tempC: z.number(),
230
+ tempB: z.number()
231
+ }))
232
+ })
233
+ }),
234
+ tempM: z.array(z.object({
235
+ id: z.string(),
236
+ tempG: z.number(),
237
+ tempP: z.record(z.string(), z.object({
238
+ tempA: z.record(z.string(), z.object({
239
+ id: z.string(),
240
+ tempV: z.number(),
241
+ tempB: z.boolean()
242
+ }))
243
+ }))
244
+ }))
245
+ }) }
246
+ };
247
+ var bloomlineQueuesEndpoint = {
248
+ name: "Bloomline Queues",
249
+ description: "Queues handled by the `bloomline` service. The purpose of the service is not documented.",
250
+ category: "Account Endpoints",
251
+ type: "pd",
252
+ suffix: "bloomline/v0/config/valid-queues",
253
+ riotRequirements: player,
254
+ responses: { "200": z.object({
255
+ ProcessedQueues: z.array(z.string()),
256
+ PerformanceScoreQueues: z.array(z.string())
257
+ }) }
258
+ };
259
+ var bloomlinePlayerEndpoint = {
260
+ name: "Bloomline Player",
261
+ description: "Per-player data of the `bloomline` service. The purpose of the service is not documented.",
262
+ category: "Account Endpoints",
263
+ type: "pd",
264
+ suffix: "bloomline/v0/players/{puuid}",
265
+ riotRequirements: player,
266
+ responses: { "200": z.object({
267
+ Subject: z.string(),
268
+ Bonsais: z.array(z.object({
269
+ BonsaiID: z.string(),
270
+ HypeID: z.string().optional(),
271
+ BackgroundID: z.string().optional(),
272
+ ClipID: z.string().optional(),
273
+ BorderID: z.string().optional(),
274
+ Flourish: z.object({
275
+ ShortLevel: z.number().optional(),
276
+ PreviousShortLevel: z.number().optional(),
277
+ LongLevel: z.number().optional(),
278
+ FlourishID: z.string().optional(),
279
+ Points: z.number().optional(),
280
+ PointsVersion: z.number().optional()
281
+ }),
282
+ TrackProgressList: z.array(z.object({
283
+ TrackID: z.string(),
284
+ TrackLevel: z.number().optional()
285
+ }))
286
+ })),
287
+ LongGroupVersion: z.number()
288
+ }) }
200
289
  };
201
290
 
202
- // src/extra/riot.ts
291
+ // src/endpoints/riot/chat.ts
203
292
  import { z as z2 } from "zod";
204
- var contractsActiveStoryEndpoint = {
205
- name: "Active Story",
206
- description: "Get the battlepass contracts",
207
- queryName: "ContractDefinitions_FetchActiveStory",
208
- category: "Contract Endpoints",
209
- type: "pd",
210
- suffix: "contract-definitions/v2/definitions/story",
211
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
212
- responses: { "200": z2.unknown() }
213
- };
214
- var currentGameAllChatTokenEndpoint = {
215
- name: "All Chat Token",
216
- description: "Get a token for all chat",
217
- queryName: "CoreGame_FetchAllChatMUCToken",
218
- category: "Current Game Endpoints",
219
- type: "glz",
220
- suffix: "core-game/v1/matches/{in-progress match id}/allchatmuctoken",
221
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
222
- responses: { "200": z2.unknown() }
223
- };
224
- var currentGameTeamChatTokenEndpoint = {
225
- name: "Team Chat Token",
226
- description: "Get a token for team chat",
227
- queryName: "CoreGame_FetchTeamChatMUCToken",
228
- category: "Current Game Endpoints",
229
- type: "glz",
230
- suffix: "core-game/v1/matches/{in-progress match id}/teamchatmuctoken",
231
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
232
- responses: { "200": z2.unknown() }
233
- };
234
- var localAntiAddictionShutdownEndpoint = {
235
- name: "Anti Addiction Shutdown",
236
- description: "GET ANTI_ADDICTION_RNet_FetchShutdownPolicyState",
237
- queryName: "ANTI_ADDICTION_RNet_FetchShutdownPolicyState",
238
- category: "Local Endpoints",
293
+ var chatSettingsEndpoint = {
294
+ name: "Settings",
295
+ description: "Get chat settings",
296
+ category: "Local Endpoints - Chat",
239
297
  type: "local",
240
- suffix: "anti-addiction/v1/products/valorant/policies/shutdown/anti-addiction-state",
298
+ suffix: "chat/v1/settings",
241
299
  riotRequirements: { localAuth: true },
242
- responses: { "200": z2.unknown() }
300
+ responses: { "200": z2.object({
301
+ bounceDockIconEnabled: z2.boolean(),
302
+ "chat-status-message": z2.string(),
303
+ chatFilterDisabled: z2.boolean(),
304
+ chatGBG: z2.boolean(),
305
+ chatGroupDiscord: z2.boolean(),
306
+ chatGroupMobile: z2.boolean(),
307
+ chatGroupOffline: z2.boolean(),
308
+ chatWindow: z2.object({
309
+ detached: z2.boolean(),
310
+ height: z2.number(),
311
+ left: z2.number(),
312
+ top: z2.number(),
313
+ width: z2.number()
314
+ }),
315
+ chatWindowDockedHeight: z2.number(),
316
+ "closed-conversations": z2.object({
317
+ "ff822fdf-71a3-54ac-814e-7ac752ba428d@eu1.pvp.net": z2.number()
318
+ }),
319
+ friendRequestToastsDisabled: z2.boolean(),
320
+ "hidden-conversations": z2.object({}),
321
+ linkClickWarningEnabled: z2.boolean(),
322
+ messageNotificationsEnabled: z2.boolean(),
323
+ moreUnreadsEnabled: z2.boolean(),
324
+ "muted-conversations": z2.object({}),
325
+ recentlyPlayedFirstOpen: z2.boolean(),
326
+ recentlyPlayedOpen: z2.boolean(),
327
+ "roster-group-collapsed": z2.object({}),
328
+ showWhenTypingEnabled: z2.boolean(),
329
+ sortBy: z2.string(),
330
+ usePlayerPreferences: z2.boolean()
331
+ }) }
243
332
  };
244
- var localAntiAddictionWarningEndpoint = {
245
- name: "Anti Addiction Warning",
246
- description: "GET ANTI_ADDICTION_RNet_FetchWarningMessagePolicyState",
247
- queryName: "ANTI_ADDICTION_RNet_FetchWarningMessagePolicyState",
248
- category: "Local Endpoints",
333
+ var chatTournamentInfoEndpoint = {
334
+ name: "Tournament Info",
335
+ description: "Get in-tournament conversations",
336
+ category: "Local Endpoints - Chat",
249
337
  type: "local",
250
- suffix: "anti-addiction/v1/products/valorant/policies/warningMessage/anti-addiction-state",
338
+ suffix: "chat/v6/conversations/ares-tournaments",
251
339
  riotRequirements: { localAuth: true },
252
- responses: { "200": z2.unknown() }
340
+ responses: { "200": z2.object({}) }
253
341
  };
254
- var localClientConfigEndpoint = {
255
- name: "Client Config",
256
- description: "GET CLIENTCONFIG_RNET_GET_ValorantClientConfig",
257
- queryName: "CLIENTCONFIG_RNET_GET_ValorantClientConfig",
258
- category: "Local Endpoints",
259
- type: "local",
260
- suffix: "client-config/v2/namespace/valorant.client/player",
261
- riotRequirements: { localAuth: true },
262
- responses: { "200": z2.unknown() }
342
+
343
+ // src/endpoints/riot/contracts.ts
344
+ import { z as z3 } from "zod";
345
+ var activeRecruitmentEventEndpoint = {
346
+ name: "Active Recruitment Event",
347
+ description: "The current agent recruitment event.",
348
+ category: "Contract Endpoints",
349
+ type: "pd",
350
+ suffix: "contracts/v1/agents/activeRecruitmentEvent",
351
+ riotRequirements: player,
352
+ responses: { "200": z3.object({
353
+ AgentID: z3.string(),
354
+ CounterID: z3.string(),
355
+ MilestoneThreshold: z3.number(),
356
+ StartDate: z3.string(),
357
+ EndDate: z3.string(),
358
+ IsActive: z3.boolean(),
359
+ includedPlatforms: z3.object({
360
+ console: z3.object({
361
+ developmentOnly: z3.boolean()
362
+ }),
363
+ mobile: z3.object({
364
+ developmentOnly: z3.boolean()
365
+ }),
366
+ pc: z3.object({
367
+ developmentOnly: z3.boolean()
368
+ })
369
+ })
370
+ }) }
263
371
  };
264
- var localEulaEndpoint = {
265
- name: "Eula",
266
- description: "Get the EULA",
267
- queryName: "LEGAL_INFO_RNet_EULA",
268
- category: "Local Endpoints",
269
- type: "local",
270
- suffix: "eula/v1/agreement/content",
271
- riotRequirements: { localAuth: true },
272
- responses: { "200": z2.unknown() }
372
+
373
+ // src/endpoints/riot/esports.ts
374
+ import { z as z4 } from "zod";
375
+ var esportsLiveEventTimesEndpoint = {
376
+ name: "Esports Live Event Times",
377
+ description: "Live and upcoming esports matches, pick blocks and tournaments.",
378
+ category: "Esports Endpoints",
379
+ type: "pd",
380
+ suffix: "esports-service/v2/liveEventTimes",
381
+ riotRequirements: player,
382
+ responses: { "200": z4.object({
383
+ Tournaments: z4.array(z4.object({
384
+ ID: z4.string(),
385
+ StartTimeUTC: z4.string(),
386
+ EndTimeUTC: z4.string()
387
+ }))
388
+ }) }
273
389
  };
274
- var localPrivacyPolicyEndpoint = {
275
- name: "Privacy Policy",
276
- description: "Get privacy policy",
277
- queryName: "LEGAL_INFO_RNet_Privacy",
278
- category: "Local Endpoints",
279
- type: "local",
280
- suffix: "eula/v1/privacy-policy/content",
281
- riotRequirements: { localAuth: true },
282
- responses: { "200": z2.unknown() }
390
+ var esportsUpcomingMatchesEndpoint = {
391
+ name: "Esports Upcoming Matches",
392
+ description: "Upcoming esports matches.",
393
+ category: "Esports Endpoints",
394
+ type: "pd",
395
+ suffix: "esports-service/v2/upcomingMatches",
396
+ riotRequirements: player,
397
+ responses: { "200": z4.object({}) }
283
398
  };
284
- var localAvailableLocalesEndpoint = {
285
- name: "Available Locales",
286
- description: "Get available locales",
287
- queryName: "LOCALE_RNet_FetchAvailableLocales",
288
- category: "Local Endpoints",
289
- type: "local",
290
- suffix: "rnet-product-registry/v4/available-product-locales/products/valorant/patchlines/live",
291
- riotRequirements: { localAuth: true },
292
- responses: { "200": z2.unknown() }
399
+ var esportsPickemLeaguesEndpoint = {
400
+ name: "Esports Pickem Leagues",
401
+ description: "Pick'em leagues.",
402
+ category: "Esports Endpoints",
403
+ type: "pd",
404
+ suffix: "esports-service/v1/pickem/leagues",
405
+ riotRequirements: player,
406
+ responses: { "200": z4.object({
407
+ PickemLeagues: z4.array(z4.object({
408
+ LeagueID: z4.string(),
409
+ EldsLeagueID: z4.string(),
410
+ Tournament: z4.object({
411
+ ID: z4.string(),
412
+ EldsTournamentID: z4.string(),
413
+ LeagueID: z4.string(),
414
+ PickBlocks: z4.array(z4.object({
415
+ ID: z4.string(),
416
+ EldsTournamentID: z4.string(),
417
+ Slug: z4.object({
418
+ Slug: z4.string()
419
+ }),
420
+ PickOpenTime: z4.string(),
421
+ PickCloseTime: z4.string(),
422
+ State: z4.string(),
423
+ OpenLevel: z4.string(),
424
+ BlockType: z4.string(),
425
+ PickBlockElements: z4.array(z4.object({
426
+ ID: z4.string(),
427
+ PickBlockID: z4.string(),
428
+ Section: z4.object({
429
+ ID: z4.string(),
430
+ EldsSectionID: z4.string(),
431
+ CorrectPick: z4.object({
432
+ Entries: z4.array(z4.object({
433
+ Index: z4.number(),
434
+ Correctness: z4.string(),
435
+ ParticipantID: z4.string(),
436
+ Points: z4.number(),
437
+ Rank: z4.number()
438
+ })).nullable()
439
+ })
440
+ }),
441
+ Match: z4.object({
442
+ ID: z4.string(),
443
+ EldsMatchID: z4.string(),
444
+ BaselinePoints: z4.number(),
445
+ CorrectPick: z4.string(),
446
+ ResultState: z4.string()
447
+ }),
448
+ PickOpenTime: z4.string(),
449
+ PickCloseTime: z4.string(),
450
+ State: z4.string(),
451
+ DisplayOrder: z4.number()
452
+ })),
453
+ CompletionStatus: z4.string()
454
+ })),
455
+ Participants: z4.array(z4.object({
456
+ ID: z4.string(),
457
+ EldsTeamID: z4.string()
458
+ }))
459
+ }),
460
+ Published: z4.boolean()
461
+ }))
462
+ }) }
293
463
  };
464
+
465
+ // src/endpoints/riot/local.ts
466
+ import { z as z5 } from "zod";
294
467
  var localLocaleEndpoint = {
295
468
  name: "Locale",
296
469
  description: "Get the current locale",
297
- queryName: "LOCALE_RNet_FetchLocale",
298
470
  category: "Local Endpoints",
299
471
  type: "local",
300
472
  suffix: "riotclient/product-locales/products/valorant/patchlines/live",
301
473
  riotRequirements: { localAuth: true },
302
- responses: { "200": z2.unknown() }
303
- };
304
- var localReporterFeedbackEndpoint = {
305
- name: "Reporter Feedback",
306
- description: "GET REPORTER_FEEDBACK_RNet_GetReporterFeedback",
307
- queryName: "REPORTER_FEEDBACK_RNet_GetReporterFeedback",
308
- category: "Local Endpoints",
309
- type: "local",
310
- suffix: "player-reporting/v1/reporter-feedback",
311
- riotRequirements: { localAuth: true },
312
- responses: { "200": z2.unknown() }
474
+ responses: { "200": z5.string() }
313
475
  };
314
- var localCommandLineArgsEndpoint = {
315
- name: "Command Line Args",
316
- description: "Gets the command-line args provided to the Riot client",
317
- queryName: "Riot Client Command-Line Args",
476
+ var localAvailableLocalesEndpoint = {
477
+ name: "Available Locales",
478
+ description: "Get available locales",
318
479
  category: "Local Endpoints",
319
480
  type: "local",
320
- suffix: "riotclient/command-line-args",
481
+ suffix: "rnet-product-registry/v4/available-product-locales/products/valorant/patchlines/live",
321
482
  riotRequirements: { localAuth: true },
322
- responses: { "200": z2.unknown() }
483
+ responses: { "200": z5.array(z5.string()) }
323
484
  };
324
485
  var localRiotStatusEndpoint = {
325
486
  name: "Riot Status",
326
487
  description: "Get game status information such as maintenances and incidents Response is an escaped JSON string.",
327
- queryName: "RiotStatus_RNet_FetchStatus",
328
488
  category: "Local Endpoints",
329
489
  type: "local",
330
490
  suffix: "riot-status/v1/products/valorant/patchlines/live/deployments/{region}",
331
491
  riotRequirements: { localAuth: true },
332
- responses: { "200": z2.unknown() }
333
- };
334
- var localRiotWarningEndpoint = {
335
- name: "Riot Warning",
336
- description: "GET RIOT_WARNING_RNet_GetRiotWarning",
337
- queryName: "RIOT_WARNING_RNet_GetRiotWarning",
338
- category: "Local Endpoints",
339
- type: "local",
340
- suffix: "ga-warning/v1/warnings",
341
- riotRequirements: { localAuth: true },
342
- responses: { "200": z2.unknown() }
343
- };
344
- var localClientAuthorizationsEndpoint = {
345
- name: "Client Authorizations",
346
- description: "Gets tokens in use by the client",
347
- queryName: "RSO_RNet_FetchClientAuthorizations",
348
- category: "Local Endpoints",
349
- type: "local",
350
- suffix: "rso-auth/v2/authorizations/valorant-client",
351
- riotRequirements: { localAuth: true },
352
- responses: { "200": z2.unknown() }
492
+ responses: { "200": z5.string() }
353
493
  };
354
494
  var localAccessTokenEndpoint = {
355
495
  name: "Access Token",
356
496
  description: "Gets a Riot access token",
357
- queryName: "RSO_RNet_GetAccessToken",
358
497
  category: "Local Endpoints",
359
498
  type: "local",
360
499
  suffix: "rso-auth/v1/authorization/access-token",
361
500
  riotRequirements: { localAuth: true },
362
- responses: { "200": z2.unknown() }
363
- };
364
- var localUserInfoTokenEndpoint = {
365
- name: "User Info Token",
366
- description: "GET RSO_RNet_GetUserInfoToken",
367
- queryName: "RSO_RNet_GetUserInfoToken",
368
- category: "Local Endpoints",
369
- type: "local",
370
- suffix: "rso-auth/v1/userinfo/valorant-client",
371
- riotRequirements: { localAuth: true },
372
- responses: { "200": z2.unknown() }
373
- };
374
- var chatSettingsEndpoint = {
375
- name: "Settings",
376
- description: "Get chat settings",
377
- queryName: "TEXT_CHAT_RNet_FetchSettings",
378
- category: "Local Endpoints - Chat",
379
- type: "local",
380
- suffix: "chat/v1/settings",
381
- riotRequirements: { localAuth: true },
382
- responses: { "200": z2.unknown() }
383
- };
384
- var chatTournamentInfoEndpoint = {
385
- name: "Tournament Info",
386
- description: "Get in-tournament conversations",
387
- queryName: "TEXT_CHAT_RNet_GetMUCInfos - tournaments",
388
- category: "Local Endpoints - Chat",
389
- type: "local",
390
- suffix: "chat/v6/conversations/ares-tournaments",
391
- riotRequirements: { localAuth: true },
392
- responses: { "200": z2.unknown() }
501
+ responses: { "200": z5.object({
502
+ clientId: z5.string(),
503
+ expiry: z5.number(),
504
+ scopes: z5.array(z5.string()),
505
+ token: z5.string()
506
+ }) }
393
507
  };
394
508
  var localPluginStatusEndpoint = {
395
509
  name: "Plugin Status",
396
510
  description: "Gets plugin status",
397
- queryName: "URNetClient_CheckPluginStatus",
398
511
  category: "Local Endpoints",
399
512
  type: "local",
400
513
  suffix: "plugin-manager/v1/status",
401
514
  riotRequirements: { localAuth: true },
402
- responses: { "200": z2.unknown() }
515
+ responses: { "200": z5.object({
516
+ state: z5.string()
517
+ }) }
403
518
  };
404
519
  var localRmsSessionEndpoint = {
405
520
  name: "Rms Session",
406
521
  description: "Gets the token for Riot Messaging Service",
407
- queryName: "URNetClient_CheckRMSSession",
408
522
  category: "Local Endpoints",
409
523
  type: "local",
410
524
  suffix: "riot-messaging-service/v1/session",
411
525
  riotRequirements: { localAuth: true },
412
- responses: { "200": z2.unknown() }
526
+ responses: { "200": z5.object({
527
+ state: z5.string(),
528
+ token: z5.string(),
529
+ tokenType: z5.string()
530
+ }) }
413
531
  };
414
532
  var localProcessInfoEndpoint = {
415
533
  name: "Process Info",
416
534
  description: "Gets the Valorant process ID",
417
- queryName: "URNetClient_GetProcessInfo",
418
535
  category: "Local Endpoints",
419
536
  type: "local",
420
537
  suffix: "process-control/v1/process",
421
538
  riotRequirements: { localAuth: true },
422
- responses: { "200": z2.unknown() }
539
+ responses: { "200": z5.object({
540
+ pid: z5.number(),
541
+ status: z5.string()
542
+ }) }
423
543
  };
424
544
  var localLogPathEndpoint = {
425
545
  name: "Log Path",
426
546
  description: "Gets the Valorant log path",
427
- queryName: "Valorant Log Path",
428
547
  category: "Local Endpoints",
429
548
  type: "local",
430
549
  suffix: "product-session/v1/logs/path/VALORANT",
431
550
  riotRequirements: { localAuth: true },
432
- responses: { "200": z2.unknown() }
551
+ responses: { "200": z5.string() }
552
+ };
553
+ var localEulaEndpoint = {
554
+ name: "Eula",
555
+ description: "Get the EULA",
556
+ category: "Local Endpoints",
557
+ type: "local",
558
+ suffix: "eula/v1/agreement/content",
559
+ riotRequirements: { localAuth: true },
560
+ responses: { "200": z5.string() }
561
+ };
562
+ var localPrivacyPolicyEndpoint = {
563
+ name: "Privacy Policy",
564
+ description: "Get privacy policy",
565
+ category: "Local Endpoints",
566
+ type: "local",
567
+ suffix: "eula/v1/privacy-policy/content",
568
+ riotRequirements: { localAuth: true },
569
+ responses: { "200": z5.string() }
570
+ };
571
+
572
+ // src/endpoints/riot/premier.ts
573
+ import { z as z6 } from "zod";
574
+ var premierSeasonsEndpoint = {
575
+ name: "Premier Seasons",
576
+ description: "All Premier seasons of the shard. The affinity in the path is the region of the context.",
577
+ category: "Premier Endpoints",
578
+ type: "pd",
579
+ suffix: "premier/v1/affinities/{region}/premier-seasons",
580
+ riotRequirements: player,
581
+ responses: { "200": z6.object({
582
+ PremierSeasons: z6.array(z6.object({
583
+ ID: z6.string(),
584
+ Name: z6.string(),
585
+ PreviousPremierSeasonID: z6.string(),
586
+ NextPremierSeasonID: z6.string(),
587
+ IsActive: z6.boolean(),
588
+ StartTime: z6.string(),
589
+ EndTime: z6.string(),
590
+ Events: z6.array(z6.object({
591
+ ID: z6.string(),
592
+ Type: z6.string(),
593
+ StartDateTime: z6.string(),
594
+ EndDateTime: z6.string(),
595
+ MapSelectionStrategy: z6.string(),
596
+ MapPoolMapIDs: z6.array(z6.string()),
597
+ PointsRequiredToParticipate: z6.number()
598
+ })),
599
+ ScheduledEvents: z6.array(z6.object({
600
+ EventID: z6.string(),
601
+ EventType: z6.string(),
602
+ Conference: z6.string(),
603
+ DivisionGroup: z6.string(),
604
+ EventPresetName: z6.string(),
605
+ StartDateTime: z6.string(),
606
+ EndDateTime: z6.string(),
607
+ TournamentRoundTimes: z6.array(z6.object({
608
+ StartDateTime: z6.string(),
609
+ EndDateTime: z6.string()
610
+ }))
611
+ })),
612
+ Conferences: z6.array(z6.object({
613
+ id: z6.string(),
614
+ key: z6.string(),
615
+ isSuper: z6.boolean(),
616
+ gamePods: z6.array(z6.string()),
617
+ timezone: z6.string(),
618
+ superConference: z6.string().optional(),
619
+ leaderboardPlayoffQualificationDateTime: z6.string(),
620
+ leaderboardPromotionFinalizationDateTime: z6.string()
621
+ })),
622
+ Divisions: z6.array(z6.object({
623
+ Division: z6.number(),
624
+ DivisionName: z6.string(),
625
+ DivisionGroup: z6.string(),
626
+ EventPresetName: z6.string()
627
+ })),
628
+ DivisionThresholds: z6.array(z6.object({
629
+ playoffThresholdType: z6.string(),
630
+ playoffThresholdValue: z6.number(),
631
+ promotionThresholdType: z6.string(),
632
+ promotionThresholdValue: z6.number(),
633
+ shouldPromoteToSuperConference: z6.boolean(),
634
+ skipReseedCriteria: z6.string(),
635
+ conference: z6.string().optional(),
636
+ division: z6.number().optional(),
637
+ promotionConference: z6.string().optional(),
638
+ skipReseedCriteriaValue: z6.number().optional()
639
+ })),
640
+ EventPresets: z6.object({
641
+ PRO: z6.object({
642
+ EventPresetsByEventType: z6.object({
643
+ LEAGUE: z6.object({
644
+ EventPresetName: z6.string(),
645
+ eventType: z6.string(),
646
+ bestOfN: z6.number(),
647
+ matchmakingStrategy: z6.string(),
648
+ queueID: z6.string(),
649
+ pointsConfig: z6.object({
650
+ PointsForWin: z6.number(),
651
+ PointsForLoss: z6.number()
652
+ })
653
+ }),
654
+ SCRIM: z6.object({
655
+ EventPresetName: z6.string(),
656
+ eventType: z6.string(),
657
+ bestOfN: z6.number(),
658
+ matchmakingStrategy: z6.string(),
659
+ queueID: z6.string(),
660
+ pointsConfig: z6.object({
661
+ PointsForWin: z6.number(),
662
+ PointsForLoss: z6.number()
663
+ })
664
+ }),
665
+ TOURNAMENT: z6.object({
666
+ EventPresetName: z6.string(),
667
+ eventType: z6.string(),
668
+ bestOfN: z6.number(),
669
+ matchmakingStrategy: z6.string(),
670
+ queueID: z6.string(),
671
+ pointsConfig: z6.object({
672
+ PointsForWin: z6.number(),
673
+ PointsForLoss: z6.number()
674
+ })
675
+ })
676
+ })
677
+ }),
678
+ REGULAR: z6.object({
679
+ EventPresetsByEventType: z6.object({
680
+ LEAGUE: z6.object({
681
+ EventPresetName: z6.string(),
682
+ eventType: z6.string(),
683
+ bestOfN: z6.number(),
684
+ matchmakingStrategy: z6.string(),
685
+ queueID: z6.string(),
686
+ pointsConfig: z6.object({
687
+ PointsForWin: z6.number(),
688
+ PointsForLoss: z6.number()
689
+ })
690
+ }),
691
+ SCRIM: z6.object({
692
+ EventPresetName: z6.string(),
693
+ eventType: z6.string(),
694
+ bestOfN: z6.number(),
695
+ matchmakingStrategy: z6.string(),
696
+ queueID: z6.string(),
697
+ pointsConfig: z6.object({
698
+ PointsForWin: z6.number(),
699
+ PointsForLoss: z6.number()
700
+ })
701
+ }),
702
+ TOURNAMENT: z6.object({
703
+ EventPresetName: z6.string(),
704
+ eventType: z6.string(),
705
+ bestOfN: z6.number(),
706
+ matchmakingStrategy: z6.string(),
707
+ queueID: z6.string(),
708
+ pointsConfig: z6.object({
709
+ PointsForWin: z6.number(),
710
+ PointsForLoss: z6.number()
711
+ })
712
+ })
713
+ })
714
+ })
715
+ }),
716
+ FlawlessPointRequirement: z6.number(),
717
+ ChampionshipPointRequirement: z6.number(),
718
+ ChampionshipEventID: z6.string(),
719
+ EnrollmentPhaseStartDateTime: z6.string(),
720
+ EnrollmentPhaseEndDateTime: z6.string(),
721
+ LeaderboardPlayoffQualificationDateTime: z6.string(),
722
+ LeaderboardPromotionFinalizationDateTime: z6.string(),
723
+ LeaderboardFinalizationDateTime: z6.string(),
724
+ ContenderEligibilityExpiryDateTime: z6.string(),
725
+ StageLockTime: z6.string(),
726
+ ParticipationRewardsActIDs: z6.array(z6.string()),
727
+ ParticipationRewards: z6.object({
728
+ EntitlementRewards: z6.array(z6.object({
729
+ ItemTypeID: z6.string(),
730
+ ItemID: z6.string(),
731
+ Amount: z6.number()
732
+ }))
733
+ }),
734
+ TournamentWinnerRewards: z6.object({}),
735
+ DivisionWinnerRewards: z6.object({
736
+ ADVANCED: z6.object({
737
+ EntitlementRewards: z6.array(z6.object({
738
+ ItemTypeID: z6.string(),
739
+ ItemID: z6.string(),
740
+ Amount: z6.number()
741
+ }))
742
+ }).optional(),
743
+ CONTENDER: z6.object({
744
+ EntitlementRewards: z6.array(z6.object({
745
+ ItemTypeID: z6.string(),
746
+ ItemID: z6.string(),
747
+ Amount: z6.number()
748
+ }))
749
+ }).optional(),
750
+ ELITE: z6.object({
751
+ EntitlementRewards: z6.array(z6.object({
752
+ ItemTypeID: z6.string(),
753
+ ItemID: z6.string(),
754
+ Amount: z6.number()
755
+ }))
756
+ }).optional(),
757
+ INTERMEDIATE: z6.object({
758
+ EntitlementRewards: z6.array(z6.object({
759
+ ItemTypeID: z6.string(),
760
+ ItemID: z6.string(),
761
+ Amount: z6.number()
762
+ }))
763
+ }).optional(),
764
+ OPEN: z6.object({
765
+ EntitlementRewards: z6.array(z6.object({
766
+ ItemTypeID: z6.string(),
767
+ ItemID: z6.string(),
768
+ Amount: z6.number()
769
+ }))
770
+ }).optional(),
771
+ INVITE: z6.object({
772
+ EntitlementRewards: z6.array(z6.object({
773
+ ItemTypeID: z6.string(),
774
+ ItemID: z6.string(),
775
+ Amount: z6.number()
776
+ }))
777
+ }).optional()
778
+ }),
779
+ RosterRecentActivityNumSeasons: z6.number()
780
+ }))
781
+ }) }
782
+ };
783
+ var premierActiveSeasonEndpoint = {
784
+ name: "Premier Active Season",
785
+ description: "The Premier season that is running now.",
786
+ category: "Premier Endpoints",
787
+ type: "pd",
788
+ suffix: "premier/v1/affinities/{region}/premier-seasons/active",
789
+ riotRequirements: player,
790
+ responses: { "200": z6.object({
791
+ ID: z6.string(),
792
+ Name: z6.string(),
793
+ PreviousPremierSeasonID: z6.string(),
794
+ NextPremierSeasonID: z6.string(),
795
+ IsActive: z6.boolean(),
796
+ StartTime: z6.string(),
797
+ EndTime: z6.string(),
798
+ Events: z6.array(z6.object({
799
+ ID: z6.string(),
800
+ Type: z6.string(),
801
+ StartDateTime: z6.string(),
802
+ EndDateTime: z6.string(),
803
+ MapSelectionStrategy: z6.string(),
804
+ MapPoolMapIDs: z6.array(z6.string()),
805
+ PointsRequiredToParticipate: z6.number()
806
+ })),
807
+ ScheduledEvents: z6.array(z6.object({
808
+ EventID: z6.string(),
809
+ EventType: z6.string(),
810
+ Conference: z6.string(),
811
+ DivisionGroup: z6.string(),
812
+ EventPresetName: z6.string(),
813
+ StartDateTime: z6.string(),
814
+ EndDateTime: z6.string(),
815
+ TournamentRoundTimes: z6.array(z6.object({
816
+ StartDateTime: z6.string(),
817
+ EndDateTime: z6.string()
818
+ }))
819
+ })),
820
+ Conferences: z6.array(z6.object({
821
+ id: z6.string(),
822
+ key: z6.string(),
823
+ isSuper: z6.boolean(),
824
+ gamePods: z6.array(z6.string()),
825
+ timezone: z6.string(),
826
+ superConference: z6.string().optional(),
827
+ leaderboardPlayoffQualificationDateTime: z6.string(),
828
+ leaderboardPromotionFinalizationDateTime: z6.string()
829
+ })),
830
+ Divisions: z6.array(z6.object({
831
+ Division: z6.number(),
832
+ DivisionName: z6.string(),
833
+ DivisionGroup: z6.string(),
834
+ EventPresetName: z6.string()
835
+ })),
836
+ DivisionThresholds: z6.array(z6.object({
837
+ playoffThresholdType: z6.string(),
838
+ playoffThresholdValue: z6.number(),
839
+ promotionThresholdType: z6.string(),
840
+ promotionThresholdValue: z6.number(),
841
+ shouldPromoteToSuperConference: z6.boolean(),
842
+ skipReseedCriteria: z6.string(),
843
+ conference: z6.string().optional(),
844
+ division: z6.number().optional(),
845
+ promotionConference: z6.string().optional(),
846
+ skipReseedCriteriaValue: z6.number().optional()
847
+ })),
848
+ EventPresets: z6.object({
849
+ PRO: z6.object({
850
+ EventPresetsByEventType: z6.object({
851
+ LEAGUE: z6.object({
852
+ EventPresetName: z6.string(),
853
+ eventType: z6.string(),
854
+ bestOfN: z6.number(),
855
+ matchmakingStrategy: z6.string(),
856
+ queueID: z6.string(),
857
+ pointsConfig: z6.object({
858
+ PointsForWin: z6.number(),
859
+ PointsForLoss: z6.number()
860
+ })
861
+ }),
862
+ SCRIM: z6.object({
863
+ EventPresetName: z6.string(),
864
+ eventType: z6.string(),
865
+ bestOfN: z6.number(),
866
+ matchmakingStrategy: z6.string(),
867
+ queueID: z6.string(),
868
+ pointsConfig: z6.object({
869
+ PointsForWin: z6.number(),
870
+ PointsForLoss: z6.number()
871
+ })
872
+ }),
873
+ TOURNAMENT: z6.object({
874
+ EventPresetName: z6.string(),
875
+ eventType: z6.string(),
876
+ bestOfN: z6.number(),
877
+ matchmakingStrategy: z6.string(),
878
+ queueID: z6.string(),
879
+ pointsConfig: z6.object({
880
+ PointsForWin: z6.number(),
881
+ PointsForLoss: z6.number()
882
+ })
883
+ })
884
+ })
885
+ }),
886
+ REGULAR: z6.object({
887
+ EventPresetsByEventType: z6.object({
888
+ LEAGUE: z6.object({
889
+ EventPresetName: z6.string(),
890
+ eventType: z6.string(),
891
+ bestOfN: z6.number(),
892
+ matchmakingStrategy: z6.string(),
893
+ queueID: z6.string(),
894
+ pointsConfig: z6.object({
895
+ PointsForWin: z6.number(),
896
+ PointsForLoss: z6.number()
897
+ })
898
+ }),
899
+ SCRIM: z6.object({
900
+ EventPresetName: z6.string(),
901
+ eventType: z6.string(),
902
+ bestOfN: z6.number(),
903
+ matchmakingStrategy: z6.string(),
904
+ queueID: z6.string(),
905
+ pointsConfig: z6.object({
906
+ PointsForWin: z6.number(),
907
+ PointsForLoss: z6.number()
908
+ })
909
+ }),
910
+ TOURNAMENT: z6.object({
911
+ EventPresetName: z6.string(),
912
+ eventType: z6.string(),
913
+ bestOfN: z6.number(),
914
+ matchmakingStrategy: z6.string(),
915
+ queueID: z6.string(),
916
+ pointsConfig: z6.object({
917
+ PointsForWin: z6.number(),
918
+ PointsForLoss: z6.number()
919
+ })
920
+ })
921
+ })
922
+ })
923
+ }),
924
+ FlawlessPointRequirement: z6.number(),
925
+ ChampionshipPointRequirement: z6.number(),
926
+ ChampionshipEventID: z6.string(),
927
+ EnrollmentPhaseStartDateTime: z6.string(),
928
+ EnrollmentPhaseEndDateTime: z6.string(),
929
+ LeaderboardPlayoffQualificationDateTime: z6.string(),
930
+ LeaderboardPromotionFinalizationDateTime: z6.string(),
931
+ LeaderboardFinalizationDateTime: z6.string(),
932
+ ContenderEligibilityExpiryDateTime: z6.string(),
933
+ StageLockTime: z6.string(),
934
+ ParticipationRewards: z6.object({}),
935
+ TournamentWinnerRewards: z6.object({}),
936
+ DivisionWinnerRewards: z6.object({}),
937
+ RosterRecentActivityNumSeasons: z6.number()
938
+ }) }
939
+ };
940
+ var premierConferencesEndpoint = {
941
+ name: "Premier Conferences",
942
+ description: "Premier conferences of the region.",
943
+ category: "Premier Endpoints",
944
+ type: "pd",
945
+ suffix: "premier/v1/affinities/{region}/conferences",
946
+ riotRequirements: player,
947
+ responses: { "200": z6.object({
948
+ PremierConferences: z6.array(z6.object({
949
+ id: z6.string(),
950
+ key: z6.string(),
951
+ isSuper: z6.boolean(),
952
+ gamePods: z6.array(z6.string()),
953
+ timezone: z6.string(),
954
+ superConference: z6.string().optional(),
955
+ leaderboardPlayoffQualificationDateTime: z6.string(),
956
+ leaderboardPromotionFinalizationDateTime: z6.string()
957
+ }))
958
+ }) }
959
+ };
960
+ var premierMatchLimitEndpoint = {
961
+ name: "Premier Match Limit",
962
+ description: "How many Premier matches can still be played and when the limit resets.",
963
+ category: "Premier Endpoints",
964
+ type: "pd",
965
+ suffix: "premier/v1/matchlimitinfo",
966
+ riotRequirements: player,
967
+ responses: { "200": z6.object({
968
+ leagueMatchLimit: z6.number(),
969
+ tournamentLimit: z6.number(),
970
+ timeUntilNextResetSeconds: z6.number()
971
+ }) }
972
+ };
973
+ var premierEligibilityEndpoint = {
974
+ name: "Premier Eligibility",
975
+ description: "Whether the player can join a Premier roster.",
976
+ category: "Premier Endpoints",
977
+ type: "pd",
978
+ suffix: "premier/v1/player/eligibility",
979
+ riotRequirements: player,
980
+ responses: { "200": z6.object({
981
+ subject: z6.string(),
982
+ accountVerificationStatus: z6.boolean(),
983
+ rankedPlacementCompletionStatus: z6.boolean(),
984
+ matchLimitReached: z6.boolean(),
985
+ isOnProvidedRoster: z6.boolean()
986
+ }) }
987
+ };
988
+ var premierPlayerV2Endpoint = {
989
+ name: "Premier Player V2",
990
+ description: "Premier membership of a player: roster id and pending invites.",
991
+ category: "Premier Endpoints",
992
+ type: "pd",
993
+ suffix: "premier/v2/players/{puuid}",
994
+ riotRequirements: player,
995
+ responses: { "200": z6.object({
996
+ puuid: z6.string(),
997
+ rosterId: z6.string(),
998
+ version: z6.number(),
999
+ createdAt: z6.number(),
1000
+ updatedAt: z6.number()
1001
+ }) }
1002
+ };
1003
+ var premierPlayerV3Endpoint = {
1004
+ name: "Premier Player V3",
1005
+ description: "Like v2, with prestige and contender eligibility.",
1006
+ category: "Premier Endpoints",
1007
+ type: "pd",
1008
+ suffix: "premier/v3/players/{puuid}",
1009
+ riotRequirements: player,
1010
+ responses: { "200": z6.object({
1011
+ puuid: z6.string(),
1012
+ rosterId: z6.string(),
1013
+ prestige: z6.object({
1014
+ earnedPrestige: z6.boolean(),
1015
+ earnedAura: z6.boolean(),
1016
+ showTag: z6.boolean(),
1017
+ showPlating: z6.boolean(),
1018
+ showAura: z6.boolean()
1019
+ }),
1020
+ contenderEligibilityExpiry: z6.string(),
1021
+ socialVersion: z6.number(),
1022
+ premierVersion: z6.number(),
1023
+ updatedAt: z6.number(),
1024
+ seasons: z6.object({
1025
+ "08d281c5-4426-3aaa-3316-ebaf5f2c858a": z6.object({
1026
+ seasonId: z6.string(),
1027
+ hasEarnedPrestigeAura: z6.boolean(),
1028
+ hasEarnedParticipation: z6.boolean(),
1029
+ hasEarnedDivisionWinner: z6.boolean()
1030
+ }),
1031
+ "91be4c20-439d-8e24-f577-4ca8a98e8dc8": z6.object({
1032
+ seasonId: z6.string(),
1033
+ hasEarnedPrestigeAura: z6.boolean(),
1034
+ hasEarnedParticipation: z6.boolean(),
1035
+ hasEarnedDivisionWinner: z6.boolean()
1036
+ })
1037
+ })
1038
+ }) }
1039
+ };
1040
+
1041
+ // src/endpoints/riot/pvp.ts
1042
+ import { z as z7 } from "zod";
1043
+ var playerLoadoutV3Endpoint = {
1044
+ name: "Player Loadout V3",
1045
+ description: "Current loadout. The v2 route used by `pvp.playerLoadout` answers 404 on current clients.",
1046
+ category: "PVP Endpoints",
1047
+ type: "pd",
1048
+ suffix: "personalization/v3/players/{puuid}/playerloadout",
1049
+ riotRequirements: player,
1050
+ responses: { "200": z7.object({
1051
+ Subject: z7.string(),
1052
+ Version: z7.number(),
1053
+ Guns: z7.array(z7.object({
1054
+ ID: z7.string(),
1055
+ SkinID: z7.string(),
1056
+ SkinLevelID: z7.string(),
1057
+ ChromaID: z7.string(),
1058
+ CharmInstanceID: z7.string().optional(),
1059
+ CharmID: z7.string().optional(),
1060
+ CharmLevelID: z7.string().optional()
1061
+ })),
1062
+ ActiveExpressions: z7.array(z7.object({
1063
+ TypeID: z7.string(),
1064
+ AssetID: z7.string()
1065
+ })),
1066
+ DynamicOptions: z7.object({}),
1067
+ Identity: z7.object({
1068
+ PlayerCardID: z7.string(),
1069
+ PlayerTitleID: z7.string(),
1070
+ AccountLevel: z7.number(),
1071
+ PreferredLevelBorderID: z7.string(),
1072
+ HideAccountLevel: z7.boolean()
1073
+ }),
1074
+ Incognito: z7.boolean()
1075
+ }) }
1076
+ };
1077
+
1078
+ // src/endpoints/riot/restrictions.ts
1079
+ import { z as z8 } from "zod";
1080
+ var avoidListEndpoint = {
1081
+ name: "Avoid List",
1082
+ description: "Players the account avoids in matchmaking.",
1083
+ category: "Restriction Endpoints",
1084
+ type: "pd",
1085
+ suffix: "restrictions/v1/avoidList",
1086
+ riotRequirements: player,
1087
+ responses: { "200": z8.object({
1088
+ Subject: z8.string()
1089
+ }) }
1090
+ };
1091
+ var activeFutureInterventionsEndpoint = {
1092
+ name: "Active Future Interventions",
1093
+ description: "Upcoming or active restrictions of the account, by category.",
1094
+ category: "Restriction Endpoints",
1095
+ type: "pd",
1096
+ suffix: "restrictions/v1/activeFutureInterventions",
1097
+ riotRequirements: player,
1098
+ responses: { "200": z8.object({
1099
+ Subject: z8.string()
1100
+ }) }
1101
+ };
1102
+
1103
+ // src/endpoints/riot/store.ts
1104
+ import { z as z9 } from "zod";
1105
+ var agentStoreEndpoint = {
1106
+ name: "Agent Store",
1107
+ description: "Agents offered in the store.",
1108
+ category: "Store Endpoints",
1109
+ type: "pd",
1110
+ suffix: "store/v1/storefronts/agent",
1111
+ riotRequirements: player,
1112
+ responses: { "200": z9.object({
1113
+ AgentStore: z9.object({
1114
+ AgentStoreOffers: z9.array(z9.object({
1115
+ AgentID: z9.string(),
1116
+ StoreOffers: z9.array(z9.object({
1117
+ OfferID: z9.string(),
1118
+ IsDirectPurchase: z9.boolean(),
1119
+ StartDate: z9.string(),
1120
+ Cost: z9.record(z9.string(), z9.number()),
1121
+ Rewards: z9.array(z9.object({
1122
+ ItemTypeID: z9.string(),
1123
+ ItemID: z9.string(),
1124
+ Quantity: z9.number()
1125
+ }))
1126
+ }))
1127
+ })),
1128
+ CurrentFeaturedAgent: z9.string(),
1129
+ NextFeaturedAgent: z9.string()
1130
+ })
1131
+ }) }
1132
+ };
1133
+ var allEntitlementsEndpoint = {
1134
+ name: "All Entitlements",
1135
+ description: "Everything the player owns, grouped by item type. This is the call without an item type, which is the shape `store.ownedItems` describes.",
1136
+ category: "Store Endpoints",
1137
+ type: "pd",
1138
+ suffix: "store/v1/entitlements/{puuid}",
1139
+ riotRequirements: player,
1140
+ responses: { "200": z9.object({
1141
+ EntitlementsByTypes: z9.array(z9.object({
1142
+ ItemTypeID: z9.string(),
1143
+ Entitlements: z9.array(z9.object({
1144
+ TypeID: z9.string(),
1145
+ ItemID: z9.string(),
1146
+ InstanceID: z9.string().optional()
1147
+ }))
1148
+ }))
1149
+ }) }
1150
+ };
1151
+
1152
+ // src/endpoints/riot/storefront.ts
1153
+ import { z as z10 } from "zod";
1154
+ var storefrontV3Endpoint = {
1155
+ name: "Storefront V3",
1156
+ 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.",
1157
+ category: "Store Endpoints",
1158
+ type: "pd",
1159
+ method: "POST",
1160
+ suffix: "store/v3/storefront/{puuid}",
1161
+ headers: /* @__PURE__ */ new Map([["Content-Type", "application/json"]]),
1162
+ riotRequirements: player,
1163
+ responses: { "200": z10.object({
1164
+ FeaturedBundle: z10.object({
1165
+ Bundle: z10.object({
1166
+ ID: z10.string(),
1167
+ DataAssetID: z10.string(),
1168
+ CurrencyID: z10.string(),
1169
+ Items: z10.array(z10.object({
1170
+ Item: z10.object({
1171
+ ItemTypeID: z10.string(),
1172
+ ItemID: z10.string(),
1173
+ Amount: z10.number()
1174
+ }),
1175
+ BasePrice: z10.number(),
1176
+ CurrencyID: z10.string(),
1177
+ DiscountPercent: z10.number(),
1178
+ DiscountedPrice: z10.number(),
1179
+ IsPromoItem: z10.boolean()
1180
+ })),
1181
+ ItemOffers: z10.array(z10.object({
1182
+ BundleItemOfferID: z10.string(),
1183
+ Offer: z10.object({
1184
+ OfferID: z10.string(),
1185
+ IsDirectPurchase: z10.boolean(),
1186
+ StartDate: z10.string(),
1187
+ Cost: z10.object({
1188
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1189
+ }),
1190
+ Rewards: z10.array(z10.object({
1191
+ ItemTypeID: z10.string(),
1192
+ ItemID: z10.string(),
1193
+ Quantity: z10.number()
1194
+ }))
1195
+ }),
1196
+ DiscountPercent: z10.number(),
1197
+ DiscountedCost: z10.object({
1198
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1199
+ })
1200
+ })),
1201
+ TotalBaseCost: z10.object({
1202
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1203
+ }),
1204
+ TotalDiscountedCost: z10.object({
1205
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1206
+ }),
1207
+ TotalDiscountPercent: z10.number(),
1208
+ DurationRemainingInSeconds: z10.number(),
1209
+ WholesaleOnly: z10.boolean(),
1210
+ IsGiftable: z10.number()
1211
+ }),
1212
+ Bundles: z10.array(z10.object({
1213
+ ID: z10.string(),
1214
+ DataAssetID: z10.string(),
1215
+ CurrencyID: z10.string(),
1216
+ Items: z10.array(z10.object({
1217
+ Item: z10.object({
1218
+ ItemTypeID: z10.string(),
1219
+ ItemID: z10.string(),
1220
+ Amount: z10.number()
1221
+ }),
1222
+ BasePrice: z10.number(),
1223
+ CurrencyID: z10.string(),
1224
+ DiscountPercent: z10.number(),
1225
+ DiscountedPrice: z10.number(),
1226
+ IsPromoItem: z10.boolean()
1227
+ })),
1228
+ ItemOffers: z10.array(z10.object({
1229
+ BundleItemOfferID: z10.string(),
1230
+ Offer: z10.object({
1231
+ OfferID: z10.string(),
1232
+ IsDirectPurchase: z10.boolean(),
1233
+ StartDate: z10.string(),
1234
+ Cost: z10.object({
1235
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1236
+ }),
1237
+ Rewards: z10.array(z10.object({
1238
+ ItemTypeID: z10.string(),
1239
+ ItemID: z10.string(),
1240
+ Quantity: z10.number()
1241
+ }))
1242
+ }),
1243
+ DiscountPercent: z10.number(),
1244
+ DiscountedCost: z10.object({
1245
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1246
+ })
1247
+ })),
1248
+ TotalBaseCost: z10.object({
1249
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1250
+ }),
1251
+ TotalDiscountedCost: z10.object({
1252
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1253
+ }),
1254
+ TotalDiscountPercent: z10.number(),
1255
+ DurationRemainingInSeconds: z10.number(),
1256
+ WholesaleOnly: z10.boolean(),
1257
+ IsGiftable: z10.number()
1258
+ })),
1259
+ FeaturedTileEntries: z10.array(z10.object({
1260
+ Type: z10.number(),
1261
+ Entry: z10.object({
1262
+ Bundle: z10.object({
1263
+ ID: z10.string(),
1264
+ DataAssetID: z10.string(),
1265
+ CurrencyID: z10.string(),
1266
+ Items: z10.array(z10.object({
1267
+ Item: z10.object({
1268
+ ItemTypeID: z10.string(),
1269
+ ItemID: z10.string(),
1270
+ Amount: z10.number()
1271
+ }),
1272
+ BasePrice: z10.number(),
1273
+ CurrencyID: z10.string(),
1274
+ DiscountPercent: z10.number(),
1275
+ DiscountedPrice: z10.number(),
1276
+ IsPromoItem: z10.boolean()
1277
+ })),
1278
+ ItemOffers: z10.array(z10.object({
1279
+ BundleItemOfferID: z10.string(),
1280
+ Offer: z10.object({
1281
+ OfferID: z10.string(),
1282
+ IsDirectPurchase: z10.boolean(),
1283
+ StartDate: z10.string(),
1284
+ Cost: z10.object({
1285
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1286
+ }),
1287
+ Rewards: z10.array(z10.object({
1288
+ ItemTypeID: z10.string(),
1289
+ ItemID: z10.string(),
1290
+ Quantity: z10.number()
1291
+ }))
1292
+ }),
1293
+ DiscountPercent: z10.number(),
1294
+ DiscountedCost: z10.object({
1295
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1296
+ })
1297
+ })),
1298
+ TotalBaseCost: z10.object({
1299
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1300
+ }),
1301
+ TotalDiscountedCost: z10.object({
1302
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1303
+ }),
1304
+ TotalDiscountPercent: z10.number(),
1305
+ DurationRemainingInSeconds: z10.number(),
1306
+ WholesaleOnly: z10.boolean(),
1307
+ IsGiftable: z10.number()
1308
+ })
1309
+ })
1310
+ })),
1311
+ BundleRemainingDurationInSeconds: z10.number()
1312
+ }),
1313
+ SkinsPanelLayout: z10.object({
1314
+ SingleItemOffers: z10.array(z10.string()),
1315
+ SingleItemStoreOffers: z10.array(z10.object({
1316
+ OfferID: z10.string(),
1317
+ IsDirectPurchase: z10.boolean(),
1318
+ StartDate: z10.string(),
1319
+ Cost: z10.object({
1320
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1321
+ }),
1322
+ Rewards: z10.array(z10.object({
1323
+ ItemTypeID: z10.string(),
1324
+ ItemID: z10.string(),
1325
+ Quantity: z10.number()
1326
+ }))
1327
+ })),
1328
+ SingleItemOffersRemainingDurationInSeconds: z10.number()
1329
+ }),
1330
+ UpgradeCurrencyStore: z10.object({
1331
+ UpgradeCurrencyOffers: z10.array(z10.object({
1332
+ OfferID: z10.string(),
1333
+ StorefrontItemID: z10.string(),
1334
+ Offer: z10.object({
1335
+ OfferID: z10.string(),
1336
+ IsDirectPurchase: z10.boolean(),
1337
+ StartDate: z10.string(),
1338
+ Cost: z10.object({
1339
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1340
+ }),
1341
+ Rewards: z10.array(z10.object({
1342
+ ItemTypeID: z10.string(),
1343
+ ItemID: z10.string(),
1344
+ Quantity: z10.number()
1345
+ }))
1346
+ }),
1347
+ DiscountedPercent: z10.number()
1348
+ }))
1349
+ }),
1350
+ AccessoryStore: z10.object({
1351
+ AccessoryStoreOffers: z10.array(z10.object({
1352
+ Offer: z10.object({
1353
+ OfferID: z10.string(),
1354
+ IsDirectPurchase: z10.boolean(),
1355
+ StartDate: z10.string(),
1356
+ Cost: z10.object({
1357
+ "85ca954a-41f2-ce94-9b45-8ca3dd39a00d": z10.number()
1358
+ }),
1359
+ Rewards: z10.array(z10.object({
1360
+ ItemTypeID: z10.string(),
1361
+ ItemID: z10.string(),
1362
+ Quantity: z10.number()
1363
+ }))
1364
+ }),
1365
+ ContractID: z10.string()
1366
+ })),
1367
+ AccessoryStoreRemainingDurationInSeconds: z10.number(),
1368
+ StorefrontID: z10.string()
1369
+ }),
1370
+ PluginStores: z10.array(z10.object({
1371
+ PluginID: z10.string(),
1372
+ PluginOffers: z10.object({
1373
+ StoreOffers: z10.array(z10.object({
1374
+ PurchaseInformation: z10.object({
1375
+ DataAssetID: z10.string(),
1376
+ OfferID: z10.string(),
1377
+ OfferType: z10.number(),
1378
+ StartDate: z10.string(),
1379
+ PrimaryCurrencyID: z10.string(),
1380
+ Cost: z10.object({
1381
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1382
+ }),
1383
+ DiscountedCost: z10.object({
1384
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1385
+ }),
1386
+ DiscountedPercentage: z10.number(),
1387
+ WholesaleOnly: z10.boolean(),
1388
+ IsGiftable: z10.number()
1389
+ }),
1390
+ SubOffers: z10.array(z10.object({
1391
+ PurchaseInformation: z10.object({
1392
+ DataAssetID: z10.string(),
1393
+ OfferID: z10.string(),
1394
+ OfferType: z10.number(),
1395
+ StartDate: z10.string(),
1396
+ PrimaryCurrencyID: z10.string(),
1397
+ Cost: z10.object({
1398
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1399
+ }),
1400
+ DiscountedCost: z10.object({
1401
+ "85ad13f7-3d1b-5128-9eb2-7cd8ee0b5741": z10.number()
1402
+ }),
1403
+ DiscountedPercentage: z10.number(),
1404
+ Rewards: z10.array(z10.object({
1405
+ ItemTypeID: z10.string(),
1406
+ ItemID: z10.string(),
1407
+ Quantity: z10.number()
1408
+ })),
1409
+ WholesaleOnly: z10.boolean(),
1410
+ IsGiftable: z10.number()
1411
+ })
1412
+ }))
1413
+ })),
1414
+ RemainingDurationInSeconds: z10.number()
1415
+ }),
1416
+ StartDate: z10.string()
1417
+ }))
1418
+ }) }
433
1419
  };
1420
+
1421
+ // src/endpoints/riot/voice.ts
1422
+ import { z as z11 } from "zod";
434
1423
  var voiceAudioPropertiesEndpoint = {
435
1424
  name: "Audio Properties",
436
1425
  description: "Get audio properties such as if the microphone is in use",
437
- queryName: "VOICE_CHAT_RNet_FetchAudioProperties",
438
1426
  category: "Local Endpoints - Voice",
439
1427
  type: "local",
440
1428
  suffix: "voice-chat/v1/audio-properties",
441
1429
  riotRequirements: { localAuth: true },
442
- responses: { "200": z2.unknown() }
1430
+ responses: { "200": z11.object({
1431
+ fastEnergyMeter: z11.number(),
1432
+ isLoopbackEnabled: z11.boolean(),
1433
+ isMicActive: z11.boolean(),
1434
+ isSpeakerActive: z11.boolean(),
1435
+ micEnergy: z11.number(),
1436
+ micVolume: z11.number(),
1437
+ noiseFloorMeter: z11.number(),
1438
+ speakerEnergy: z11.number(),
1439
+ speakerVolume: z11.number(),
1440
+ speechThresholdMeter: z11.number()
1441
+ }) }
443
1442
  };
444
1443
  var voiceCaptureDevicesEndpoint = {
445
1444
  name: "Capture Devices",
446
1445
  description: "Get microphone input device info",
447
- queryName: "VOICE_CHAT_RNet_FetchCaptureDevices",
448
1446
  category: "Local Endpoints - Voice",
449
1447
  type: "local",
450
1448
  suffix: "voice-chat/v2/devices/capture",
451
1449
  riotRequirements: { localAuth: true },
452
- responses: { "200": z2.unknown() }
453
- };
454
- var voicePushToTalkEndpoint = {
455
- name: "Push To Talk",
456
- description: "GET VOICE_CHAT_RNet_FetchPTTSettings",
457
- queryName: "VOICE_CHAT_RNet_FetchPTTSettings",
458
- category: "Local Endpoints - Voice",
459
- type: "local",
460
- suffix: "voice-chat/v2/push-to-talk/valorant",
461
- riotRequirements: { localAuth: true },
462
- responses: { "200": z2.unknown() }
1450
+ responses: { "200": z11.array(z11.object({
1451
+ handle: z11.string(),
1452
+ is_current_device: z11.boolean(),
1453
+ is_default: z11.boolean(),
1454
+ is_effective_device: z11.boolean(),
1455
+ name: z11.string()
1456
+ })) }
463
1457
  };
464
1458
  var voiceRenderDevicesEndpoint = {
465
1459
  name: "Render Devices",
466
1460
  description: "Get audio output devices",
467
- queryName: "VOICE_CHAT_RNet_FetchRenderDevices",
468
1461
  category: "Local Endpoints - Voice",
469
1462
  type: "local",
470
1463
  suffix: "voice-chat/v2/devices/render",
471
1464
  riotRequirements: { localAuth: true },
472
- responses: { "200": z2.unknown() }
1465
+ responses: { "200": z11.array(z11.object({
1466
+ handle: z11.string(),
1467
+ is_current_device: z11.boolean(),
1468
+ is_default: z11.boolean(),
1469
+ is_effective_device: z11.boolean(),
1470
+ name: z11.string()
1471
+ })) }
473
1472
  };
474
- var voiceSessionsEndpoint = {
475
- name: "Sessions",
476
- description: "GET VOICE_CHAT_RNet_FetchSessions",
477
- queryName: "VOICE_CHAT_RNet_FetchSessions",
478
- category: "Local Endpoints - Voice",
479
- type: "local",
480
- suffix: "voice-chat/v3/sessions/valorant",
481
- riotRequirements: { localAuth: true },
482
- responses: { "200": z2.unknown() }
1473
+
1474
+ // src/api/groups/pvp.ts
1475
+ var pvp = {
1476
+ content: e.fetchContentEndpoint,
1477
+ accountXp: e.accountXPEndpoint,
1478
+ playerLoadout: e.playerLoadoutEndpoint,
1479
+ setPlayerLoadout: e.setPlayerLoadoutEndpoint,
1480
+ playerMmr: e.playerMMREndpoint,
1481
+ matchHistory: e.matchHistoryEndpoint,
1482
+ matchDetails: e.matchDetailsEndpoint,
1483
+ competitiveUpdates: e.competitiveUpdatesEndpoint,
1484
+ leaderboard: e.leaderboardEndpoint,
1485
+ penalties: e.penaltiesEndpoint,
1486
+ config: e.configEndpoint,
1487
+ nameService: e.nameServiceEndpoint,
1488
+ playerLoadoutV3: playerLoadoutV3Endpoint
483
1489
  };
484
- var voiceSettingsEndpoint = {
485
- name: "Settings",
486
- description: "GET VOICE_CHAT_RNet_FetchSettings",
487
- queryName: "VOICE_CHAT_RNet_FetchSettings",
488
- category: "Local Endpoints - Voice",
489
- type: "local",
490
- suffix: "voice-chat/v3/settings/valorant",
491
- riotRequirements: { localAuth: true },
492
- responses: { "200": z2.unknown() }
493
- };
494
- var pregameChatTokenEndpoint = {
495
- name: "Chat Token",
496
- description: "Get a chat token",
497
- queryName: "Pregame_FetchChatToken",
498
- category: "Pre-Game Endpoints",
499
- type: "glz",
500
- suffix: "pregame/v1/matches/{pre-game match id}/chattoken",
501
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
502
- responses: { "200": z2.unknown() }
503
- };
504
- var pregameVoiceTokenEndpoint = {
505
- name: "Voice Token",
506
- description: "Get a voice token",
507
- queryName: "Pregame_FetchVoiceToken",
508
- category: "Pre-Game Endpoints",
509
- type: "glz",
510
- suffix: "pregame/v1/matches/{pre-game match id}/voicetoken",
511
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
512
- responses: { "200": z2.unknown() }
513
- };
514
- var sessionGetEndpoint = {
515
- name: "Get",
516
- description: "Get information about the current game session",
517
- queryName: "Session_Get",
518
- category: "Session Endpoints",
519
- type: "glz",
520
- suffix: "session/v1/sessions/{puuid}",
521
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
522
- responses: { "200": z2.unknown() }
523
- };
524
- var sessionReconnectEndpoint = {
525
- name: "Reconnect",
526
- description: "GET Session_ReConnect",
527
- queryName: "Session_ReConnect",
528
- category: "Session Endpoints",
529
- type: "glz",
530
- suffix: "session/v1/sessions/{puuid}/reconnect",
531
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
532
- responses: { "200": z2.unknown() }
533
- };
534
- var storeOrderEndpoint = {
535
- name: "Order",
536
- description: "GET Store_GetOrder",
537
- queryName: "Store_GetOrder",
538
- category: "Store Endpoints",
539
- type: "pd",
540
- suffix: "store/v1/order/{order id}",
541
- riotRequirements: { entitlement: true, token: true, clientPlatform: true, clientVersion: true },
542
- responses: { "200": z2.unknown() }
543
- };
544
- var localPlayerSettingsEndpoint = {
545
- name: "Player Settings",
546
- description: "Get client settings",
547
- queryName: "RiotKV_RNet_GetSettings",
548
- category: "Local Endpoints",
549
- type: "local",
550
- suffix: "player-preferences/v1/data-json/Ares.PlayerSettings",
551
- riotRequirements: { localAuth: true },
552
- responses: { "200": z2.unknown() }
1490
+
1491
+ // src/api/groups/party.ts
1492
+ import { endpoints as e2 } from "valorant-api-types";
1493
+ var party = {
1494
+ get: e2.partyEndpoint,
1495
+ player: e2.partyPlayerEndpoint,
1496
+ removePlayer: e2.partyRemovePlayerEndpoint,
1497
+ setMemberReady: e2.partySetMemberReadyEndpoint,
1498
+ refreshCompetitiveTier: e2.refreshCompetitiveTierEndpoint,
1499
+ refreshPlayerIdentity: e2.refreshPlayerIdentityEndpoint,
1500
+ refreshPings: e2.refreshPingsEndpoint,
1501
+ changeQueue: e2.changeQueueEndpoint,
1502
+ startCustomGame: e2.startCustomGameEndpoint,
1503
+ enterMatchmakingQueue: e2.enterMatchmakingQueueEndpoint,
1504
+ leaveMatchmakingQueue: e2.leaveMatchmakingQueueEndpoint,
1505
+ setAccessibility: e2.setPartyAccessibilityEndpoint,
1506
+ setCustomGameSettings: e2.setCustomGameSettingsEndpoint,
1507
+ invite: e2.partyInviteEndpoint,
1508
+ requestToJoin: e2.partyRequestEndpoint,
1509
+ declineRequest: e2.partyDeclineEndpoint,
1510
+ customGameConfigs: e2.customGameConfigsEndpoint,
1511
+ chatToken: e2.partyChatTokenEndpoint,
1512
+ voiceToken: e2.partyVoiceTokenEndpoint,
1513
+ disableCode: e2.partyDisableCodeEndpoint,
1514
+ generateCode: e2.partyGenerateCodeEndpoint,
1515
+ joinByCode: e2.partyJoinByCodeEndpoint
1516
+ };
1517
+
1518
+ // src/api/groups/store.ts
1519
+ import { endpoints as e3 } from "valorant-api-types";
1520
+ var store = {
1521
+ prices: e3.pricesEndpoint,
1522
+ storefront: e3.storefrontEndpoint,
1523
+ wallet: e3.walletEndpoint,
1524
+ ownedItems: e3.ownedItemsEndpoint,
1525
+ storefrontV3: storefrontV3Endpoint,
1526
+ agentStore: agentStoreEndpoint,
1527
+ allEntitlements: allEntitlementsEndpoint
1528
+ };
1529
+
1530
+ // src/api/groups/pregame.ts
1531
+ import { endpoints as e4 } from "valorant-api-types";
1532
+ var pregame = {
1533
+ player: e4.pregamePlayerEndpoint,
1534
+ match: e4.pregameMatchEndpoint,
1535
+ loadouts: e4.pregameLoadoutsEndpoint,
1536
+ selectCharacter: e4.selectCharacterEndpoint,
1537
+ lockCharacter: e4.lockCharacterEndpoint,
1538
+ quit: e4.pregameQuitEndpoint
1539
+ };
1540
+
1541
+ // src/api/groups/currentGame.ts
1542
+ import { endpoints as e5 } from "valorant-api-types";
1543
+ var currentGame = {
1544
+ player: e5.currentGamePlayerEndpoint,
1545
+ match: e5.currentGameMatchEndpoint,
1546
+ loadouts: e5.currentGameLoadoutsEndpoint,
1547
+ quit: e5.currentGameQuitEndpoint
1548
+ };
1549
+
1550
+ // src/api/groups/contracts.ts
1551
+ import { endpoints as e6 } from "valorant-api-types";
1552
+ var contracts = {
1553
+ itemUpgrades: e6.itemUpgradesEndpoint,
1554
+ list: e6.contractsEndpoint,
1555
+ activate: e6.activateContractEndpoint,
1556
+ activeRecruitmentEvent: activeRecruitmentEventEndpoint
1557
+ };
1558
+
1559
+ // src/api/groups/local.ts
1560
+ import { endpoints as e7 } from "valorant-api-types";
1561
+ var local = {
1562
+ help: e7.localHelpEndpoint,
1563
+ sessions: e7.sessionsEndpoint,
1564
+ rsoUserInfo: e7.rsoUserInfoEndpoint,
1565
+ clientRegion: e7.clientRegionEndpoint,
1566
+ accountAlias: e7.accountAliasEndpoint,
1567
+ entitlementsToken: e7.entitlementsTokenEndpoint,
1568
+ chatSession: e7.chatSessionEndpoint,
1569
+ friends: e7.friendsEndpoint,
1570
+ sendFriendRequest: e7.sendFriendRequestEndpoint,
1571
+ removeFriendRequest: e7.removeFriendRequestEndpoint,
1572
+ presence: e7.presenceEndpoint,
1573
+ friendRequests: e7.friendRequestsEndpoint,
1574
+ swaggerDocs: e7.localSwaggerDocsEndpoint,
1575
+ eula: localEulaEndpoint,
1576
+ privacyPolicy: localPrivacyPolicyEndpoint,
1577
+ availableLocales: localAvailableLocalesEndpoint,
1578
+ locale: localLocaleEndpoint,
1579
+ riotStatus: localRiotStatusEndpoint,
1580
+ accessToken: localAccessTokenEndpoint,
1581
+ pluginStatus: localPluginStatusEndpoint,
1582
+ rmsSession: localRmsSessionEndpoint,
1583
+ processInfo: localProcessInfoEndpoint,
1584
+ logPath: localLogPathEndpoint
1585
+ };
1586
+
1587
+ // src/api/groups/chat.ts
1588
+ import { endpoints as e8 } from "valorant-api-types";
1589
+ var chat = {
1590
+ partyInfo: e8.partyChatInfoEndpoint,
1591
+ pregameInfo: e8.pregameChatInfoEndpoint,
1592
+ currentGameInfo: e8.currentGameChatInfoEndpoint,
1593
+ allInfo: e8.allChatInfoEndpoint,
1594
+ participants: e8.chatParticipantsEndpoint,
1595
+ send: e8.sendChatEndpoint,
1596
+ history: e8.chatHistoryEndpoint,
1597
+ settings: chatSettingsEndpoint,
1598
+ tournamentInfo: chatTournamentInfoEndpoint
1599
+ };
1600
+
1601
+ // src/api/groups/voice.ts
1602
+ var voice = {
1603
+ audioProperties: voiceAudioPropertiesEndpoint,
1604
+ captureDevices: voiceCaptureDevicesEndpoint,
1605
+ renderDevices: voiceRenderDevicesEndpoint
1606
+ };
1607
+
1608
+ // src/api/groups/premier.ts
1609
+ var premier = {
1610
+ seasons: premierSeasonsEndpoint,
1611
+ activeSeason: premierActiveSeasonEndpoint,
1612
+ conferences: premierConferencesEndpoint,
1613
+ matchLimit: premierMatchLimitEndpoint,
1614
+ eligibility: premierEligibilityEndpoint,
1615
+ playerV2: premierPlayerV2Endpoint,
1616
+ playerV3: premierPlayerV3Endpoint
1617
+ };
1618
+
1619
+ // src/api/groups/esports.ts
1620
+ var esports = {
1621
+ liveEventTimes: esportsLiveEventTimesEndpoint,
1622
+ upcomingMatches: esportsUpcomingMatchesEndpoint,
1623
+ pickemLeagues: esportsPickemLeaguesEndpoint
1624
+ };
1625
+
1626
+ // src/api/groups/restrictions.ts
1627
+ var restrictions = {
1628
+ avoidList: avoidListEndpoint,
1629
+ activeFutureInterventions: activeFutureInterventionsEndpoint
553
1630
  };
554
1631
 
555
- // src/extra/store.ts
556
- import { z as z3 } from "zod";
557
- var offerSchema = z3.object({
558
- OfferID: z3.string(),
559
- IsDirectPurchase: z3.boolean(),
560
- StartDate: z3.string(),
561
- Cost: z3.record(z3.string(), z3.number()),
562
- Rewards: z3.array(z3.object({
563
- ItemTypeID: z3.string(),
564
- ItemID: z3.string(),
565
- Quantity: z3.number()
566
- }).passthrough())
1632
+ // src/api/groups/account.ts
1633
+ var account = {
1634
+ dailyTicket: dailyTicketEndpoint,
1635
+ dailyTicketQueueConfig: dailyTicketQueueConfigEndpoint,
1636
+ favorites: favoritesEndpoint,
1637
+ goldstars: goldstarsEndpoint,
1638
+ goldstarsPlayer: goldstarsPlayerEndpoint,
1639
+ bloomlineQueues: bloomlineQueuesEndpoint,
1640
+ bloomlinePlayer: bloomlinePlayerEndpoint
1641
+ };
1642
+
1643
+ // src/api/groups/auth.ts
1644
+ import { endpoints as e9 } from "valorant-api-types";
1645
+ var auth = {
1646
+ cookies: e9.authCookiesEndpoint,
1647
+ request: e9.authRequestEndpoint,
1648
+ multiFactor: e9.multiFactorAuthenticationEndpoint,
1649
+ cookieReauth: e9.cookieReauthEndpoint,
1650
+ entitlement: e9.entitlementEndpoint,
1651
+ playerInfo: e9.playerInfoEndpoint,
1652
+ riotGeo: e9.riotGeoEndpoint,
1653
+ pasToken: e9.pasTokenEndpoint,
1654
+ riotClientConfig: e9.riotClientConfigEndpoint
1655
+ };
1656
+
1657
+ // src/endpoints/catalog/index.ts
1658
+ import { z as z14 } from "zod";
1659
+
1660
+ // src/endpoints/catalog/factory.ts
1661
+ import { z as z12 } from "zod";
1662
+
1663
+ // src/envelope.ts
1664
+ var enveloped = /* @__PURE__ */ new WeakSet();
1665
+ function markEnveloped(endpoint2) {
1666
+ enveloped.add(endpoint2);
1667
+ return endpoint2;
1668
+ }
1669
+ function unwrapEnvelope(endpoint2, body) {
1670
+ if (enveloped.has(endpoint2) && typeof body === "object" && body !== null && "data" in body) {
1671
+ return body.data;
1672
+ }
1673
+ return body;
1674
+ }
1675
+
1676
+ // src/endpoints/catalog/factory.ts
1677
+ var BASE = "https://valorant-api.com/v1/";
1678
+ function query(queryParams = []) {
1679
+ return new Map([
1680
+ ["language", z12.string().optional().describe("Language code such as `fr-FR`. Defaults to `en-US`.")],
1681
+ ...queryParams
1682
+ ]);
1683
+ }
1684
+ function endpoint(name, description, path, schema, queryParams = []) {
1685
+ return markEnveloped({
1686
+ name,
1687
+ description,
1688
+ category: "Valorant-API.com",
1689
+ type: "other",
1690
+ suffix: `${BASE}${path}`,
1691
+ query: query(queryParams),
1692
+ responses: { "200": schema }
1693
+ });
1694
+ }
1695
+ function collection(title, singular, path, schema, queryParams = []) {
1696
+ return {
1697
+ list: endpoint(title, `List of ${title.toLowerCase()}`, path, z12.array(schema), queryParams),
1698
+ one: endpoint(singular, `One ${singular.toLowerCase()} by UUID`, `${path}/{uuid}`, schema)
1699
+ };
1700
+ }
1701
+
1702
+ // src/endpoints/catalog/schemas.ts
1703
+ import { z as z13 } from "zod";
1704
+ var text = z13.string().nullish();
1705
+ var asset = z13.object({
1706
+ uuid: z13.string(),
1707
+ displayName: text,
1708
+ displayIcon: text,
1709
+ assetPath: text
1710
+ }).passthrough();
1711
+ var agentSchema = asset.extend({
1712
+ description: text,
1713
+ developerName: text,
1714
+ characterTags: z13.array(z13.string()).nullish(),
1715
+ displayIconSmall: text,
1716
+ bustPortrait: text,
1717
+ fullPortrait: text,
1718
+ killfeedPortrait: text,
1719
+ background: text,
1720
+ isPlayableCharacter: z13.boolean(),
1721
+ role: z13.object({ uuid: z13.string(), displayName: text, description: text, displayIcon: text }).passthrough().nullish(),
1722
+ abilities: z13.array(z13.object({ slot: z13.string(), displayName: text, description: text, displayIcon: text }).passthrough()).nullish()
1723
+ });
1724
+ var mapSchema = asset.extend({
1725
+ coordinates: text,
1726
+ listViewIcon: text,
1727
+ splash: text,
1728
+ mapUrl: text,
1729
+ xMultiplier: z13.number(),
1730
+ yMultiplier: z13.number(),
1731
+ xScalarToAdd: z13.number(),
1732
+ yScalarToAdd: z13.number(),
1733
+ callouts: z13.array(z13.object({ regionName: z13.string(), superRegionName: z13.string(), location: z13.object({ x: z13.number(), y: z13.number() }) }).passthrough()).nullish()
1734
+ });
1735
+ var weaponSchema = asset.extend({
1736
+ category: z13.string(),
1737
+ defaultSkinUuid: z13.string(),
1738
+ killStreamIcon: text,
1739
+ weaponStats: z13.object({}).passthrough().nullish(),
1740
+ shopData: z13.object({}).passthrough().nullish(),
1741
+ skins: z13.array(z13.object({}).passthrough())
1742
+ });
1743
+ var skinSchema = asset.extend({
1744
+ themeUuid: z13.string(),
1745
+ contentTierUuid: text,
1746
+ wallpaper: text,
1747
+ chromas: z13.array(asset.passthrough()),
1748
+ levels: z13.array(asset.passthrough())
1749
+ });
1750
+ var seasonSchema = z13.object({
1751
+ uuid: z13.string(),
1752
+ displayName: text,
1753
+ type: text,
1754
+ startTime: z13.string(),
1755
+ endTime: z13.string(),
1756
+ parentUuid: text,
1757
+ assetPath: text
567
1758
  }).passthrough();
568
- var bundleSchema = z3.object({
569
- ID: z3.string(),
570
- DataAssetID: z3.string(),
571
- CurrencyID: z3.string(),
572
- Items: z3.array(z3.unknown()),
573
- ItemOffers: z3.array(z3.unknown()).nullish(),
574
- TotalBaseCost: z3.record(z3.string(), z3.number()).nullish(),
575
- TotalDiscountedCost: z3.record(z3.string(), z3.number()).nullish(),
576
- TotalDiscountPercent: z3.number(),
577
- DurationRemainingInSeconds: z3.number(),
578
- WholesaleOnly: z3.boolean()
1759
+ var versionSchema = z13.object({
1760
+ manifestId: z13.string(),
1761
+ branch: z13.string(),
1762
+ version: z13.string(),
1763
+ buildVersion: z13.string(),
1764
+ engineVersion: z13.string(),
1765
+ riotClientVersion: z13.string().describe("Value of the X-Riot-ClientVersion header"),
1766
+ riotClientBuild: z13.string(),
1767
+ buildDate: z13.string()
579
1768
  }).passthrough();
580
- var storefrontV3Endpoint = {
581
- name: "Storefront V3",
582
- 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.",
583
- queryName: "Store_GetStorefrontV3",
584
- category: "Store Endpoints",
585
- type: "pd",
586
- method: "POST",
587
- suffix: "store/v3/storefront/{puuid}",
588
- headers: /* @__PURE__ */ new Map([["Content-Type", "application/json"]]),
589
- riotRequirements: {
590
- token: true,
591
- entitlement: true,
592
- clientPlatform: true,
593
- clientVersion: true
594
- },
595
- responses: {
596
- "200": z3.object({
597
- FeaturedBundle: z3.object({
598
- Bundle: bundleSchema,
599
- Bundles: z3.array(bundleSchema),
600
- BundleRemainingDurationInSeconds: z3.number()
601
- }).passthrough(),
602
- SkinsPanelLayout: z3.object({
603
- SingleItemOffers: z3.array(z3.string()),
604
- SingleItemStoreOffers: z3.array(offerSchema),
605
- SingleItemOffersRemainingDurationInSeconds: z3.number()
606
- }).passthrough(),
607
- UpgradeCurrencyStore: z3.object({
608
- UpgradeCurrencyOffers: z3.array(z3.object({ OfferID: z3.string(), StorefrontItemID: z3.string() }).passthrough())
609
- }).passthrough(),
610
- AccessoryStore: z3.object({
611
- AccessoryStoreOffers: z3.array(z3.object({ Offer: offerSchema, ContractID: z3.string() }).passthrough()),
612
- AccessoryStoreRemainingDurationInSeconds: z3.number(),
613
- StorefrontID: z3.string()
614
- }).passthrough(),
615
- BonusStore: z3.object({
616
- BonusStoreOffers: z3.array(z3.unknown()),
617
- BonusStoreRemainingDurationInSeconds: z3.number()
618
- }).passthrough().optional().describe("Only present while the night market is active"),
619
- PluginStores: z3.array(z3.object({ PluginID: z3.string(), PluginOffers: z3.unknown(), StartDate: z3.string() }).passthrough()).optional()
620
- }).passthrough()
621
- }
1769
+
1770
+ // src/endpoints/catalog/index.ts
1771
+ var playable = [["isPlayableCharacter", z14.boolean().optional().describe("Only return playable agents. Skips the duplicate Sova.")]];
1772
+ var agents = collection("Agents", "Agent", "agents", agentSchema, playable);
1773
+ var buddies = collection("Buddies", "Buddy", "buddies", asset);
1774
+ var buddyLevels = collection("Buddy Levels", "Buddy Level", "buddies/levels", asset);
1775
+ var bundles = collection("Bundles", "Bundle", "bundles", asset);
1776
+ var ceremonies = collection("Ceremonies", "Ceremony", "ceremonies", asset);
1777
+ var competitiveTiers = collection("Competitive Tiers", "Competitive Tier Set", "competitivetiers", z14.object({ uuid: z14.string(), tiers: z14.array(z14.object({ tier: z14.number(), tierName: text, division: text, color: text }).passthrough()) }).passthrough());
1778
+ var contentTiers = collection("Content Tiers", "Content Tier", "contenttiers", asset);
1779
+ var contracts2 = collection("Contracts", "Contract", "contracts", asset);
1780
+ var currencies = collection("Currencies", "Currency", "currencies", asset);
1781
+ var events = collection("Events", "Event", "events", asset);
1782
+ var flex = collection("Flex", "Flex Item", "flex", asset);
1783
+ var gamemodes = collection("Gamemodes", "Gamemode", "gamemodes", asset);
1784
+ var gamemodeEquippables = collection("Gamemode Equippables", "Gamemode Equippable", "gamemodes/equippables", asset);
1785
+ var gear = collection("Gear", "Gear Item", "gear", asset);
1786
+ var levelBorders = collection("Level Borders", "Level Border", "levelborders", asset);
1787
+ var maps = collection("Maps", "Map", "maps", mapSchema);
1788
+ var missions = collection("Missions", "Mission", "missions", z14.object({ uuid: z14.string(), displayName: text }).passthrough());
1789
+ var playerCards = collection("Player Cards", "Player Card", "playercards", asset);
1790
+ var playerTitles = collection("Player Titles", "Player Title", "playertitles", z14.object({ uuid: z14.string(), displayName: text, titleText: text }).passthrough());
1791
+ var seasons = collection("Seasons", "Season", "seasons", seasonSchema);
1792
+ var competitiveSeasons = collection("Competitive Seasons", "Competitive Season", "seasons/competitive", z14.object({ uuid: z14.string(), seasonUuid: z14.string(), startTime: z14.string(), endTime: z14.string() }).passthrough());
1793
+ var sprays = collection("Sprays", "Spray", "sprays", asset);
1794
+ var sprayLevels = collection("Spray Levels", "Spray Level", "sprays/levels", asset);
1795
+ var themes = collection("Themes", "Theme", "themes", asset);
1796
+ var weapons = collection("Weapons", "Weapon", "weapons", weaponSchema);
1797
+ var weaponSkins = collection("Weapon Skins", "Weapon Skin", "weapons/skins", skinSchema);
1798
+ var weaponSkinChromas = collection("Weapon Skin Chromas", "Weapon Skin Chroma", "weapons/skinchromas", asset);
1799
+ var weaponSkinLevels = collection("Weapon Skin Levels", "Weapon Skin Level", "weapons/skinlevels", asset);
1800
+ var catalogEndpoints = {
1801
+ agents: agents.list,
1802
+ agent: agents.one,
1803
+ buddies: buddies.list,
1804
+ buddy: buddies.one,
1805
+ buddyLevels: buddyLevels.list,
1806
+ buddyLevel: buddyLevels.one,
1807
+ bundles: bundles.list,
1808
+ bundle: bundles.one,
1809
+ ceremonies: ceremonies.list,
1810
+ ceremony: ceremonies.one,
1811
+ competitiveTiers: competitiveTiers.list,
1812
+ competitiveTier: competitiveTiers.one,
1813
+ contentTiers: contentTiers.list,
1814
+ contentTier: contentTiers.one,
1815
+ contracts: contracts2.list,
1816
+ contract: contracts2.one,
1817
+ currencies: currencies.list,
1818
+ currency: currencies.one,
1819
+ events: events.list,
1820
+ event: events.one,
1821
+ flex: flex.list,
1822
+ flexItem: flex.one,
1823
+ gamemodes: gamemodes.list,
1824
+ gamemode: gamemodes.one,
1825
+ gamemodeEquippables: gamemodeEquippables.list,
1826
+ gamemodeEquippable: gamemodeEquippables.one,
1827
+ gear: gear.list,
1828
+ gearItem: gear.one,
1829
+ levelBorders: levelBorders.list,
1830
+ levelBorder: levelBorders.one,
1831
+ maps: maps.list,
1832
+ map: maps.one,
1833
+ missions: missions.list,
1834
+ mission: missions.one,
1835
+ playerCards: playerCards.list,
1836
+ playerCard: playerCards.one,
1837
+ playerTitles: playerTitles.list,
1838
+ playerTitle: playerTitles.one,
1839
+ seasons: seasons.list,
1840
+ season: seasons.one,
1841
+ competitiveSeasons: competitiveSeasons.list,
1842
+ competitiveSeason: competitiveSeasons.one,
1843
+ sprays: sprays.list,
1844
+ spray: sprays.one,
1845
+ sprayLevels: sprayLevels.list,
1846
+ sprayLevel: sprayLevels.one,
1847
+ themes: themes.list,
1848
+ theme: themes.one,
1849
+ version: endpoint("Version", "Current game version and the matching client version", "version", versionSchema),
1850
+ weapons: weapons.list,
1851
+ weapon: weapons.one,
1852
+ weaponSkins: weaponSkins.list,
1853
+ weaponSkin: weaponSkins.one,
1854
+ weaponSkinChromas: weaponSkinChromas.list,
1855
+ weaponSkinChroma: weaponSkinChromas.one,
1856
+ weaponSkinLevels: weaponSkinLevels.list,
1857
+ weaponSkinLevel: weaponSkinLevels.one
622
1858
  };
623
1859
 
1860
+ // src/api/groups/catalog.ts
1861
+ var catalog = catalogEndpoints;
1862
+
624
1863
  // src/api/registry.ts
625
1864
  var registry = {
626
- pvp: {
627
- content: e.fetchContentEndpoint,
628
- accountXp: e.accountXPEndpoint,
629
- playerLoadout: e.playerLoadoutEndpoint,
630
- setPlayerLoadout: e.setPlayerLoadoutEndpoint,
631
- playerMmr: e.playerMMREndpoint,
632
- matchHistory: e.matchHistoryEndpoint,
633
- matchDetails: e.matchDetailsEndpoint,
634
- competitiveUpdates: e.competitiveUpdatesEndpoint,
635
- leaderboard: e.leaderboardEndpoint,
636
- penalties: e.penaltiesEndpoint,
637
- config: e.configEndpoint,
638
- nameService: e.nameServiceEndpoint
639
- },
640
- party: {
641
- get: e.partyEndpoint,
642
- player: e.partyPlayerEndpoint,
643
- removePlayer: e.partyRemovePlayerEndpoint,
644
- setMemberReady: e.partySetMemberReadyEndpoint,
645
- refreshCompetitiveTier: e.refreshCompetitiveTierEndpoint,
646
- refreshPlayerIdentity: e.refreshPlayerIdentityEndpoint,
647
- refreshPings: e.refreshPingsEndpoint,
648
- changeQueue: e.changeQueueEndpoint,
649
- startCustomGame: e.startCustomGameEndpoint,
650
- enterMatchmakingQueue: e.enterMatchmakingQueueEndpoint,
651
- leaveMatchmakingQueue: e.leaveMatchmakingQueueEndpoint,
652
- setAccessibility: e.setPartyAccessibilityEndpoint,
653
- setCustomGameSettings: e.setCustomGameSettingsEndpoint,
654
- invite: e.partyInviteEndpoint,
655
- requestToJoin: e.partyRequestEndpoint,
656
- declineRequest: e.partyDeclineEndpoint,
657
- customGameConfigs: e.customGameConfigsEndpoint,
658
- chatToken: e.partyChatTokenEndpoint,
659
- voiceToken: e.partyVoiceTokenEndpoint,
660
- disableCode: e.partyDisableCodeEndpoint,
661
- generateCode: e.partyGenerateCodeEndpoint,
662
- joinByCode: e.partyJoinByCodeEndpoint
663
- },
664
- store: {
665
- prices: e.pricesEndpoint,
666
- storefront: e.storefrontEndpoint,
667
- wallet: e.walletEndpoint,
668
- ownedItems: e.ownedItemsEndpoint,
669
- storefrontV3: storefrontV3Endpoint,
670
- order: storeOrderEndpoint
671
- },
672
- pregame: {
673
- player: e.pregamePlayerEndpoint,
674
- match: e.pregameMatchEndpoint,
675
- loadouts: e.pregameLoadoutsEndpoint,
676
- selectCharacter: e.selectCharacterEndpoint,
677
- lockCharacter: e.lockCharacterEndpoint,
678
- quit: e.pregameQuitEndpoint,
679
- chatToken: pregameChatTokenEndpoint,
680
- voiceToken: pregameVoiceTokenEndpoint
681
- },
682
- currentGame: {
683
- player: e.currentGamePlayerEndpoint,
684
- match: e.currentGameMatchEndpoint,
685
- loadouts: e.currentGameLoadoutsEndpoint,
686
- quit: e.currentGameQuitEndpoint,
687
- allChatToken: currentGameAllChatTokenEndpoint,
688
- teamChatToken: currentGameTeamChatTokenEndpoint
689
- },
690
- contracts: {
691
- itemUpgrades: e.itemUpgradesEndpoint,
692
- list: e.contractsEndpoint,
693
- activate: e.activateContractEndpoint,
694
- activeStory: contractsActiveStoryEndpoint
695
- },
696
- local: {
697
- help: e.localHelpEndpoint,
698
- sessions: e.sessionsEndpoint,
699
- rsoUserInfo: e.rsoUserInfoEndpoint,
700
- clientRegion: e.clientRegionEndpoint,
701
- accountAlias: e.accountAliasEndpoint,
702
- entitlementsToken: e.entitlementsTokenEndpoint,
703
- chatSession: e.chatSessionEndpoint,
704
- friends: e.friendsEndpoint,
705
- sendFriendRequest: e.sendFriendRequestEndpoint,
706
- removeFriendRequest: e.removeFriendRequestEndpoint,
707
- presence: e.presenceEndpoint,
708
- friendRequests: e.friendRequestsEndpoint,
709
- swaggerDocs: e.localSwaggerDocsEndpoint,
710
- antiAddictionShutdown: localAntiAddictionShutdownEndpoint,
711
- antiAddictionWarning: localAntiAddictionWarningEndpoint,
712
- clientConfig: localClientConfigEndpoint,
713
- eula: localEulaEndpoint,
714
- privacyPolicy: localPrivacyPolicyEndpoint,
715
- availableLocales: localAvailableLocalesEndpoint,
716
- locale: localLocaleEndpoint,
717
- reporterFeedback: localReporterFeedbackEndpoint,
718
- commandLineArgs: localCommandLineArgsEndpoint,
719
- riotStatus: localRiotStatusEndpoint,
720
- riotWarning: localRiotWarningEndpoint,
721
- clientAuthorizations: localClientAuthorizationsEndpoint,
722
- accessToken: localAccessTokenEndpoint,
723
- userInfoToken: localUserInfoTokenEndpoint,
724
- pluginStatus: localPluginStatusEndpoint,
725
- rmsSession: localRmsSessionEndpoint,
726
- processInfo: localProcessInfoEndpoint,
727
- logPath: localLogPathEndpoint,
728
- playerSettings: localPlayerSettingsEndpoint
729
- },
730
- chat: {
731
- partyInfo: e.partyChatInfoEndpoint,
732
- pregameInfo: e.pregameChatInfoEndpoint,
733
- currentGameInfo: e.currentGameChatInfoEndpoint,
734
- allInfo: e.allChatInfoEndpoint,
735
- participants: e.chatParticipantsEndpoint,
736
- send: e.sendChatEndpoint,
737
- history: e.chatHistoryEndpoint,
738
- settings: chatSettingsEndpoint,
739
- tournamentInfo: chatTournamentInfoEndpoint
740
- },
741
- session: {
742
- get: sessionGetEndpoint,
743
- reconnect: sessionReconnectEndpoint
744
- },
745
- voice: {
746
- audioProperties: voiceAudioPropertiesEndpoint,
747
- captureDevices: voiceCaptureDevicesEndpoint,
748
- renderDevices: voiceRenderDevicesEndpoint,
749
- pushToTalk: voicePushToTalkEndpoint,
750
- sessions: voiceSessionsEndpoint,
751
- settings: voiceSettingsEndpoint
752
- },
753
- auth: {
754
- cookies: e.authCookiesEndpoint,
755
- request: e.authRequestEndpoint,
756
- multiFactor: e.multiFactorAuthenticationEndpoint,
757
- cookieReauth: e.cookieReauthEndpoint,
758
- entitlement: e.entitlementEndpoint,
759
- playerInfo: e.playerInfoEndpoint,
760
- riotGeo: e.riotGeoEndpoint,
761
- pasToken: e.pasTokenEndpoint,
762
- riotClientConfig: e.riotClientConfigEndpoint
763
- },
764
- catalog: catalogEndpoints
1865
+ pvp,
1866
+ party,
1867
+ store,
1868
+ pregame,
1869
+ currentGame,
1870
+ contracts,
1871
+ local,
1872
+ chat,
1873
+ voice,
1874
+ premier,
1875
+ esports,
1876
+ restrictions,
1877
+ account,
1878
+ auth,
1879
+ catalog
765
1880
  };
766
1881
 
767
1882
  // src/auth.ts
768
- import { endpoints as e2 } from "valorant-api-types";
1883
+ import { endpoints as e10 } from "valorant-api-types";
769
1884
 
770
1885
  // src/errors.ts
771
1886
  var ValorantError = class extends Error {
@@ -894,7 +2009,7 @@ function createAuthFlows(client) {
894
2009
  return toLoginResult(data);
895
2010
  },
896
2011
  async reauthenticate(options) {
897
- const response = await client.send(e2.cookieReauthEndpoint);
2012
+ const response = await client.send(e10.cookieReauthEndpoint);
898
2013
  const tokens = parseAuthRedirect(response.headers.get("location") ?? "");
899
2014
  if (tokens === void 0) throw new ValorantError("Cookie reauthentication failed: the session cookies are missing or expired, log in again");
900
2015
  applyTokens(tokens);
@@ -1085,6 +2200,83 @@ var localTransport = async (request) => {
1085
2200
  });
1086
2201
  };
1087
2202
 
2203
+ // src/internal/body.ts
2204
+ import { ZodError } from "zod";
2205
+ function parseBody(text2) {
2206
+ if (text2 === "") return void 0;
2207
+ try {
2208
+ return JSON.parse(text2);
2209
+ } catch {
2210
+ return text2;
2211
+ }
2212
+ }
2213
+ function safeParse(schema, data) {
2214
+ try {
2215
+ return schema.safeParse(data);
2216
+ } catch (thrown) {
2217
+ if (thrown instanceof ZodError) return { success: false, error: thrown };
2218
+ const message = thrown instanceof Error ? thrown.message : String(thrown);
2219
+ return { success: false, error: new ZodError([{ code: "custom", path: [], message: `Schema transform threw: ${message}` }]) };
2220
+ }
2221
+ }
2222
+
2223
+ // src/internal/cookies.ts
2224
+ function storeCookies(context, setCookies) {
2225
+ for (const line of setCookies) {
2226
+ const [pair = "", ...attributes] = line.split(";").map((part) => part.trim());
2227
+ const separator = pair.indexOf("=");
2228
+ if (separator <= 0) continue;
2229
+ const name = pair.slice(0, separator);
2230
+ const value = pair.slice(separator + 1);
2231
+ const expired = value === "" || attributes.some((a) => a.toLowerCase() === "max-age=0");
2232
+ context.setCookie(name, expired ? void 0 : value);
2233
+ }
2234
+ }
2235
+
2236
+ // src/internal/retry.ts
2237
+ var RETRYABLE_STATUS = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
2238
+ var IDEMPOTENT = /* @__PURE__ */ new Set(["GET", "HEAD", "PUT", "DELETE"]);
2239
+ function isIdempotent(method) {
2240
+ return IDEMPOTENT.has(method);
2241
+ }
2242
+ function isRetryableStatus(status, method) {
2243
+ return RETRYABLE_STATUS.has(status) && (status === 429 || isIdempotent(method));
2244
+ }
2245
+ function parseRetryAfter(value) {
2246
+ if (value === null) return void 0;
2247
+ const seconds = Number(value);
2248
+ if (Number.isFinite(seconds)) return seconds * 1e3;
2249
+ const date = Date.parse(value);
2250
+ return Number.isNaN(date) ? void 0 : Math.max(0, date - Date.now());
2251
+ }
2252
+ function backoff(attempt, retry) {
2253
+ const base = retry?.baseDelayMs ?? 500;
2254
+ const max = retry?.maxDelayMs ?? 8e3;
2255
+ return Math.min(max, base * 2 ** attempt) * (0.5 + Math.random() / 2);
2256
+ }
2257
+ function sleep(ms, signal) {
2258
+ return new Promise((resolve) => {
2259
+ const timer = setTimeout(done, ms);
2260
+ signal?.addEventListener("abort", done, { once: true });
2261
+ function done() {
2262
+ clearTimeout(timer);
2263
+ signal?.removeEventListener("abort", done);
2264
+ resolve();
2265
+ }
2266
+ });
2267
+ }
2268
+
2269
+ // src/internal/failure.ts
2270
+ function toApiError(endpoint2, request, response) {
2271
+ const body = parseBody(response.text);
2272
+ const args = [response.status, endpoint2.name, request.url, body, response.headers];
2273
+ if (response.status === 429) return new ValorantRateLimitError(...args, parseRetryAfter(response.headers.get("retry-after")));
2274
+ const needsToken = endpoint2.riotRequirements?.token === true;
2275
+ const badClaims = typeof body === "object" && body !== null && body.errorCode === "BAD_CLAIMS";
2276
+ if (needsToken && (response.status === 401 || response.status === 400 && badClaims)) return new ValorantAuthError(...args);
2277
+ return new ValorantApiError(...args);
2278
+ }
2279
+
1088
2280
  // src/local.ts
1089
2281
  function parseLockfile(content) {
1090
2282
  const [name, pid, port, password, protocol] = content.trim().split(":");
@@ -1250,8 +2442,6 @@ function buildRequest(endpoint2, input, ctx) {
1250
2442
  }
1251
2443
 
1252
2444
  // src/client.ts
1253
- var RETRYABLE_STATUS = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
1254
- var IDEMPOTENT = /* @__PURE__ */ new Set(["GET", "HEAD", "PUT", "DELETE"]);
1255
2445
  var ValorantClient = class {
1256
2446
  context;
1257
2447
  #options;
@@ -1280,13 +2470,13 @@ var ValorantClient = class {
1280
2470
  try {
1281
2471
  response = await this.#transportFor(endpoint2)({ ...request, signal: this.#signal(input) });
1282
2472
  } catch (cause) {
1283
- if (canRetry && IDEMPOTENT.has(request.method) && input.signal?.aborted !== true) {
2473
+ if (canRetry && isIdempotent(request.method) && input.signal?.aborted !== true) {
1284
2474
  await sleep(backoff(attempt, retry), input.signal);
1285
2475
  continue;
1286
2476
  }
1287
2477
  throw new ValorantNetworkError(`${endpoint2.name} could not reach ${new URL(request.url).host}`, request.url, { cause });
1288
2478
  }
1289
- if (isAuthHost(request.url)) this.#storeCookies(response.setCookies);
2479
+ if (isAuthHost(request.url)) storeCookies(this.context, response.setCookies);
1290
2480
  this.#options.logger?.debug?.(`${request.method} ${request.url} -> ${response.status}`);
1291
2481
  if (response.status < 400) {
1292
2482
  return {
@@ -1295,13 +2485,13 @@ var ValorantClient = class {
1295
2485
  data: this.#parseResponse(endpoint2, response, validation)
1296
2486
  };
1297
2487
  }
1298
- const error = this.#toError(endpoint2, request, response);
2488
+ const error = toApiError(endpoint2, request, response);
1299
2489
  if (error instanceof ValorantAuthError && this.#options.refreshTokens && !refreshed) {
1300
2490
  refreshed = true;
1301
2491
  await this.#refreshOnce();
1302
2492
  continue;
1303
2493
  }
1304
- if (canRetry && RETRYABLE_STATUS.has(response.status) && (response.status === 429 || IDEMPOTENT.has(request.method))) {
2494
+ if (canRetry && isRetryableStatus(response.status, request.method)) {
1305
2495
  const retryAfter = error instanceof ValorantRateLimitError ? error.retryAfterMs : void 0;
1306
2496
  await sleep(retryAfter ?? backoff(attempt, retry), input.signal);
1307
2497
  continue;
@@ -1333,17 +2523,6 @@ var ValorantClient = class {
1333
2523
  const timeout = AbortSignal.timeout(input.timeoutMs ?? this.#options.timeoutMs ?? 15e3);
1334
2524
  return input.signal ? AbortSignal.any([input.signal, timeout]) : timeout;
1335
2525
  }
1336
- #storeCookies(setCookies) {
1337
- for (const line of setCookies) {
1338
- const [pair = "", ...attributes] = line.split(";").map((part) => part.trim());
1339
- const separator = pair.indexOf("=");
1340
- if (separator <= 0) continue;
1341
- const name = pair.slice(0, separator);
1342
- const value = pair.slice(separator + 1);
1343
- const expired = value === "" || attributes.some((a) => a.toLowerCase() === "max-age=0");
1344
- this.context.setCookie(name, expired ? void 0 : value);
1345
- }
1346
- }
1347
2526
  #parseResponse(endpoint2, response, validation) {
1348
2527
  const data = unwrapEnvelope(endpoint2, parseBody(response.text));
1349
2528
  const schema = endpoint2.responses?.[String(response.status)];
@@ -1357,15 +2536,6 @@ var ValorantClient = class {
1357
2536
  }
1358
2537
  return data;
1359
2538
  }
1360
- #toError(endpoint2, request, response) {
1361
- const body = parseBody(response.text);
1362
- const args = [response.status, endpoint2.name, request.url, body, response.headers];
1363
- if (response.status === 429) return new ValorantRateLimitError(...args, parseRetryAfter(response.headers.get("retry-after")));
1364
- const needsToken = endpoint2.riotRequirements?.token === true;
1365
- const badClaims = typeof body === "object" && body !== null && body.errorCode === "BAD_CLAIMS";
1366
- if (needsToken && (response.status === 401 || response.status === 400 && badClaims)) return new ValorantAuthError(...args);
1367
- return new ValorantApiError(...args);
1368
- }
1369
2539
  #refreshOnce() {
1370
2540
  this.#refreshing ??= Promise.resolve(this.#options.refreshTokens(this)).finally(() => {
1371
2541
  this.#refreshing = void 0;
@@ -1373,46 +2543,6 @@ var ValorantClient = class {
1373
2543
  return this.#refreshing;
1374
2544
  }
1375
2545
  };
1376
- function safeParse(schema, data) {
1377
- try {
1378
- return schema.safeParse(data);
1379
- } catch (thrown) {
1380
- if (thrown instanceof ZodError) return { success: false, error: thrown };
1381
- const message = thrown instanceof Error ? thrown.message : String(thrown);
1382
- return { success: false, error: new ZodError([{ code: "custom", path: [], message: `Schema transform threw: ${message}` }]) };
1383
- }
1384
- }
1385
- function parseBody(text2) {
1386
- if (text2 === "") return void 0;
1387
- try {
1388
- return JSON.parse(text2);
1389
- } catch {
1390
- return text2;
1391
- }
1392
- }
1393
- function parseRetryAfter(value) {
1394
- if (value === null) return void 0;
1395
- const seconds = Number(value);
1396
- if (Number.isFinite(seconds)) return seconds * 1e3;
1397
- const date = Date.parse(value);
1398
- return Number.isNaN(date) ? void 0 : Math.max(0, date - Date.now());
1399
- }
1400
- function backoff(attempt, retry) {
1401
- const base = retry?.baseDelayMs ?? 500;
1402
- const max = retry?.maxDelayMs ?? 8e3;
1403
- return Math.min(max, base * 2 ** attempt) * (0.5 + Math.random() / 2);
1404
- }
1405
- function sleep(ms, signal) {
1406
- return new Promise((resolve) => {
1407
- const timer = setTimeout(done, ms);
1408
- signal?.addEventListener("abort", done, { once: true });
1409
- function done() {
1410
- clearTimeout(timer);
1411
- signal?.removeEventListener("abort", done);
1412
- resolve();
1413
- }
1414
- });
1415
- }
1416
2546
 
1417
2547
  // src/index.ts
1418
2548
  export * from "valorant-api-types";