@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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -0
  3. package/dist/client-B7r2KpHz.js +838 -0
  4. package/dist/client-CxR21ld-.cjs +913 -0
  5. package/dist/client-DrrSDGBt.d.cts +181 -0
  6. package/dist/client-DrrSDGBt.d.cts.map +1 -0
  7. package/dist/client-Xu0AwrUw.d.ts +181 -0
  8. package/dist/client-Xu0AwrUw.d.ts.map +1 -0
  9. package/dist/core/index.cjs +15 -0
  10. package/dist/core/index.d.cts +208 -0
  11. package/dist/core/index.d.cts.map +1 -0
  12. package/dist/core/index.d.ts +208 -0
  13. package/dist/core/index.d.ts.map +1 -0
  14. package/dist/core/index.js +2 -0
  15. package/dist/errors-7wdVIL5Y.d.cts +111 -0
  16. package/dist/errors-7wdVIL5Y.d.cts.map +1 -0
  17. package/dist/errors-DofVFslx.d.ts +111 -0
  18. package/dist/errors-DofVFslx.d.ts.map +1 -0
  19. package/dist/index.cjs +8 -0
  20. package/dist/index.d.cts +3 -0
  21. package/dist/index.d.ts +3 -0
  22. package/dist/index.js +2 -0
  23. package/dist/lol/index.cjs +436 -0
  24. package/dist/lol/index.d.cts +7232 -0
  25. package/dist/lol/index.d.cts.map +1 -0
  26. package/dist/lol/index.d.ts +7232 -0
  27. package/dist/lol/index.d.ts.map +1 -0
  28. package/dist/lol/index.js +425 -0
  29. package/dist/lor/index.cjs +44 -0
  30. package/dist/lor/index.d.cts +159 -0
  31. package/dist/lor/index.d.cts.map +1 -0
  32. package/dist/lor/index.d.ts +159 -0
  33. package/dist/lor/index.d.ts.map +1 -0
  34. package/dist/lor/index.js +44 -0
  35. package/dist/riftbound/index.cjs +25 -0
  36. package/dist/riftbound/index.d.cts +97 -0
  37. package/dist/riftbound/index.d.cts.map +1 -0
  38. package/dist/riftbound/index.d.ts +97 -0
  39. package/dist/riftbound/index.d.ts.map +1 -0
  40. package/dist/riftbound/index.js +26 -0
  41. package/dist/riot/index.cjs +31 -0
  42. package/dist/riot/index.d.cts +101 -0
  43. package/dist/riot/index.d.cts.map +1 -0
  44. package/dist/riot/index.d.ts +101 -0
  45. package/dist/riot/index.d.ts.map +1 -0
  46. package/dist/riot/index.js +32 -0
  47. package/dist/tft/index.cjs +152 -0
  48. package/dist/tft/index.d.cts +581 -0
  49. package/dist/tft/index.d.cts.map +1 -0
  50. package/dist/tft/index.d.ts +581 -0
  51. package/dist/tft/index.d.ts.map +1 -0
  52. package/dist/tft/index.js +149 -0
  53. package/dist/val/index.cjs +166 -0
  54. package/dist/val/index.d.cts +952 -0
  55. package/dist/val/index.d.cts.map +1 -0
  56. package/dist/val/index.d.ts +952 -0
  57. package/dist/val/index.d.ts.map +1 -0
  58. package/dist/val/index.js +161 -0
  59. package/package.json +137 -0
