@wardbox/whisper 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/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/client-B7r2KpHz.js +838 -0
- package/dist/client-CxR21ld-.cjs +913 -0
- package/dist/client-DrrSDGBt.d.cts +181 -0
- package/dist/client-DrrSDGBt.d.cts.map +1 -0
- package/dist/client-Xu0AwrUw.d.ts +181 -0
- package/dist/client-Xu0AwrUw.d.ts.map +1 -0
- package/dist/core/index.cjs +15 -0
- package/dist/core/index.d.cts +208 -0
- package/dist/core/index.d.cts.map +1 -0
- package/dist/core/index.d.ts +208 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +2 -0
- package/dist/errors-7wdVIL5Y.d.cts +111 -0
- package/dist/errors-7wdVIL5Y.d.cts.map +1 -0
- package/dist/errors-DofVFslx.d.ts +111 -0
- package/dist/errors-DofVFslx.d.ts.map +1 -0
- package/dist/index.cjs +8 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/lol/index.cjs +436 -0
- package/dist/lol/index.d.cts +7232 -0
- package/dist/lol/index.d.cts.map +1 -0
- package/dist/lol/index.d.ts +7232 -0
- package/dist/lol/index.d.ts.map +1 -0
- package/dist/lol/index.js +425 -0
- package/dist/lor/index.cjs +44 -0
- package/dist/lor/index.d.cts +159 -0
- package/dist/lor/index.d.cts.map +1 -0
- package/dist/lor/index.d.ts +159 -0
- package/dist/lor/index.d.ts.map +1 -0
- package/dist/lor/index.js +44 -0
- package/dist/riftbound/index.cjs +25 -0
- package/dist/riftbound/index.d.cts +97 -0
- package/dist/riftbound/index.d.cts.map +1 -0
- package/dist/riftbound/index.d.ts +97 -0
- package/dist/riftbound/index.d.ts.map +1 -0
- package/dist/riftbound/index.js +26 -0
- package/dist/riot/index.cjs +31 -0
- package/dist/riot/index.d.cts +101 -0
- package/dist/riot/index.d.cts.map +1 -0
- package/dist/riot/index.d.ts +101 -0
- package/dist/riot/index.d.ts.map +1 -0
- package/dist/riot/index.js +32 -0
- package/dist/tft/index.cjs +152 -0
- package/dist/tft/index.d.cts +581 -0
- package/dist/tft/index.d.cts.map +1 -0
- package/dist/tft/index.d.ts +581 -0
- package/dist/tft/index.d.ts.map +1 -0
- package/dist/tft/index.js +149 -0
- package/dist/val/index.cjs +166 -0
- package/dist/val/index.d.cts +952 -0
- package/dist/val/index.d.cts.map +1 -0
- package/dist/val/index.d.ts +952 -0
- package/dist/val/index.d.ts.map +1 -0
- package/dist/val/index.js +161 -0
- package/package.json +137 -0
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
import { m as PlatformRoute, p as RegionalRoute, t as WhisperClient } from "../client-DrrSDGBt.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/types/generated/tft.d.ts
|
|
4
|
+
/** Live TFT game information from the spectator API */
|
|
5
|
+
interface TftCurrentGameInfo {
|
|
6
|
+
/** List of banned champions in this game */
|
|
7
|
+
bannedChampions: {
|
|
8
|
+
championId: number;
|
|
9
|
+
pickTurn: number;
|
|
10
|
+
teamId: number;
|
|
11
|
+
}[];
|
|
12
|
+
/** Unique game ID */
|
|
13
|
+
gameId: number;
|
|
14
|
+
/** Current game length in seconds */
|
|
15
|
+
gameLength: number;
|
|
16
|
+
/** Game mode identifier */
|
|
17
|
+
gameMode: 'CLASSIC' | 'ODIN' | 'ARAM' | 'TUTORIAL' | 'URF' | 'DOOMBOTSTEEMO' | 'ONEFORALL' | 'ASCENSION' | 'FIRSTBLOOD' | 'KINGPORO' | 'SIEGE' | 'ASSASSINATE' | 'ARSR' | 'DARKSTAR' | 'STARGUARDIAN' | 'PROJECT' | 'GAMEMODEX' | 'NEXUSBLITZ' | 'ULTBOOK' | 'CHERRY' | 'STRAWBERRY';
|
|
18
|
+
/** Queue configuration ID */
|
|
19
|
+
gameQueueConfigId: number;
|
|
20
|
+
/** Unix timestamp in milliseconds when the game started */
|
|
21
|
+
gameStartTime: number;
|
|
22
|
+
/** Game type (custom, matched, or tutorial) */
|
|
23
|
+
gameType: 'CUSTOM_GAME' | 'MATCHED_GAME' | 'TUTORIAL_GAME';
|
|
24
|
+
/** Map ID for this game */
|
|
25
|
+
mapId: number;
|
|
26
|
+
/** Observer credentials for spectating */
|
|
27
|
+
observers: {
|
|
28
|
+
encryptionKey: string;
|
|
29
|
+
};
|
|
30
|
+
/** List of participants in this game */
|
|
31
|
+
participants: {
|
|
32
|
+
bot: boolean;
|
|
33
|
+
championId: number;
|
|
34
|
+
gameCustomizationObjects: {
|
|
35
|
+
category: string;
|
|
36
|
+
content: string;
|
|
37
|
+
}[];
|
|
38
|
+
perks: {
|
|
39
|
+
perkIds: number[];
|
|
40
|
+
perkStyle: number;
|
|
41
|
+
perkSubStyle: number;
|
|
42
|
+
};
|
|
43
|
+
profileIconId: number;
|
|
44
|
+
puuid: string;
|
|
45
|
+
spell1Id: number;
|
|
46
|
+
spell2Id: number;
|
|
47
|
+
teamId: number;
|
|
48
|
+
}[];
|
|
49
|
+
/** Platform ID where this game is running (e.g., "NA1") */
|
|
50
|
+
platformId: string;
|
|
51
|
+
}
|
|
52
|
+
/** A TFT ranked league containing a list of entries */
|
|
53
|
+
interface TftLeagueList {
|
|
54
|
+
/** List of ranked entries in this league */
|
|
55
|
+
entries: {
|
|
56
|
+
freshBlood: boolean;
|
|
57
|
+
hotStreak: boolean;
|
|
58
|
+
inactive: boolean;
|
|
59
|
+
leaguePoints: number;
|
|
60
|
+
losses: number;
|
|
61
|
+
puuid: string;
|
|
62
|
+
rank: 'I' | 'II' | 'III' | 'IV';
|
|
63
|
+
veteran: boolean;
|
|
64
|
+
wins: number;
|
|
65
|
+
}[];
|
|
66
|
+
/** Unique league identifier */
|
|
67
|
+
leagueId: string;
|
|
68
|
+
/** Display name of this league */
|
|
69
|
+
name: string;
|
|
70
|
+
/** Queue type (e.g., "RANKED_TFT") */
|
|
71
|
+
queue: string;
|
|
72
|
+
/** Tier of this league */
|
|
73
|
+
tier: 'IRON' | 'BRONZE' | 'SILVER' | 'GOLD' | 'PLATINUM' | 'EMERALD' | 'DIAMOND' | 'MASTER' | 'GRANDMASTER' | 'CHALLENGER';
|
|
74
|
+
}
|
|
75
|
+
/** Full TFT match data including game info and metadata */
|
|
76
|
+
interface TftMatch {
|
|
77
|
+
/** Game information including participants, traits, and units */
|
|
78
|
+
info: {
|
|
79
|
+
endOfGameResult: string;
|
|
80
|
+
gameCreation: number;
|
|
81
|
+
gameId: number;
|
|
82
|
+
game_datetime: number;
|
|
83
|
+
game_length: number;
|
|
84
|
+
game_version: string;
|
|
85
|
+
mapId: number;
|
|
86
|
+
participants: {
|
|
87
|
+
companion: {
|
|
88
|
+
content_ID: string;
|
|
89
|
+
item_ID: number;
|
|
90
|
+
skin_ID: number;
|
|
91
|
+
species: string;
|
|
92
|
+
};
|
|
93
|
+
gold_left: number;
|
|
94
|
+
last_round: number;
|
|
95
|
+
level: number;
|
|
96
|
+
missions: {
|
|
97
|
+
PlayerScore2: number;
|
|
98
|
+
};
|
|
99
|
+
placement: number;
|
|
100
|
+
players_eliminated: number;
|
|
101
|
+
puuid: string;
|
|
102
|
+
riotIdGameName: string;
|
|
103
|
+
riotIdTagline: string;
|
|
104
|
+
time_eliminated: number;
|
|
105
|
+
total_damage_to_players: number;
|
|
106
|
+
traits: {
|
|
107
|
+
name: string;
|
|
108
|
+
num_units: number;
|
|
109
|
+
style: number;
|
|
110
|
+
tier_current: number;
|
|
111
|
+
tier_total: number;
|
|
112
|
+
}[];
|
|
113
|
+
units: {
|
|
114
|
+
character_id: string;
|
|
115
|
+
itemNames: string[];
|
|
116
|
+
name: string;
|
|
117
|
+
rarity: number;
|
|
118
|
+
tier: number;
|
|
119
|
+
}[];
|
|
120
|
+
win: boolean;
|
|
121
|
+
}[];
|
|
122
|
+
queueId: number;
|
|
123
|
+
queue_id: number;
|
|
124
|
+
tft_game_type: string;
|
|
125
|
+
tft_set_core_name: string;
|
|
126
|
+
tft_set_number: number;
|
|
127
|
+
};
|
|
128
|
+
/** Match metadata including data version, match ID, and participant PUUIDs */
|
|
129
|
+
metadata: {
|
|
130
|
+
data_version: string;
|
|
131
|
+
match_id: string;
|
|
132
|
+
participants: string[];
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/** TFT platform status data with incidents and maintenances */
|
|
136
|
+
interface TftPlatformData {
|
|
137
|
+
/** Platform identifier (e.g., "NA1") */
|
|
138
|
+
id: string;
|
|
139
|
+
/** List of active incidents */
|
|
140
|
+
incidents: unknown[];
|
|
141
|
+
/** Supported locale codes (e.g., ["en_US"]) */
|
|
142
|
+
locales: string[];
|
|
143
|
+
/** List of scheduled or active maintenances */
|
|
144
|
+
maintenances: {
|
|
145
|
+
archive_at: string;
|
|
146
|
+
created_at: string;
|
|
147
|
+
id: number;
|
|
148
|
+
incident_severity: unknown | null;
|
|
149
|
+
maintenance_status: string;
|
|
150
|
+
platforms: string[];
|
|
151
|
+
titles: {
|
|
152
|
+
content: string;
|
|
153
|
+
locale: string;
|
|
154
|
+
}[];
|
|
155
|
+
updated_at: unknown | null;
|
|
156
|
+
updates: {
|
|
157
|
+
author: string;
|
|
158
|
+
created_at: string;
|
|
159
|
+
id: number;
|
|
160
|
+
publish: boolean;
|
|
161
|
+
publish_locations: string[];
|
|
162
|
+
translations: {
|
|
163
|
+
content: string;
|
|
164
|
+
locale: string;
|
|
165
|
+
}[];
|
|
166
|
+
updated_at: string;
|
|
167
|
+
}[];
|
|
168
|
+
}[];
|
|
169
|
+
/** Display name of the platform (e.g., "North America") */
|
|
170
|
+
name: string;
|
|
171
|
+
}
|
|
172
|
+
/** TFT summoner profile data */
|
|
173
|
+
interface TftSummoner {
|
|
174
|
+
/** Summoner profile icon ID */
|
|
175
|
+
profileIconId: number;
|
|
176
|
+
/** Encrypted PUUID */
|
|
177
|
+
puuid: string;
|
|
178
|
+
/** Date of last profile modification as Unix timestamp in milliseconds */
|
|
179
|
+
revisionDate: number;
|
|
180
|
+
/** Summoner level */
|
|
181
|
+
summonerLevel: number;
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/types/overrides/tft-league.d.ts
|
|
185
|
+
/**
|
|
186
|
+
* A ranked league entry for a TFT player.
|
|
187
|
+
*
|
|
188
|
+
* Returned by tft-league-v1 endpoints that query individual entries:
|
|
189
|
+
* getLeagueEntriesByPuuid, getLeagueEntries.
|
|
190
|
+
*/
|
|
191
|
+
interface TftLeagueEntry {
|
|
192
|
+
/** Whether this player recently joined this league tier */
|
|
193
|
+
freshBlood: boolean;
|
|
194
|
+
/** Whether this player is on a winning streak */
|
|
195
|
+
hotStreak: boolean;
|
|
196
|
+
/** Whether this player has been inactive (demoted due to inactivity) */
|
|
197
|
+
inactive: boolean;
|
|
198
|
+
/** Current league points within the division */
|
|
199
|
+
leaguePoints: number;
|
|
200
|
+
/** Total ranked losses this season */
|
|
201
|
+
losses: number;
|
|
202
|
+
/** Encrypted PUUID of the player */
|
|
203
|
+
puuid: string;
|
|
204
|
+
/** Division rank within the tier (I, II, III, or IV) */
|
|
205
|
+
rank: 'I' | 'II' | 'III' | 'IV';
|
|
206
|
+
/** Whether this player is a veteran of this tier (long tenure) */
|
|
207
|
+
veteran: boolean;
|
|
208
|
+
/** Total ranked wins this season */
|
|
209
|
+
wins: number;
|
|
210
|
+
/** Unique identifier for the league this entry belongs to */
|
|
211
|
+
leagueId?: string;
|
|
212
|
+
/** Queue type (e.g., "RANKED_TFT", "RANKED_TFT_DOUBLE_UP") */
|
|
213
|
+
queueType?: string;
|
|
214
|
+
/** Tier of this entry (e.g., "GOLD", "PLATINUM", "DIAMOND") */
|
|
215
|
+
tier?: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* A top-rated ladder entry for TFT Hyper Roll or Double Up.
|
|
219
|
+
*
|
|
220
|
+
* Returned by tft-league-v1 getTopRatedLadder endpoint.
|
|
221
|
+
*/
|
|
222
|
+
interface TftTopRatedLadderEntry {
|
|
223
|
+
/** Encrypted PUUID of the player */
|
|
224
|
+
puuid: string;
|
|
225
|
+
/** Total wins in the rated queue */
|
|
226
|
+
wins: number;
|
|
227
|
+
}
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/tft/spectator-tft-v5.d.ts
|
|
230
|
+
/**
|
|
231
|
+
* TFT Spectator API (v5).
|
|
232
|
+
*
|
|
233
|
+
* Access live TFT game data. Use this to check if a player is currently
|
|
234
|
+
* in a TFT game.
|
|
235
|
+
*
|
|
236
|
+
* All methods require a {@link PlatformRoute} (e.g., 'na1', 'euw1').
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```typescript
|
|
240
|
+
* import { spectatorTftV5 } from '@wardbox/whisper/tft';
|
|
241
|
+
*
|
|
242
|
+
* const game = await spectatorTftV5.getCurrentGame(client, 'na1', puuid);
|
|
243
|
+
* console.log(`In TFT game on map ${game.mapId}`);
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
declare const spectatorTftV5: {
|
|
247
|
+
/**
|
|
248
|
+
* Get the current active TFT game for a player by PUUID.
|
|
249
|
+
*
|
|
250
|
+
* Returns live game data if the player is currently in a TFT game.
|
|
251
|
+
* Throws a 404 error if the player is not in an active game.
|
|
252
|
+
*
|
|
253
|
+
* @param client - WhisperClient instance
|
|
254
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
255
|
+
* @param puuid - Encrypted PUUID
|
|
256
|
+
* @returns Current TFT game information including participants and game settings
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```typescript
|
|
260
|
+
* try {
|
|
261
|
+
* const game = await spectatorTftV5.getCurrentGame(client, 'na1', 'abc-123');
|
|
262
|
+
* console.log(`Game mode: ${game.gameMode}`);
|
|
263
|
+
* } catch (e) {
|
|
264
|
+
* console.log('Player is not in a TFT game');
|
|
265
|
+
* }
|
|
266
|
+
* ```
|
|
267
|
+
*/
|
|
268
|
+
readonly getCurrentGame: (client: WhisperClient, route: PlatformRoute, puuid: string) => Promise<TftCurrentGameInfo>;
|
|
269
|
+
};
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/tft/tft-league-v1.d.ts
|
|
272
|
+
/** Options for filtering TFT league entry queries by PUUID */
|
|
273
|
+
interface GetTftLeagueEntriesOptions {
|
|
274
|
+
/** Queue type to filter by */
|
|
275
|
+
queue?: 'RANKED_TFT' | 'RANKED_TFT_DOUBLE_UP';
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* TFT League API (v1).
|
|
279
|
+
*
|
|
280
|
+
* Query TFT ranked league standings, entries by PUUID, and full league data
|
|
281
|
+
* for challenger/grandmaster/master tiers. Also includes top-rated ladder
|
|
282
|
+
* for Hyper Roll and Double Up queues.
|
|
283
|
+
*
|
|
284
|
+
* All methods require a {@link PlatformRoute} (e.g., 'na1', 'euw1').
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```typescript
|
|
288
|
+
* import { tftLeagueV1 } from '@wardbox/whisper/tft';
|
|
289
|
+
*
|
|
290
|
+
* const challenger = await tftLeagueV1.getChallengerLeague(client, 'na1');
|
|
291
|
+
* console.log(challenger.entries.length);
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
294
|
+
declare const tftLeagueV1: {
|
|
295
|
+
/**
|
|
296
|
+
* Get the TFT challenger league.
|
|
297
|
+
*
|
|
298
|
+
* @param client - WhisperClient instance
|
|
299
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
300
|
+
* @param options - Optional queue filter
|
|
301
|
+
* @returns The challenger league with all entries
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```typescript
|
|
305
|
+
* const league = await tftLeagueV1.getChallengerLeague(client, 'na1');
|
|
306
|
+
* console.log(league.tier); // 'CHALLENGER'
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
readonly getChallengerLeague: (client: WhisperClient, route: PlatformRoute, options?: {
|
|
310
|
+
queue?: "RANKED_TFT" | "RANKED_TFT_DOUBLE_UP";
|
|
311
|
+
}) => Promise<TftLeagueList>;
|
|
312
|
+
/**
|
|
313
|
+
* Get the TFT grandmaster league.
|
|
314
|
+
*
|
|
315
|
+
* @param client - WhisperClient instance
|
|
316
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
317
|
+
* @param options - Optional queue filter
|
|
318
|
+
* @returns The grandmaster league with all entries
|
|
319
|
+
*
|
|
320
|
+
* @example
|
|
321
|
+
* ```typescript
|
|
322
|
+
* const league = await tftLeagueV1.getGrandmasterLeague(client, 'euw1');
|
|
323
|
+
* console.log(league.tier); // 'GRANDMASTER'
|
|
324
|
+
* ```
|
|
325
|
+
*/
|
|
326
|
+
readonly getGrandmasterLeague: (client: WhisperClient, route: PlatformRoute, options?: {
|
|
327
|
+
queue?: "RANKED_TFT" | "RANKED_TFT_DOUBLE_UP";
|
|
328
|
+
}) => Promise<TftLeagueList>;
|
|
329
|
+
/**
|
|
330
|
+
* Get the TFT master league.
|
|
331
|
+
*
|
|
332
|
+
* @param client - WhisperClient instance
|
|
333
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
334
|
+
* @param options - Optional queue filter
|
|
335
|
+
* @returns The master league with all entries
|
|
336
|
+
*
|
|
337
|
+
* @example
|
|
338
|
+
* ```typescript
|
|
339
|
+
* const league = await tftLeagueV1.getMasterLeague(client, 'kr');
|
|
340
|
+
* console.log(league.tier); // 'MASTER'
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
readonly getMasterLeague: (client: WhisperClient, route: PlatformRoute, options?: {
|
|
344
|
+
queue?: "RANKED_TFT" | "RANKED_TFT_DOUBLE_UP";
|
|
345
|
+
}) => Promise<TftLeagueList>;
|
|
346
|
+
/**
|
|
347
|
+
* Get TFT league entries for a player by PUUID.
|
|
348
|
+
*
|
|
349
|
+
* Returns all ranked TFT queue entries for the given player.
|
|
350
|
+
*
|
|
351
|
+
* @param client - WhisperClient instance
|
|
352
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
353
|
+
* @param puuid - Encrypted PUUID
|
|
354
|
+
* @param options - Optional queue filter
|
|
355
|
+
* @returns Array of TFT league entries (one per queue)
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* ```typescript
|
|
359
|
+
* const entries = await tftLeagueV1.getLeagueEntriesByPuuid(client, 'na1', 'abc-123');
|
|
360
|
+
* for (const entry of entries) {
|
|
361
|
+
* console.log(entry.tier, entry.rank, entry.leaguePoints);
|
|
362
|
+
* }
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
readonly getLeagueEntriesByPuuid: (client: WhisperClient, route: PlatformRoute, puuid: string, options?: GetTftLeagueEntriesOptions) => Promise<TftLeagueEntry[]>;
|
|
366
|
+
/**
|
|
367
|
+
* Get TFT league entries by tier and division.
|
|
368
|
+
*
|
|
369
|
+
* Returns a paginated list of entries. Use the `page` option for pagination.
|
|
370
|
+
*
|
|
371
|
+
* @param client - WhisperClient instance
|
|
372
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
373
|
+
* @param tier - Tier (e.g., 'DIAMOND', 'GOLD')
|
|
374
|
+
* @param division - Division (e.g., 'I', 'II', 'III', 'IV')
|
|
375
|
+
* @param options - Optional queue and pagination filters
|
|
376
|
+
* @returns Array of TFT league entries
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* ```typescript
|
|
380
|
+
* const entries = await tftLeagueV1.getLeagueEntries(client, 'na1', 'DIAMOND', 'I');
|
|
381
|
+
* console.log(entries.length);
|
|
382
|
+
*
|
|
383
|
+
* // With pagination and queue filter
|
|
384
|
+
* const page2 = await tftLeagueV1.getLeagueEntries(client, 'na1', 'GOLD', 'IV', {
|
|
385
|
+
* queue: 'RANKED_TFT',
|
|
386
|
+
* page: 2,
|
|
387
|
+
* });
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
readonly getLeagueEntries: (client: WhisperClient, route: PlatformRoute, tier: string, division: string, options?: {
|
|
391
|
+
queue?: string;
|
|
392
|
+
page?: number;
|
|
393
|
+
}) => Promise<TftLeagueEntry[]>;
|
|
394
|
+
/**
|
|
395
|
+
* Get a TFT league by its ID.
|
|
396
|
+
*
|
|
397
|
+
* @param client - WhisperClient instance
|
|
398
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
399
|
+
* @param leagueId - League UUID
|
|
400
|
+
* @returns The full TFT league with all entries
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```typescript
|
|
404
|
+
* const league = await tftLeagueV1.getLeagueById(client, 'na1', 'some-league-uuid');
|
|
405
|
+
* console.log(league.name, league.tier);
|
|
406
|
+
* ```
|
|
407
|
+
*/
|
|
408
|
+
readonly getLeagueById: (client: WhisperClient, route: PlatformRoute, leagueId: string) => Promise<TftLeagueList>;
|
|
409
|
+
/**
|
|
410
|
+
* Get the top-rated ladder for a TFT rated queue.
|
|
411
|
+
*
|
|
412
|
+
* Used for Hyper Roll and Double Up top player listings.
|
|
413
|
+
*
|
|
414
|
+
* @param client - WhisperClient instance
|
|
415
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
416
|
+
* @param queue - Rated queue name (e.g., 'RANKED_TFT_TURBO', 'RANKED_TFT_DOUBLE_UP')
|
|
417
|
+
* @returns Array of top-rated ladder entries
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```typescript
|
|
421
|
+
* const ladder = await tftLeagueV1.getTopRatedLadder(client, 'na1', 'RANKED_TFT_TURBO');
|
|
422
|
+
* console.log(ladder[0].wins);
|
|
423
|
+
* ```
|
|
424
|
+
*/
|
|
425
|
+
readonly getTopRatedLadder: (client: WhisperClient, route: PlatformRoute, queue: string) => Promise<TftTopRatedLadderEntry[]>;
|
|
426
|
+
};
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region src/tft/tft-match-v1.d.ts
|
|
429
|
+
/** Options for filtering TFT match ID queries */
|
|
430
|
+
interface GetTftMatchIdsOptions {
|
|
431
|
+
/** Start index (default 0) */
|
|
432
|
+
start?: number;
|
|
433
|
+
/** Number of match IDs to return (default 20, max 100) */
|
|
434
|
+
count?: number;
|
|
435
|
+
/** Epoch timestamp in seconds -- filter matches after this time */
|
|
436
|
+
startTime?: number;
|
|
437
|
+
/** Epoch timestamp in seconds -- filter matches before this time */
|
|
438
|
+
endTime?: number;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* TFT Match API (v1).
|
|
442
|
+
*
|
|
443
|
+
* Retrieve TFT match history and match details by PUUID or match ID.
|
|
444
|
+
*
|
|
445
|
+
* All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
|
|
446
|
+
*
|
|
447
|
+
* @example
|
|
448
|
+
* ```typescript
|
|
449
|
+
* import { tftMatchV1 } from '@wardbox/whisper/tft';
|
|
450
|
+
*
|
|
451
|
+
* const matchIds = await tftMatchV1.getMatchIdsByPuuid(client, 'americas', 'puuid-123');
|
|
452
|
+
* const match = await tftMatchV1.getMatch(client, 'americas', matchIds[0]);
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
declare const tftMatchV1: {
|
|
456
|
+
/**
|
|
457
|
+
* Get a list of TFT match IDs by PUUID.
|
|
458
|
+
*
|
|
459
|
+
* @param client - WhisperClient instance
|
|
460
|
+
* @param route - Regional routing value (e.g., 'americas', 'europe')
|
|
461
|
+
* @param puuid - Encrypted PUUID
|
|
462
|
+
* @param options - Optional filters for time range and pagination
|
|
463
|
+
* @returns Array of match ID strings
|
|
464
|
+
*
|
|
465
|
+
* @example
|
|
466
|
+
* ```typescript
|
|
467
|
+
* const ids = await tftMatchV1.getMatchIdsByPuuid(client, 'americas', 'puuid-123', {
|
|
468
|
+
* count: 10,
|
|
469
|
+
* });
|
|
470
|
+
* ```
|
|
471
|
+
*/
|
|
472
|
+
readonly getMatchIdsByPuuid: (client: WhisperClient, route: RegionalRoute, puuid: string, options?: GetTftMatchIdsOptions) => Promise<string[]>;
|
|
473
|
+
/**
|
|
474
|
+
* Get a TFT match by match ID.
|
|
475
|
+
*
|
|
476
|
+
* @param client - WhisperClient instance
|
|
477
|
+
* @param route - Regional routing value (e.g., 'americas', 'europe')
|
|
478
|
+
* @param matchId - Match ID (e.g., 'NA1_1234567890')
|
|
479
|
+
* @returns Full TFT match data including metadata and participant info
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```typescript
|
|
483
|
+
* const match = await tftMatchV1.getMatch(client, 'americas', 'NA1_1234567890');
|
|
484
|
+
* console.log(match.info.tft_set_number);
|
|
485
|
+
* ```
|
|
486
|
+
*/
|
|
487
|
+
readonly getMatch: (client: WhisperClient, route: RegionalRoute, matchId: string) => Promise<TftMatch>;
|
|
488
|
+
};
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region src/tft/tft-status-v1.d.ts
|
|
491
|
+
/**
|
|
492
|
+
* TFT Status API (v1).
|
|
493
|
+
*
|
|
494
|
+
* Retrieve TFT platform status information including incidents and maintenances.
|
|
495
|
+
*
|
|
496
|
+
* All methods require a {@link PlatformRoute} (e.g., 'na1', 'euw1').
|
|
497
|
+
*
|
|
498
|
+
* @example
|
|
499
|
+
* ```typescript
|
|
500
|
+
* import { tftStatusV1 } from '@wardbox/whisper/tft';
|
|
501
|
+
*
|
|
502
|
+
* const status = await tftStatusV1.getPlatformData(client, 'na1');
|
|
503
|
+
* console.log(status.name, status.incidents.length);
|
|
504
|
+
* ```
|
|
505
|
+
*/
|
|
506
|
+
declare const tftStatusV1: {
|
|
507
|
+
/**
|
|
508
|
+
* Get TFT platform status data for the given region.
|
|
509
|
+
*
|
|
510
|
+
* Returns incident and maintenance information for the TFT platform.
|
|
511
|
+
*
|
|
512
|
+
* @param client - WhisperClient instance
|
|
513
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
514
|
+
* @returns Platform status data with incidents and maintenances
|
|
515
|
+
*
|
|
516
|
+
* @example
|
|
517
|
+
* ```typescript
|
|
518
|
+
* const status = await tftStatusV1.getPlatformData(client, 'euw1');
|
|
519
|
+
* if (status.maintenances.length > 0) {
|
|
520
|
+
* console.log('Scheduled maintenance active');
|
|
521
|
+
* }
|
|
522
|
+
* ```
|
|
523
|
+
*/
|
|
524
|
+
readonly getPlatformData: (client: WhisperClient, route: PlatformRoute) => Promise<TftPlatformData>;
|
|
525
|
+
};
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/tft/tft-summoner-v1.d.ts
|
|
528
|
+
/**
|
|
529
|
+
* TFT Summoner API (v1).
|
|
530
|
+
*
|
|
531
|
+
* Access TFT summoner data by PUUID or RSO access token.
|
|
532
|
+
*
|
|
533
|
+
* All methods require a {@link PlatformRoute} (e.g., 'na1', 'euw1').
|
|
534
|
+
*
|
|
535
|
+
* @example
|
|
536
|
+
* ```typescript
|
|
537
|
+
* import { tftSummonerV1 } from '@wardbox/whisper/tft';
|
|
538
|
+
*
|
|
539
|
+
* const summoner = await tftSummonerV1.getByPuuid(client, 'na1', puuid);
|
|
540
|
+
* console.log(summoner.summonerLevel);
|
|
541
|
+
* ```
|
|
542
|
+
*/
|
|
543
|
+
declare const tftSummonerV1: {
|
|
544
|
+
/**
|
|
545
|
+
* Get a TFT summoner by PUUID.
|
|
546
|
+
*
|
|
547
|
+
* @param client - WhisperClient instance
|
|
548
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
549
|
+
* @param puuid - Encrypted PUUID
|
|
550
|
+
* @returns TFT summoner profile data
|
|
551
|
+
*
|
|
552
|
+
* @example
|
|
553
|
+
* ```typescript
|
|
554
|
+
* const summoner = await tftSummonerV1.getByPuuid(client, 'na1', 'abc-123');
|
|
555
|
+
* console.log(`Level ${summoner.summonerLevel}`);
|
|
556
|
+
* ```
|
|
557
|
+
*/
|
|
558
|
+
readonly getByPuuid: (client: WhisperClient, route: PlatformRoute, puuid: string) => Promise<TftSummoner>;
|
|
559
|
+
/**
|
|
560
|
+
* Get the TFT summoner for the authenticated user via RSO access token.
|
|
561
|
+
*
|
|
562
|
+
* This endpoint requires Riot Sign On (RSO) authentication. The access token
|
|
563
|
+
* is passed as a Bearer token in the Authorization header.
|
|
564
|
+
*
|
|
565
|
+
* @param client - WhisperClient instance
|
|
566
|
+
* @param route - Platform routing value (e.g., 'na1', 'euw1')
|
|
567
|
+
* @param accessToken - RSO access token (OAuth2 Bearer token)
|
|
568
|
+
* @returns TFT summoner profile data for the authenticated user
|
|
569
|
+
*
|
|
570
|
+
* @example
|
|
571
|
+
* ```typescript
|
|
572
|
+
* // Requires RSO (Riot Sign On) authentication
|
|
573
|
+
* const summoner = await tftSummonerV1.getByAccessToken(client, 'na1', 'rso-token');
|
|
574
|
+
* console.log(`Level ${summoner.summonerLevel}`);
|
|
575
|
+
* ```
|
|
576
|
+
*/
|
|
577
|
+
readonly getByAccessToken: (client: WhisperClient, route: PlatformRoute, accessToken: string) => Promise<TftSummoner>;
|
|
578
|
+
};
|
|
579
|
+
//#endregion
|
|
580
|
+
export { type GetTftLeagueEntriesOptions, type GetTftMatchIdsOptions, type TftCurrentGameInfo, type TftLeagueEntry, type TftLeagueList, type TftMatch, type TftPlatformData, type TftSummoner, type TftTopRatedLadderEntry, spectatorTftV5, tftLeagueV1, tftMatchV1, tftStatusV1, tftSummonerV1 };
|
|
581
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/types/generated/tft.ts","../../src/types/overrides/tft-league.ts","../../src/tft/spectator-tft-v5.ts","../../src/tft/tft-league-v1.ts","../../src/tft/tft-match-v1.ts","../../src/tft/tft-status-v1.ts","../../src/tft/tft-summoner-v1.ts"],"mappings":";;;AAmGA;AAAA,UAxCiB,kBAAA;;EAEf,eAAA;IAAmB,UAAA;IAAoB,QAAA;IAAkB,MAAA;EAAA;EAwCc;EAtCvE,MAAA;EAsCmH;EApCnH,UAAA;EAoCwJ;EAlCxJ,QAAA;EAkCqL;EAhCrL,iBAAA;EAgC0N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