@@ -0,0 +1,159 @@
1
+ import { p as RegionalRoute, t as WhisperClient } from "../client-DrrSDGBt.cjs";
2
+
3
+ //#region src/types/generated/lor.d.ts
4
+ /**
5
+ * Legends of Runeterra ranked leaderboard data.
6
+ *
7
+ * Contains the top players for a given region's ranked ladder.
8
+ */
9
+ interface LorLeaderboard {
10
+ /** Array of ranked players with their LP, name, and rank position */
11
+ players: ({
12
+ lp: number; /** Player name */
13
+ name: string; /** Leaderboard position */
14
+ rank: number;
15
+ })[];
16
+ }
17
+ /**
18
+ * Legends of Runeterra platform status data.
19
+ *
20
+ * Contains active incidents and scheduled maintenances for the LoR platform.
21
+ */
22
+ interface LorPlatformData {
23
+ /** Platform region identifier (e.g., 'Americas') */
24
+ id: string;
25
+ /** Active incidents affecting the platform */
26
+ incidents: ({
27
+ archive_at: string; /** Time when the incident was created */
28
+ created_at: string; /** Unique incident identifier */
29
+ id: number; /** Severity level of the incident */
30
+ incident_severity: string; /** Current maintenance status */
31
+ maintenance_status: string; /** Affected platforms */
32
+ platforms: string[]; /** Localized title content */
33
+ titles: ({
34
+ content: string; /** Locale code */
35
+ locale: string;
36
+ })[]; /** Time of last update */
37
+ updated_at: string; /** Chronological list of updates for this incident */
38
+ updates: ({
39
+ author: string; /** Time the update was created */
40
+ created_at: string; /** Unique update identifier */
41
+ id: number; /** Whether the update is published */
42
+ publish: boolean; /** Where the update was published */
43
+ publish_locations: string[]; /** Localized translations of the update */
44
+ translations: ({
45
+ content: string; /** Locale code */
46
+ locale: string;
47
+ })[]; /** Time the update was last modified */
48
+ updated_at: string;
49
+ })[];
50
+ })[];
51
+ /** Supported locale codes */
52
+ locales: string[];
53
+ /** Scheduled maintenances for the platform */
54
+ maintenances: ({
55
+ archive_at: string; /** Time when the maintenance was created */
56
+ created_at: string; /** Unique maintenance identifier */
57
+ id: number; /** Severity level */
58
+ incident_severity: string; /** Current maintenance status */
59
+ maintenance_status: string; /** Affected platforms */
60
+ platforms: string[]; /** Localized title content */
61
+ titles: ({
62
+ content: string; /** Locale code */
63
+ locale: string;
64
+ })[]; /** Time of last update */
65
+ updated_at: string; /** Chronological list of updates for this maintenance */
66
+ updates: ({
67
+ author: string; /** Time the update was created */
68
+ created_at: string; /** Unique update identifier */
69
+ id: number; /** Whether the update is published */
70
+ publish: boolean; /** Where the update was published */
71
+ publish_locations: string[]; /** Localized translations of the update */
72
+ translations: ({
73
+ content: string; /** Locale code */
74
+ locale: string;
75
+ })[]; /** Time the update was last modified */
76
+ updated_at: string;
77
+ })[];
78
+ })[];
79
+ /** Human-readable platform name */
80
+ name: string;
81
+ }
82
+ //#endregion
83
+ //#region src/lor/lor-ranked-v1.d.ts
84
+ /**
85
+ * Legends of Runeterra Ranked API (v1).
86
+ *
87
+ * Retrieve ranked leaderboard data for LoR.
88
+ *
89
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
90
+ * LoR ranked leaderboards are available on americas, europe, and sea regions.
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * import { lorRankedV1 } from '@wardbox/whisper/lor';
95
+ *
96
+ * const leaderboard = await lorRankedV1.getLeaderboards(client, 'americas');
97
+ * console.log(leaderboard.players[0].name, leaderboard.players[0].lp);
98
+ * ```
99
+ */
100
+ declare const lorRankedV1: {
101
+ /**
102
+ * Get the ranked leaderboard for the given region.
103
+ *
104
+ * Returns the top players on the LoR ranked ladder, ordered by rank.
105
+ *
106
+ * @param client - WhisperClient instance
107
+ * @param route - Regional routing value (e.g., 'americas', 'europe', 'sea')
108
+ * @returns Leaderboard data with ranked players
109
+ *
110
+ * @example
111
+ * ```typescript
112
+ * const leaderboard = await lorRankedV1.getLeaderboards(client, 'europe');
113
+ * for (const player of leaderboard.players) {
114
+ * console.log(`#${player.rank} ${player.name} (${player.lp} LP)`);
115
+ * }
116
+ * ```
117
+ */
118
+ readonly getLeaderboards: (client: WhisperClient, route: RegionalRoute) => Promise<LorLeaderboard>;
119
+ };
120
+ //#endregion
121
+ //#region src/lor/lor-status-v1.d.ts
122
+ /**
123
+ * Legends of Runeterra Status API (v1).
124
+ *
125
+ * Retrieve platform status information including incidents and maintenances for LoR.
126
+ *
127
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * import { lorStatusV1 } from '@wardbox/whisper/lor';
132
+ *
133
+ * const status = await lorStatusV1.getPlatformData(client, 'americas');
134
+ * console.log(status.name, status.incidents.length);
135
+ * ```
136
+ */
137
+ declare const lorStatusV1: {
138
+ /**
139
+ * Get platform status data for the given region.
140
+ *
141
+ * Returns incident and maintenance information for the LoR platform.
142
+ *
143
+ * @param client - WhisperClient instance
144
+ * @param route - Regional routing value (e.g., 'americas', 'europe')
145
+ * @returns Platform status data with incidents and maintenances
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * const status = await lorStatusV1.getPlatformData(client, 'europe');
150
+ * if (status.maintenances.length > 0) {
151
+ * console.log('Scheduled maintenance active');
152
+ * }
153
+ * ```
154
+ */
155
+ readonly getPlatformData: (client: WhisperClient, route: RegionalRoute) => Promise<LorPlatformData>;
156
+ };
157
+ //#endregion
158
+ export { type LorLeaderboard, type LorPlatformData, lorRankedV1, lorStatusV1 };
159
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/types/generated/lor.ts","../../src/lor/lor-ranked-v1.ts","../../src/lor/lor-status-v1.ts"],"mappings":";;;;;;;;UAeiB,cAAA;EAUA;EARf,OAAA;IAAiC,EAAA,UAQH;IARkC,IAAA,UAQlC;IAR4E,IAAA;EAAA;AAAA;;;;;;UAQ3F,eAAA;EAIoZ;EAFna,EAAA;EAEuf;EAAvf,SAAA;IAAyD,UAAA,UAAijB;IAAnf,UAAA,UAAsiB;IAAhf,EAAA,UAAoiB;IAAlf,iBAAA,UAAqiB;IAAxe,kBAAA,UAAgiB;IAA1e,SAAA,YAAmjB;IAA/f,MAAA;MAA6B,OAAA,UAA+iB;MAA3gB,MAAA;IAAA,MACza;IADyd,UAAA,UAGvf;IAHkkB,OAAA;MAAwC,MAAA,UAG1e;MAH6hB,UAAA,UAGpe;MAHwhB,EAAA,UAGtf;MAHyiB,OAAA,WAG5e;MAHoiB,iBAAA,YAG9e;MAHujB,YAAA;QAAyC,OAAA,UAG/gB;QAHmjB,MAAA;MAAA,MAG/d;MAH6hB,UAAA;IAAA;EAAA;EAGhU;EAFlrB,OAAA;EAEquB;EAAnwB,YAAA;IAA+D,UAAA,UAAq0B;IAApwB,UAAA,UAA6yB;IAApvB,EAAA,UAAwxB;IAAtvB,iBAAA,UAAozB;IAAvvB,kBAAA,UACpP;IAD0S,SAAA,YACtS;IAD0V,MAAA;MAA6B,OAAA;MAAoC,MAAA;IAAA;IAAgD,UAAA,UCc3e;IDdyjB,OAAA;MAAwC,MAAA,UCcjmB;MDdopB,UAAA,UCM9nB;MDNkrB,EAAA,UCM5pB;MDN+sB,OAAA,WCMvrB;MDN+uB,iBAAA,YCMvvB;MDNg0B,YAAA;QAAyC,OAAA,UCMl2B;QDNs4B,MAAA;MAAA,MCMn7B;MDNi/B,UAAA;IAAA;EAAA;ECM38B;EDLhC,IAAA;AAAA;;;AAlBtC;;;;;;;;;;AAUA;;;;;;AAVA,cCKa,WAAA;EDS4G;;;;;;;;;;;;;;;;;EAAA,mCCSzF,aAAA,EAAa,KAAA,EAAS,aAAA,KAAgB,OAAA,CAAQ,cAAA;AAAA;;;ADvB9E;;;;;;;;;;AAUA;;;;;AAVA,cEIa,WAAA;EFU8C;;;;;;;;;;;;;;;;;EAAA,mCEQ3B,aAAA,EAAa,KAAA,EAAS,aAAA,KAAgB,OAAA,CAAQ,eAAA;AAAA"}
@@ -0,0 +1,159 @@
1
+ import { p as RegionalRoute, t as WhisperClient } from "../client-Xu0AwrUw.js";
2
+
3
+ //#region src/types/generated/lor.d.ts
4
+ /**
5
+ * Legends of Runeterra ranked leaderboard data.
6
+ *
7
+ * Contains the top players for a given region's ranked ladder.
8
+ */
9
+ interface LorLeaderboard {
10
+ /** Array of ranked players with their LP, name, and rank position */
11
+ players: ({
12
+ lp: number; /** Player name */
13
+ name: string; /** Leaderboard position */
14
+ rank: number;
15
+ })[];
16
+ }
17
+ /**
18
+ * Legends of Runeterra platform status data.
19
+ *
20
+ * Contains active incidents and scheduled maintenances for the LoR platform.
21
+ */
22
+ interface LorPlatformData {
23
+ /** Platform region identifier (e.g., 'Americas') */
24
+ id: string;
25
+ /** Active incidents affecting the platform */
26
+ incidents: ({
27
+ archive_at: string; /** Time when the incident was created */
28
+ created_at: string; /** Unique incident identifier */
29
+ id: number; /** Severity level of the incident */
30
+ incident_severity: string; /** Current maintenance status */
31
+ maintenance_status: string; /** Affected platforms */
32
+ platforms: string[]; /** Localized title content */
33
+ titles: ({
34
+ content: string; /** Locale code */
35
+ locale: string;
36
+ })[]; /** Time of last update */
37
+ updated_at: string; /** Chronological list of updates for this incident */
38
+ updates: ({
39
+ author: string; /** Time the update was created */
40
+ created_at: string; /** Unique update identifier */
41
+ id: number; /** Whether the update is published */
42
+ publish: boolean; /** Where the update was published */
43
+ publish_locations: string[]; /** Localized translations of the update */
44
+ translations: ({
45
+ content: string; /** Locale code */
46
+ locale: string;
47
+ })[]; /** Time the update was last modified */
48
+ updated_at: string;
49
+ })[];
50
+ })[];
51
+ /** Supported locale codes */
52
+ locales: string[];
53
+ /** Scheduled maintenances for the platform */
54
+ maintenances: ({
55
+ archive_at: string; /** Time when the maintenance was created */
56
+ created_at: string; /** Unique maintenance identifier */
57
+ id: number; /** Severity level */
58
+ incident_severity: string; /** Current maintenance status */
59
+ maintenance_status: string; /** Affected platforms */
60
+ platforms: string[]; /** Localized title content */
61
+ titles: ({
62
+ content: string; /** Locale code */
63
+ locale: string;
64
+ })[]; /** Time of last update */
65
+ updated_at: string; /** Chronological list of updates for this maintenance */
66
+ updates: ({
67
+ author: string; /** Time the update was created */
68
+ created_at: string; /** Unique update identifier */
69
+ id: number; /** Whether the update is published */
70
+ publish: boolean; /** Where the update was published */
71
+ publish_locations: string[]; /** Localized translations of the update */
72
+ translations: ({
73
+ content: string; /** Locale code */
74
+ locale: string;
75
+ })[]; /** Time the update was last modified */
76
+ updated_at: string;
77
+ })[];
78
+ })[];
79
+ /** Human-readable platform name */
80
+ name: string;
81
+ }
82
+ //#endregion
83
+ //#region src/lor/lor-ranked-v1.d.ts
84
+ /**
85
+ * Legends of Runeterra Ranked API (v1).
86
+ *
87
+ * Retrieve ranked leaderboard data for LoR.
88
+ *
89
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
90
+ * LoR ranked leaderboards are available on americas, europe, and sea regions.
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * import { lorRankedV1 } from '@wardbox/whisper/lor';
95
+ *
96
+ * const leaderboard = await lorRankedV1.getLeaderboards(client, 'americas');
97
+ * console.log(leaderboard.players[0].name, leaderboard.players[0].lp);
98
+ * ```
99
+ */
100
+ declare const lorRankedV1: {
101
+ /**
102
+ * Get the ranked leaderboard for the given region.
103
+ *
104
+ * Returns the top players on the LoR ranked ladder, ordered by rank.
105
+ *
106
+ * @param client - WhisperClient instance
107
+ * @param route - Regional routing value (e.g., 'americas', 'europe', 'sea')
108
+ * @returns Leaderboard data with ranked players
109
+ *
110
+ * @example
111
+ * ```typescript
112
+ * const leaderboard = await lorRankedV1.getLeaderboards(client, 'europe');
113
+ * for (const player of leaderboard.players) {
114
+ * console.log(`#${player.rank} ${player.name} (${player.lp} LP)`);
115
+ * }
116
+ * ```
117
+ */
118
+ readonly getLeaderboards: (client: WhisperClient, route: RegionalRoute) => Promise<LorLeaderboard>;
119
+ };
120
+ //#endregion
121
+ //#region src/lor/lor-status-v1.d.ts
122
+ /**
123
+ * Legends of Runeterra Status API (v1).
124
+ *
125
+ * Retrieve platform status information including incidents and maintenances for LoR.
126
+ *
127
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * import { lorStatusV1 } from '@wardbox/whisper/lor';
132
+ *
133
+ * const status = await lorStatusV1.getPlatformData(client, 'americas');
134
+ * console.log(status.name, status.incidents.length);
135
+ * ```
136
+ */
137
+ declare const lorStatusV1: {
138
+ /**
139
+ * Get platform status data for the given region.
140
+ *
141
+ * Returns incident and maintenance information for the LoR platform.
142
+ *
143
+ * @param client - WhisperClient instance
144
+ * @param route - Regional routing value (e.g., 'americas', 'europe')
145
+ * @returns Platform status data with incidents and maintenances
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * const status = await lorStatusV1.getPlatformData(client, 'europe');
150
+ * if (status.maintenances.length > 0) {
151
+ * console.log('Scheduled maintenance active');
152
+ * }
153
+ * ```
154
+ */
155
+ readonly getPlatformData: (client: WhisperClient, route: RegionalRoute) => Promise<LorPlatformData>;
156
+ };
157
+ //#endregion
158
+ export { type LorLeaderboard, type LorPlatformData, lorRankedV1, lorStatusV1 };
159
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/types/generated/lor.ts","../../src/lor/lor-ranked-v1.ts","../../src/lor/lor-status-v1.ts"],"mappings":";;;;;;;;UAeiB,cAAA;EAUA;EARf,OAAA;IAAiC,EAAA,UAQH;IARkC,IAAA,UAQlC;IAR4E,IAAA;EAAA;AAAA;;;;;;UAQ3F,eAAA;EAIoZ;EAFna,EAAA;EAEuf;EAAvf,SAAA;IAAyD,UAAA,UAAijB;IAAnf,UAAA,UAAsiB;IAAhf,EAAA,UAAoiB;IAAlf,iBAAA,UAAqiB;IAAxe,kBAAA,UAAgiB;IAA1e,SAAA,YAAmjB;IAA/f,MAAA;MAA6B,OAAA,UAA+iB;MAA3gB,MAAA;IAAA,MACza;IADyd,UAAA,UAGvf;IAHkkB,OAAA;MAAwC,MAAA,UAG1e;MAH6hB,UAAA,UAGpe;MAHwhB,EAAA,UAGtf;MAHyiB,OAAA,WAG5e;MAHoiB,iBAAA,YAG9e;MAHujB,YAAA;QAAyC,OAAA,UAG/gB;QAHmjB,MAAA;MAAA,MAG/d;MAH6hB,UAAA;IAAA;EAAA;EAGhU;EAFlrB,OAAA;EAEquB;EAAnwB,YAAA;IAA+D,UAAA,UAAq0B;IAApwB,UAAA,UAA6yB;IAApvB,EAAA,UAAwxB;IAAtvB,iBAAA,UAAozB;IAAvvB,kBAAA,UACpP;IAD0S,SAAA,YACtS;IAD0V,MAAA;MAA6B,OAAA;MAAoC,MAAA;IAAA;IAAgD,UAAA,UCc3e;IDdyjB,OAAA;MAAwC,MAAA,UCcjmB;MDdopB,UAAA,UCM9nB;MDNkrB,EAAA,UCM5pB;MDN+sB,OAAA,WCMvrB;MDN+uB,iBAAA,YCMvvB;MDNg0B,YAAA;QAAyC,OAAA,UCMl2B;QDNs4B,MAAA;MAAA,MCMn7B;MDNi/B,UAAA;IAAA;EAAA;ECM38B;EDLhC,IAAA;AAAA;;;AAlBtC;;;;;;;;;;AAUA;;;;;;AAVA,cCKa,WAAA;EDS4G;;;;;;;;;;;;;;;;;EAAA,mCCSzF,aAAA,EAAa,KAAA,EAAS,aAAA,KAAgB,OAAA,CAAQ,cAAA;AAAA;;;ADvB9E;;;;;;;;;;AAUA;;;;;AAVA,cEIa,WAAA;EFU8C;;;;;;;;;;;;;;;;;EAAA,mCEQ3B,aAAA,EAAa,KAAA,EAAS,aAAA,KAAgB,OAAA,CAAQ,eAAA;AAAA"}
@@ -0,0 +1,44 @@
1
+ //#region src/lor/lor-ranked-v1.ts
2
+ /**
3
+ * Legends of Runeterra Ranked API (v1).
4
+ *
5
+ * Retrieve ranked leaderboard data for LoR.
6
+ *
7
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
8
+ * LoR ranked leaderboards are available on americas, europe, and sea regions.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { lorRankedV1 } from '@wardbox/whisper/lor';
13
+ *
14
+ * const leaderboard = await lorRankedV1.getLeaderboards(client, 'americas');
15
+ * console.log(leaderboard.players[0].name, leaderboard.players[0].lp);
16
+ * ```
17
+ */
18
+ const lorRankedV1 = { async getLeaderboards(client, route) {
19
+ return (await client.request(route, "/lor/ranked/v1/leaderboards", "lor-ranked-v1.getLeaderboards")).data;
20
+ } };
21
+ //#endregion
22
+ //#region src/lor/lor-status-v1.ts
23
+ /**
24
+ * Legends of Runeterra Status API (v1).
25
+ *
26
+ * Retrieve platform status information including incidents and maintenances for LoR.
27
+ *
28
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * import { lorStatusV1 } from '@wardbox/whisper/lor';
33
+ *
34
+ * const status = await lorStatusV1.getPlatformData(client, 'americas');
35
+ * console.log(status.name, status.incidents.length);
36
+ * ```
37
+ */
38
+ const lorStatusV1 = { async getPlatformData(client, route) {
39
+ return (await client.request(route, "/lor/status/v1/platform-data", "lor-status-v1.getPlatformData")).data;
40
+ } };
41
+ //#endregion
42
+ export { lorRankedV1, lorStatusV1 };
43
+
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/riftbound/riftbound-content-v1.ts
3
+ /**
4
+ * Riftbound Content API (v1).
5
+ *
6
+ * Retrieve game content including card sets and card data for Riftbound.
7
+ *
8
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
9
+ * Riftbound content is available on americas, asia, and europe regions.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * import { riftboundContentV1 } from '@wardbox/whisper/riftbound';
14
+ *
15
+ * const content = await riftboundContentV1.getContent(client, 'americas');
16
+ * console.log(content.version, content.sets.length);
17
+ * ```
18
+ */
19
+ const riftboundContentV1 = { async getContent(client, route, options) {
20
+ const params = {};
21
+ if (options?.locale !== void 0) params.locale = options.locale;
22
+ return (await client.request(route, "/riftbound/content/v1/contents", "riftbound-content-v1.getContent", Object.keys(params).length > 0 ? { params } : void 0)).data;
23
+ } };
24
+ //#endregion
25
+ exports.riftboundContentV1 = riftboundContentV1;
@@ -0,0 +1,97 @@
1
+ import { p as RegionalRoute, t as WhisperClient } from "../client-DrrSDGBt.cjs";
2
+
3
+ //#region src/types/generated/riftbound.d.ts
4
+ /**
5
+ * Riftbound content data including all card sets and metadata.
6
+ *
7
+ * Contains the full game content catalog with versioning information.
8
+ */
9
+ interface RiftboundContent {
10
+ /** Game identifier */
11
+ game: string;
12
+ /** ISO timestamp of last content update */
13
+ lastUpdated: string;
14
+ /** Array of card sets, each containing its cards */
15
+ sets: ({
16
+ cards: ({
17
+ art: {
18
+ artist: string; /** Full-resolution image URL */
19
+ fullURL: string; /** Thumbnail image URL */
20
+ thumbnailURL: string;
21
+ }; /** Card collector number within its set */
22
+ collectorNumber: number; /** Card description text */
23
+ description: string; /** Card faction */
24
+ faction: string; /** Flavor text */
25
+ flavorText: string; /** Unique card identifier */
26
+ id: string; /** Keyword abilities */
27
+ keywords: string[]; /** Card name */
28
+ name: string; /** Card rarity tier */
29
+ rarity: string; /** Set identifier */
30
+ set: string; /** Card gameplay statistics */
31
+ stats: {
32
+ cost: number; /** Energy stat */
33
+ energy: number; /** Might stat */
34
+ might: number; /** Power stat */
35
+ power: number;
36
+ }; /** Searchable tags */
37
+ tags: string[]; /** Card type */
38
+ type: 'CHAMPION' | 'ACCOUNT';
39
+ })[]; /** Set identifier */
40
+ id: string; /** Set name */
41
+ name: string;
42
+ })[];
43
+ /** Content version string */
44
+ version: string;
45
+ }
46
+ //#endregion
47
+ //#region src/riftbound/riftbound-content-v1.d.ts
48
+ /**
49
+ * Riftbound Content API (v1).
50
+ *
51
+ * Retrieve game content including card sets and card data for Riftbound.
52
+ *
53
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
54
+ * Riftbound content is available on americas, asia, and europe regions.
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * import { riftboundContentV1 } from '@wardbox/whisper/riftbound';
59
+ *
60
+ * const content = await riftboundContentV1.getContent(client, 'americas');
61
+ * console.log(content.version, content.sets.length);
62
+ * ```
63
+ */
64
+ declare const riftboundContentV1: {
65
+ /**
66
+ * Get all game content for Riftbound.
67
+ *
68
+ * Returns the full content catalog including card sets, cards, and version info.
69
+ * Optionally specify a locale for localized content.
70
+ *
71
+ * @param client - WhisperClient instance
72
+ * @param route - Regional routing value (e.g., 'americas', 'asia', 'europe')
73
+ * @param options - Optional parameters
74
+ * @param options.locale - Locale for content (e.g., 'en_US', 'ko_KR'). Defaults to 'en' on Riot's side if omitted.
75
+ * @returns Full Riftbound content data with card sets
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * const content = await riftboundContentV1.getContent(client, 'americas');
80
+ * for (const set of content.sets) {
81
+ * console.log(`${set.name}: ${set.cards.length} cards`);
82
+ * }
83
+ * ```
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * // Get localized content
88
+ * const content = await riftboundContentV1.getContent(client, 'asia', { locale: 'ko_KR' });
89
+ * ```
90
+ */
91
+ readonly getContent: (client: WhisperClient, route: RegionalRoute, options?: {
92
+ locale?: string;
93
+ }) => Promise<RiftboundContent>;
94
+ };
95
+ //#endregion
96
+ export { type RiftboundContent, riftboundContentV1 };
97
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/types/generated/riftbound.ts","../../src/riftbound/riftbound-content-v1.ts"],"mappings":";;;;;;;;UA+DiB,gBAAA;;EAEf,IAAA;;EAEA,WAAA;;EAEA,IAAA;IAAkC,KAAA;MAAyC,GAAA;QAA0B,MAAA;QAAiD,OAAA;QAA4C,YAAA;MAAA;MAAoE,eAAA;MAAsD,WAAA;MAAyC,OAAA;MAAoC,UAAA;MAAkD,EAAA;MAAqC,QAAA;MAAqC,IAAA;MAAsC,MAAA;MAAsC,GAAA;MAA6C,KAAA;QAAmC,IAAA;QAAiC,MAAA;QAAkC,KAAA;QAAiC,KAAA;MAAA;MAAwC,IAAA;MAAiC,IAAA;IAAA;IAAyD,EAAA;IAA4B,IAAA;EAAA;;EAEn6B,OAAA;AAAA;;;AARF;;;;;;;;;;;;;;;;AAAA,cC3Ca,kBAAA;EDiDqd;;;;;;;;;;;;;;;;;;;ACjDle;;;;;;;EDiDke,8BCrBtd,aAAA,EAAa,KAAA,EACd,aAAA,EAAa,OAAA;IACR,MAAA;EAAA,MACX,OAAA,CAAQ,gBAAA;AAAA"}
@@ -0,0 +1,97 @@
1
+ import { p as RegionalRoute, t as WhisperClient } from "../client-Xu0AwrUw.js";
2
+
3
+ //#region src/types/generated/riftbound.d.ts
4
+ /**
5
+ * Riftbound content data including all card sets and metadata.
6
+ *
7
+ * Contains the full game content catalog with versioning information.
8
+ */
9
+ interface RiftboundContent {
10
+ /** Game identifier */
11
+ game: string;
12
+ /** ISO timestamp of last content update */
13
+ lastUpdated: string;
14
+ /** Array of card sets, each containing its cards */
15
+ sets: ({
16
+ cards: ({
17
+ art: {
18
+ artist: string; /** Full-resolution image URL */
19
+ fullURL: string; /** Thumbnail image URL */
20
+ thumbnailURL: string;
21
+ }; /** Card collector number within its set */
22
+ collectorNumber: number; /** Card description text */
23
+ description: string; /** Card faction */
24
+ faction: string; /** Flavor text */
25
+ flavorText: string; /** Unique card identifier */
26
+ id: string; /** Keyword abilities */
27
+ keywords: string[]; /** Card name */
28
+ name: string; /** Card rarity tier */
29
+ rarity: string; /** Set identifier */
30
+ set: string; /** Card gameplay statistics */
31
+ stats: {
32
+ cost: number; /** Energy stat */
33
+ energy: number; /** Might stat */
34
+ might: number; /** Power stat */
35
+ power: number;
36
+ }; /** Searchable tags */
37
+ tags: string[]; /** Card type */
38
+ type: 'CHAMPION' | 'ACCOUNT';
39
+ })[]; /** Set identifier */
40
+ id: string; /** Set name */
41
+ name: string;
42
+ })[];
43
+ /** Content version string */
44
+ version: string;
45
+ }
46
+ //#endregion
47
+ //#region src/riftbound/riftbound-content-v1.d.ts
48
+ /**
49
+ * Riftbound Content API (v1).
50
+ *
51
+ * Retrieve game content including card sets and card data for Riftbound.
52
+ *
53
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
54
+ * Riftbound content is available on americas, asia, and europe regions.
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * import { riftboundContentV1 } from '@wardbox/whisper/riftbound';
59
+ *
60
+ * const content = await riftboundContentV1.getContent(client, 'americas');
61
+ * console.log(content.version, content.sets.length);
62
+ * ```
63
+ */
64
+ declare const riftboundContentV1: {
65
+ /**
66
+ * Get all game content for Riftbound.
67
+ *
68
+ * Returns the full content catalog including card sets, cards, and version info.
69
+ * Optionally specify a locale for localized content.
70
+ *
71
+ * @param client - WhisperClient instance
72
+ * @param route - Regional routing value (e.g., 'americas', 'asia', 'europe')
73
+ * @param options - Optional parameters
74
+ * @param options.locale - Locale for content (e.g., 'en_US', 'ko_KR'). Defaults to 'en' on Riot's side if omitted.
75
+ * @returns Full Riftbound content data with card sets
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * const content = await riftboundContentV1.getContent(client, 'americas');
80
+ * for (const set of content.sets) {
81
+ * console.log(`${set.name}: ${set.cards.length} cards`);
82
+ * }
83
+ * ```
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * // Get localized content
88
+ * const content = await riftboundContentV1.getContent(client, 'asia', { locale: 'ko_KR' });
89
+ * ```
90
+ */
91
+ readonly getContent: (client: WhisperClient, route: RegionalRoute, options?: {
92
+ locale?: string;
93
+ }) => Promise<RiftboundContent>;
94
+ };
95
+ //#endregion
96
+ export { type RiftboundContent, riftboundContentV1 };
97
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/types/generated/riftbound.ts","../../src/riftbound/riftbound-content-v1.ts"],"mappings":";;;;;;;;UA+DiB,gBAAA;;EAEf,IAAA;;EAEA,WAAA;;EAEA,IAAA;IAAkC,KAAA;MAAyC,GAAA;QAA0B,MAAA;QAAiD,OAAA;QAA4C,YAAA;MAAA;MAAoE,eAAA;MAAsD,WAAA;MAAyC,OAAA;MAAoC,UAAA;MAAkD,EAAA;MAAqC,QAAA;MAAqC,IAAA;MAAsC,MAAA;MAAsC,GAAA;MAA6C,KAAA;QAAmC,IAAA;QAAiC,MAAA;QAAkC,KAAA;QAAiC,KAAA;MAAA;MAAwC,IAAA;MAAiC,IAAA;IAAA;IAAyD,EAAA;IAA4B,IAAA;EAAA;;EAEn6B,OAAA;AAAA;;;AARF;;;;;;;;;;;;;;;;AAAA,cC3Ca,kBAAA;EDiDqd;;;;;;;;;;;;;;;;;;;ACjDle;;;;;;;EDiDke,8BCrBtd,aAAA,EAAa,KAAA,EACd,aAAA,EAAa,OAAA;IACR,MAAA;EAAA,MACX,OAAA,CAAQ,gBAAA;AAAA"}
@@ -0,0 +1,26 @@
1
+ //#region src/riftbound/riftbound-content-v1.ts
2
+ /**
3
+ * Riftbound Content API (v1).
4
+ *
5
+ * Retrieve game content including card sets and card data for Riftbound.
6
+ *
7
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
8
+ * Riftbound content is available on americas, asia, and europe regions.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { riftboundContentV1 } from '@wardbox/whisper/riftbound';
13
+ *
14
+ * const content = await riftboundContentV1.getContent(client, 'americas');
15
+ * console.log(content.version, content.sets.length);
16
+ * ```
17
+ */
18
+ const riftboundContentV1 = { async getContent(client, route, options) {
19
+ const params = {};
20
+ if (options?.locale !== void 0) params.locale = options.locale;
21
+ return (await client.request(route, "/riftbound/content/v1/contents", "riftbound-content-v1.getContent", Object.keys(params).length > 0 ? { params } : void 0)).data;
22
+ } };
23
+ //#endregion
24
+ export { riftboundContentV1 };
25
+
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,31 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/riot/account-v1.ts
3
+ /**
4
+ * Riot Account API (v1).
5
+ *
6
+ * Shared across all Riot games. Look up accounts by PUUID or Riot ID,
7
+ * or query which shard a player is active on for a given game.
8
+ *
9
+ * All methods require a {@link RegionalRoute} (americas, europe, asia, sea).
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * import { accountV1 } from '@wardbox/whisper/riot';
14
+ *
15
+ * const account = await accountV1.getByRiotId(client, 'americas', 'PlayerName', 'NA1');
16
+ * console.log(account.puuid);
17
+ * ```
18
+ */
19
+ const accountV1 = {
20
+ async getByPuuid(client, route, puuid) {
21
+ return (await client.request(route, `/riot/account/v1/accounts/by-puuid/${encodeURIComponent(puuid)}`, "account-v1.getByPuuid")).data;
22
+ },
23
+ async getByRiotId(client, route, gameName, tagLine) {
24
+ return (await client.request(route, `/riot/account/v1/accounts/by-riot-id/${encodeURIComponent(gameName)}/${encodeURIComponent(tagLine)}`, "account-v1.getByRiotId")).data;
25
+ },
26
+ async getByGame(client, route, game, puuid) {
27
+ return (await client.request(route, `/riot/account/v1/active-shards/by-game/${encodeURIComponent(game)}/by-puuid/${encodeURIComponent(puuid)}`, "account-v1.getByGame")).data;
28
+ }
29
+ };
30
+ //#endregion
31
+ exports.accountV1 = accountV1;