@yaelouuu/fortnite-api 7.2.0 → 8.1.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/README.md +25 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +2 -0
- package/dist/resources/map.d.ts +17 -7
- package/dist/resources/map.js +25 -8
- package/dist/resources/parsing.d.ts +0 -32
- package/dist/resources/parsing.js +0 -67
- package/dist/resources/replays.d.ts +2 -4
- package/dist/resources/replays.js +2 -4
- package/dist/resources/sprites.d.ts +29 -0
- package/dist/resources/sprites.js +42 -0
- package/dist/types/index.d.ts +138 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -446,6 +446,31 @@ const history = await client.map.getHistory();
|
|
|
446
446
|
|
|
447
447
|
---
|
|
448
448
|
|
|
449
|
+
### Sprites - **NEW**
|
|
450
|
+
|
|
451
|
+
Seasonal Sprites catalog (Chapter 7 Season 3 extraction mechanic) — every sprite family and variant with rarity, icons, boons, and **live drop rates**. Drop weights include Epic's live hotfix overlay, so Power-Hour / "More Gem Sprites!" rotations show up without waiting for a game update.
|
|
452
|
+
|
|
453
|
+
```typescript
|
|
454
|
+
// Get the full catalog (families, variants, drop rates, level-up curve, event weight sets)
|
|
455
|
+
const catalog = await client.sprites.getSprites();
|
|
456
|
+
// catalog.data.sprites[0].variants[1].dropChancePercent -> e.g. 2 (% within the family)
|
|
457
|
+
|
|
458
|
+
// Only Gold variants across all families
|
|
459
|
+
const gold = await client.sprites.getSprites({ variant: "gold" });
|
|
460
|
+
|
|
461
|
+
// Search by name, filter by rarity
|
|
462
|
+
const ducks = await client.sprites.getSprites({ search: "duck" });
|
|
463
|
+
const legendaries = await client.sprites.getSprites({ rarity: "legendary" });
|
|
464
|
+
|
|
465
|
+
// One family — by family id, variant id, or display name
|
|
466
|
+
const duck = await client.sprites.getSprite("DuckSprite");
|
|
467
|
+
|
|
468
|
+
// All SpriteBoons perks with names and descriptions
|
|
469
|
+
const boons = await client.sprites.getBoons();
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
449
474
|
### Playlists - **NEW**
|
|
450
475
|
|
|
451
476
|
Fortnite playlists and game modes.
|
package/dist/client.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { CosmeticsResource } from "./resources/cosmetics";
|
|
|
19
19
|
import { CrewResource } from "./resources/crew";
|
|
20
20
|
import { MapResource } from "./resources/map";
|
|
21
21
|
import { PlaylistsResource } from "./resources/playlists";
|
|
22
|
+
import { SpritesResource } from "./resources/sprites";
|
|
22
23
|
export interface ClientOptions {
|
|
23
24
|
apiKey: string;
|
|
24
25
|
baseUrl?: string;
|
|
@@ -47,6 +48,7 @@ export declare class FortniteAPI {
|
|
|
47
48
|
crew: CrewResource;
|
|
48
49
|
map: MapResource;
|
|
49
50
|
playlists: PlaylistsResource;
|
|
51
|
+
sprites: SpritesResource;
|
|
50
52
|
constructor(options: ClientOptions);
|
|
51
53
|
/**
|
|
52
54
|
* Internal method to make HTTP requests
|
package/dist/client.js
CHANGED
|
@@ -23,6 +23,7 @@ const cosmetics_1 = require("./resources/cosmetics");
|
|
|
23
23
|
const crew_1 = require("./resources/crew");
|
|
24
24
|
const map_1 = require("./resources/map");
|
|
25
25
|
const playlists_1 = require("./resources/playlists");
|
|
26
|
+
const sprites_1 = require("./resources/sprites");
|
|
26
27
|
class FortniteAPI {
|
|
27
28
|
constructor(options) {
|
|
28
29
|
this.apiKey = options.apiKey;
|
|
@@ -50,6 +51,7 @@ class FortniteAPI {
|
|
|
50
51
|
this.crew = new crew_1.CrewResource(this);
|
|
51
52
|
this.map = new map_1.MapResource(this);
|
|
52
53
|
this.playlists = new playlists_1.PlaylistsResource(this);
|
|
54
|
+
this.sprites = new sprites_1.SpritesResource(this);
|
|
53
55
|
}
|
|
54
56
|
/**
|
|
55
57
|
* Internal method to make HTTP requests
|
package/dist/resources/map.d.ts
CHANGED
|
@@ -4,16 +4,26 @@ export declare class MapResource {
|
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: FortniteAPI);
|
|
6
6
|
/**
|
|
7
|
-
* Get
|
|
8
|
-
* @param version -
|
|
9
|
-
* @param
|
|
7
|
+
* Get a Fortnite map with its POIs and minimap metadata.
|
|
8
|
+
* @param version - Map version (patch number); defaults to the current version.
|
|
9
|
+
* @param mode - Which map to return: `br` (default), `og`, or `rotating:<codename>`.
|
|
10
|
+
* The available values are listed in the response's `data.modes`.
|
|
11
|
+
* @param lang - Language code for POI labels (default: `en`).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const br = await client.map.getCurrent();
|
|
15
|
+
* const og = await client.map.getCurrent(undefined, "og");
|
|
16
|
+
* const reload = await client.map.getCurrent(undefined, "rotating:blastberry");
|
|
17
|
+
* const old = await client.map.getCurrent("33.00");
|
|
10
18
|
*/
|
|
11
|
-
getCurrent(version?: string, lang?: string): Promise<MapResponse>;
|
|
19
|
+
getCurrent(version?: string, mode?: string, lang?: string): Promise<MapResponse>;
|
|
12
20
|
/**
|
|
13
|
-
* Get
|
|
14
|
-
*
|
|
21
|
+
* Get the map image (302 redirect to the raw image).
|
|
22
|
+
* Prefer reading `getCurrent().data.imageUrl`, which is the direct URL.
|
|
23
|
+
* @param version - Map version; defaults to current.
|
|
24
|
+
* @param mode - Which image: `br` (default), `og`, or `rotating:<codename>`.
|
|
15
25
|
*/
|
|
16
|
-
getImage(version?: string): Promise<MapImageResponse>;
|
|
26
|
+
getImage(version?: string, mode?: string): Promise<MapImageResponse>;
|
|
17
27
|
/**
|
|
18
28
|
* Get historical map data
|
|
19
29
|
* @param options.chapter - Filter by chapter number
|
package/dist/resources/map.js
CHANGED
|
@@ -6,25 +6,42 @@ class MapResource {
|
|
|
6
6
|
this.client = client;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Get
|
|
10
|
-
* @param version -
|
|
11
|
-
* @param
|
|
9
|
+
* Get a Fortnite map with its POIs and minimap metadata.
|
|
10
|
+
* @param version - Map version (patch number); defaults to the current version.
|
|
11
|
+
* @param mode - Which map to return: `br` (default), `og`, or `rotating:<codename>`.
|
|
12
|
+
* The available values are listed in the response's `data.modes`.
|
|
13
|
+
* @param lang - Language code for POI labels (default: `en`).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const br = await client.map.getCurrent();
|
|
17
|
+
* const og = await client.map.getCurrent(undefined, "og");
|
|
18
|
+
* const reload = await client.map.getCurrent(undefined, "rotating:blastberry");
|
|
19
|
+
* const old = await client.map.getCurrent("33.00");
|
|
12
20
|
*/
|
|
13
|
-
async getCurrent(version, lang) {
|
|
21
|
+
async getCurrent(version, mode, lang) {
|
|
14
22
|
const params = new URLSearchParams();
|
|
15
23
|
if (version)
|
|
16
24
|
params.set("version", version);
|
|
25
|
+
if (mode)
|
|
26
|
+
params.set("mode", mode);
|
|
17
27
|
if (lang)
|
|
18
28
|
params.set("lang", lang);
|
|
19
29
|
const query = params.toString() ? `?${params.toString()}` : "";
|
|
20
30
|
return this.client.request(`/map${query}`);
|
|
21
31
|
}
|
|
22
32
|
/**
|
|
23
|
-
* Get
|
|
24
|
-
*
|
|
33
|
+
* Get the map image (302 redirect to the raw image).
|
|
34
|
+
* Prefer reading `getCurrent().data.imageUrl`, which is the direct URL.
|
|
35
|
+
* @param version - Map version; defaults to current.
|
|
36
|
+
* @param mode - Which image: `br` (default), `og`, or `rotating:<codename>`.
|
|
25
37
|
*/
|
|
26
|
-
async getImage(version) {
|
|
27
|
-
const
|
|
38
|
+
async getImage(version, mode) {
|
|
39
|
+
const params = new URLSearchParams();
|
|
40
|
+
if (version)
|
|
41
|
+
params.set("version", version);
|
|
42
|
+
if (mode)
|
|
43
|
+
params.set("mode", mode);
|
|
44
|
+
const query = params.toString() ? `?${params.toString()}` : "";
|
|
28
45
|
return this.client.request(`/map/image${query}`);
|
|
29
46
|
}
|
|
30
47
|
/**
|
|
@@ -4,7 +4,6 @@ export declare class ParsingResource {
|
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: FortniteAPI);
|
|
6
6
|
private buildFormData;
|
|
7
|
-
private buildMultiFormData;
|
|
8
7
|
/**
|
|
9
8
|
* Parse a single Fortnite replay file — full parse.
|
|
10
9
|
* Subject to per-plan parsing quota limits (5 credits).
|
|
@@ -69,35 +68,4 @@ export declare class ParsingResource {
|
|
|
69
68
|
* @param filename - Filename (required in Node.js)
|
|
70
69
|
*/
|
|
71
70
|
parseReplayBroadcast(file: File | Blob, filename?: string): Promise<ParsedReplayData>;
|
|
72
|
-
/**
|
|
73
|
-
* Parse multiple replay files in batch — full parse.
|
|
74
|
-
* All files are processed in parallel.
|
|
75
|
-
* Subject to per-plan parsing quota limits (10 credits).
|
|
76
|
-
* @param files - Array of File objects or Blobs
|
|
77
|
-
* @param filenames - Filenames (required in Node.js when passing Blobs)
|
|
78
|
-
*/
|
|
79
|
-
parseMultipleReplays(files: (File | Blob)[], filenames?: string[]): Promise<ParsedReplayData[]>;
|
|
80
|
-
/**
|
|
81
|
-
* Parse multiple replay files — stats only.
|
|
82
|
-
* Faster than full parse — skips movement, zones, and kill feed.
|
|
83
|
-
* Subject to per-plan parsing quota limits (5 credits).
|
|
84
|
-
* @param files - Array of File objects or Blobs
|
|
85
|
-
* @param filenames - Filenames (required in Node.js)
|
|
86
|
-
*/
|
|
87
|
-
parseMultipleReplaysStats(files: (File | Blob)[], filenames?: string[]): Promise<ParsedReplayData[]>;
|
|
88
|
-
/**
|
|
89
|
-
* Parse multiple replay files — map context for each.
|
|
90
|
-
* Returns bus path, storm circles, supply drops, llamas, reboot vans per file.
|
|
91
|
-
* Subject to per-plan parsing quota limits (10 credits).
|
|
92
|
-
* @param files - Array of File objects or Blobs
|
|
93
|
-
* @param filenames - Filenames (required in Node.js)
|
|
94
|
-
*/
|
|
95
|
-
parseMultipleReplaysMap(files: (File | Blob)[], filenames?: string[]): Promise<ParsedReplayData[]>;
|
|
96
|
-
/**
|
|
97
|
-
* Parse multiple replay files — ground loot data for each.
|
|
98
|
-
* Subject to per-plan parsing quota limits (10 credits).
|
|
99
|
-
* @param files - Array of File objects or Blobs
|
|
100
|
-
* @param filenames - Filenames (required in Node.js)
|
|
101
|
-
*/
|
|
102
|
-
parseMultipleReplaysLoot(files: (File | Blob)[], filenames?: string[]): Promise<ParsedReplayData[]>;
|
|
103
71
|
}
|
|
@@ -15,18 +15,6 @@ class ParsingResource {
|
|
|
15
15
|
}
|
|
16
16
|
return formData;
|
|
17
17
|
}
|
|
18
|
-
buildMultiFormData(files, filenames) {
|
|
19
|
-
const formData = new FormData();
|
|
20
|
-
files.forEach((file, index) => {
|
|
21
|
-
if (file instanceof File) {
|
|
22
|
-
formData.append("files", file);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
formData.append("files", file, filenames?.[index] || `replay-${index}.replay`);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return formData;
|
|
29
|
-
}
|
|
30
18
|
/**
|
|
31
19
|
* Parse a single Fortnite replay file — full parse.
|
|
32
20
|
* Subject to per-plan parsing quota limits (5 credits).
|
|
@@ -139,60 +127,5 @@ class ParsingResource {
|
|
|
139
127
|
}
|
|
140
128
|
return response.data;
|
|
141
129
|
}
|
|
142
|
-
/**
|
|
143
|
-
* Parse multiple replay files in batch — full parse.
|
|
144
|
-
* All files are processed in parallel.
|
|
145
|
-
* Subject to per-plan parsing quota limits (10 credits).
|
|
146
|
-
* @param files - Array of File objects or Blobs
|
|
147
|
-
* @param filenames - Filenames (required in Node.js when passing Blobs)
|
|
148
|
-
*/
|
|
149
|
-
async parseMultipleReplays(files, filenames) {
|
|
150
|
-
const response = await this.client.requestMultipart("/parsing/multiple", this.buildMultiFormData(files, filenames));
|
|
151
|
-
if (!response.success || !response.results) {
|
|
152
|
-
throw new Error(response.error || "Failed to parse replays");
|
|
153
|
-
}
|
|
154
|
-
return response.results;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Parse multiple replay files — stats only.
|
|
158
|
-
* Faster than full parse — skips movement, zones, and kill feed.
|
|
159
|
-
* Subject to per-plan parsing quota limits (5 credits).
|
|
160
|
-
* @param files - Array of File objects or Blobs
|
|
161
|
-
* @param filenames - Filenames (required in Node.js)
|
|
162
|
-
*/
|
|
163
|
-
async parseMultipleReplaysStats(files, filenames) {
|
|
164
|
-
const response = await this.client.requestMultipart("/parsing/multiple/stats", this.buildMultiFormData(files, filenames));
|
|
165
|
-
if (!response.success || !response.results) {
|
|
166
|
-
throw new Error(response.error || "Failed to parse replays stats");
|
|
167
|
-
}
|
|
168
|
-
return response.results;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Parse multiple replay files — map context for each.
|
|
172
|
-
* Returns bus path, storm circles, supply drops, llamas, reboot vans per file.
|
|
173
|
-
* Subject to per-plan parsing quota limits (10 credits).
|
|
174
|
-
* @param files - Array of File objects or Blobs
|
|
175
|
-
* @param filenames - Filenames (required in Node.js)
|
|
176
|
-
*/
|
|
177
|
-
async parseMultipleReplaysMap(files, filenames) {
|
|
178
|
-
const response = await this.client.requestMultipart("/parsing/multiple/map", this.buildMultiFormData(files, filenames));
|
|
179
|
-
if (!response.success || !response.results) {
|
|
180
|
-
throw new Error(response.error || "Failed to parse replays map");
|
|
181
|
-
}
|
|
182
|
-
return response.results;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Parse multiple replay files — ground loot data for each.
|
|
186
|
-
* Subject to per-plan parsing quota limits (10 credits).
|
|
187
|
-
* @param files - Array of File objects or Blobs
|
|
188
|
-
* @param filenames - Filenames (required in Node.js)
|
|
189
|
-
*/
|
|
190
|
-
async parseMultipleReplaysLoot(files, filenames) {
|
|
191
|
-
const response = await this.client.requestMultipart("/parsing/multiple/loot", this.buildMultiFormData(files, filenames));
|
|
192
|
-
if (!response.success || !response.results) {
|
|
193
|
-
throw new Error(response.error || "Failed to parse replays loot");
|
|
194
|
-
}
|
|
195
|
-
return response.results;
|
|
196
|
-
}
|
|
197
130
|
}
|
|
198
131
|
exports.ParsingResource = ParsingResource;
|
|
@@ -72,10 +72,8 @@ export declare class ReplaysResource {
|
|
|
72
72
|
*/
|
|
73
73
|
parseTimeline(matchId: string): Promise<ParsedReplayData>;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* Equivalent to calling all parse endpoints in one request.
|
|
78
|
-
* Subject to per-plan parsing quota limits (20 credits).
|
|
75
|
+
* @deprecated Use parse() instead. This compatibility route returns the
|
|
76
|
+
* same combined payload and shares parse()'s 5-credit quota.
|
|
79
77
|
* @param matchId - Match ID from Epic's tournament events API
|
|
80
78
|
*/
|
|
81
79
|
parseBroadcast(matchId: string): Promise<ParsedReplayData>;
|
|
@@ -92,10 +92,8 @@ class ReplaysResource {
|
|
|
92
92
|
return this.client.request(`/replays/${encodeURIComponent(matchId)}/parse/timeline`, {}, "v1");
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* Equivalent to calling all parse endpoints in one request.
|
|
98
|
-
* Subject to per-plan parsing quota limits (20 credits).
|
|
95
|
+
* @deprecated Use parse() instead. This compatibility route returns the
|
|
96
|
+
* same combined payload and shares parse()'s 5-credit quota.
|
|
99
97
|
* @param matchId - Match ID from Epic's tournament events API
|
|
100
98
|
*/
|
|
101
99
|
async parseBroadcast(matchId) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FortniteAPI } from "../client";
|
|
2
|
+
import { SpritesResponse, SpriteResponse, SpriteBoonsResponse } from "../types";
|
|
3
|
+
export declare class SpritesResource {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: FortniteAPI);
|
|
6
|
+
/**
|
|
7
|
+
* Get the full sprite catalog: families with nested variants, current + PAK-base
|
|
8
|
+
* drop weights, normalized drop chances, rarity, icons, boons, the level-up XP
|
|
9
|
+
* curve, and alternate event weight sets. Drop weights include Epic's live hotfix
|
|
10
|
+
* overlay, so Power-Hour / event rotations are reflected without a game update.
|
|
11
|
+
* @param options.search - Filter by sprite name or id (family or variant, contains match)
|
|
12
|
+
* @param options.rarity - Filter by rarity (e.g. epic, legendary)
|
|
13
|
+
* @param options.variant - Filter to one variant label across families (base, gold, candy, galaxy, gem, holofoil, cube)
|
|
14
|
+
*/
|
|
15
|
+
getSprites(options?: {
|
|
16
|
+
search?: string;
|
|
17
|
+
rarity?: string;
|
|
18
|
+
variant?: string;
|
|
19
|
+
}): Promise<SpritesResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Get a single sprite family by family id (e.g. "DuckSprite"), variant id
|
|
22
|
+
* (e.g. "DuckSprite_Variant_Gold"), or display name (e.g. "Duck Sprite").
|
|
23
|
+
*/
|
|
24
|
+
getSprite(id: string): Promise<SpriteResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Get all SpriteBoons perks with names and descriptions.
|
|
27
|
+
*/
|
|
28
|
+
getBoons(): Promise<SpriteBoonsResponse>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpritesResource = void 0;
|
|
4
|
+
class SpritesResource {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Get the full sprite catalog: families with nested variants, current + PAK-base
|
|
10
|
+
* drop weights, normalized drop chances, rarity, icons, boons, the level-up XP
|
|
11
|
+
* curve, and alternate event weight sets. Drop weights include Epic's live hotfix
|
|
12
|
+
* overlay, so Power-Hour / event rotations are reflected without a game update.
|
|
13
|
+
* @param options.search - Filter by sprite name or id (family or variant, contains match)
|
|
14
|
+
* @param options.rarity - Filter by rarity (e.g. epic, legendary)
|
|
15
|
+
* @param options.variant - Filter to one variant label across families (base, gold, candy, galaxy, gem, holofoil, cube)
|
|
16
|
+
*/
|
|
17
|
+
async getSprites(options) {
|
|
18
|
+
const params = new URLSearchParams();
|
|
19
|
+
if (options?.search)
|
|
20
|
+
params.set("search", options.search);
|
|
21
|
+
if (options?.rarity)
|
|
22
|
+
params.set("rarity", options.rarity);
|
|
23
|
+
if (options?.variant)
|
|
24
|
+
params.set("variant", options.variant);
|
|
25
|
+
const query = params.toString() ? `?${params.toString()}` : "";
|
|
26
|
+
return this.client.request(`/sprites${query}`, {}, "v2");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get a single sprite family by family id (e.g. "DuckSprite"), variant id
|
|
30
|
+
* (e.g. "DuckSprite_Variant_Gold"), or display name (e.g. "Duck Sprite").
|
|
31
|
+
*/
|
|
32
|
+
async getSprite(id) {
|
|
33
|
+
return this.client.request(`/sprites/${encodeURIComponent(id)}`, {}, "v2");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get all SpriteBoons perks with names and descriptions.
|
|
37
|
+
*/
|
|
38
|
+
async getBoons() {
|
|
39
|
+
return this.client.request("/sprites/boons", {}, "v2");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.SpritesResource = SpritesResource;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -900,23 +900,80 @@ export interface CrewHistoryResponse {
|
|
|
900
900
|
lastModified: string;
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
|
+
/** Game mode a map response describes. `br`, `og`, or `rotating:<codename>` (e.g. `rotating:blastberry`). */
|
|
904
|
+
export type MapMode = "br" | "og" | (string & {});
|
|
905
|
+
/**
|
|
906
|
+
* World-space extent of the minimap image, in Unreal units (cm). Combine with
|
|
907
|
+
* `imageWidth`/`imageHeight` to plot a POI onto the image:
|
|
908
|
+
* `px = (x - minX) / (maxX - minX) * imageWidth` (and likewise y/height).
|
|
909
|
+
*/
|
|
910
|
+
export interface MapWorldBounds {
|
|
911
|
+
minX: number;
|
|
912
|
+
maxX: number;
|
|
913
|
+
minY: number;
|
|
914
|
+
maxY: number;
|
|
915
|
+
}
|
|
916
|
+
/** A single point of interest on the map. */
|
|
917
|
+
export interface MapPoi {
|
|
918
|
+
/** Display name, e.g. "TILTED TOWERS". Empty string when the game ships the POI unnamed. */
|
|
919
|
+
name: string;
|
|
920
|
+
/** Source gameplay tag, e.g. `Athena.Location.POI.TiltedTowers`. Stable across patches. */
|
|
921
|
+
tag?: string | null;
|
|
922
|
+
/** `named`, `landmark`, `generic`, or `unnamed`. */
|
|
923
|
+
type?: "named" | "landmark" | "generic" | "unnamed" | (string & {}) | null;
|
|
924
|
+
/** World X (Unreal units / cm). */
|
|
925
|
+
x?: number | null;
|
|
926
|
+
/** World Y (Unreal units / cm). */
|
|
927
|
+
y?: number | null;
|
|
928
|
+
/** World Z (Unreal units / cm). */
|
|
929
|
+
z?: number | null;
|
|
930
|
+
}
|
|
931
|
+
/** Map data for one version + mode. */
|
|
932
|
+
export interface MapData {
|
|
933
|
+
version: string;
|
|
934
|
+
chapter?: number | null;
|
|
935
|
+
season?: number | null;
|
|
936
|
+
patch?: string | null;
|
|
937
|
+
releaseDate?: string | null;
|
|
938
|
+
/** Which map this response describes: `br`, `og`, or `rotating:<codename>`. */
|
|
939
|
+
mode: MapMode;
|
|
940
|
+
/** Direct URL to the minimap image (raw GitHub). Prefer this over `map.getImage()`. */
|
|
941
|
+
imageUrl?: string | null;
|
|
942
|
+
/** Minimap image pixel dimensions — pair with `worldBounds` to plot POIs. */
|
|
943
|
+
imageWidth?: number | null;
|
|
944
|
+
imageHeight?: number | null;
|
|
945
|
+
worldBounds?: MapWorldBounds | null;
|
|
946
|
+
pois: MapPoi[];
|
|
947
|
+
/** Every mode available for this version — valid values for the `mode` query parameter. */
|
|
948
|
+
modes: MapMode[];
|
|
949
|
+
}
|
|
903
950
|
export interface MapResponse {
|
|
904
951
|
status: number;
|
|
905
|
-
data:
|
|
906
|
-
[key: string]: any;
|
|
907
|
-
};
|
|
952
|
+
data: MapData;
|
|
908
953
|
}
|
|
954
|
+
/** `map.getImage()` hits a 302 redirect to the raw image. Prefer `getCurrent().data.imageUrl`. */
|
|
909
955
|
export interface MapImageResponse {
|
|
910
956
|
status: number;
|
|
911
957
|
data: {
|
|
912
958
|
[key: string]: any;
|
|
913
959
|
};
|
|
914
960
|
}
|
|
961
|
+
/** One entry in the map history list. */
|
|
962
|
+
export interface MapHistoryEntry {
|
|
963
|
+
version: string;
|
|
964
|
+
chapter?: number | null;
|
|
965
|
+
season?: number | null;
|
|
966
|
+
patch?: string | null;
|
|
967
|
+
releaseDate?: string | null;
|
|
968
|
+
hasImage: boolean;
|
|
969
|
+
imageUrl?: string | null;
|
|
970
|
+
hasPois: boolean;
|
|
971
|
+
/** Modes available for this version (`br`, `og`, `rotating:<codename>`). */
|
|
972
|
+
modes: MapMode[];
|
|
973
|
+
}
|
|
915
974
|
export interface MapHistoryResponse {
|
|
916
975
|
status: number;
|
|
917
|
-
data:
|
|
918
|
-
[key: string]: any;
|
|
919
|
-
};
|
|
976
|
+
data: MapHistoryEntry[];
|
|
920
977
|
}
|
|
921
978
|
export interface PlaylistsResponse {
|
|
922
979
|
status: number;
|
|
@@ -951,3 +1008,78 @@ export interface Playlist {
|
|
|
951
1008
|
lastModified?: string;
|
|
952
1009
|
[key: string]: any;
|
|
953
1010
|
}
|
|
1011
|
+
export interface SpriteImages {
|
|
1012
|
+
icon?: string | null;
|
|
1013
|
+
iconLarge?: string | null;
|
|
1014
|
+
}
|
|
1015
|
+
export interface SpriteBoonRef {
|
|
1016
|
+
id: string;
|
|
1017
|
+
chance?: number | null;
|
|
1018
|
+
}
|
|
1019
|
+
export interface SpriteVariant {
|
|
1020
|
+
id: string;
|
|
1021
|
+
/** Variant label: Base, Gold, Candy, Galaxy, Gem, Holofoil, Cube, ... */
|
|
1022
|
+
variant: string;
|
|
1023
|
+
name?: string | null;
|
|
1024
|
+
rarity?: string | null;
|
|
1025
|
+
/** False when the current hotfix disables the variant. */
|
|
1026
|
+
enabled: boolean;
|
|
1027
|
+
images?: SpriteImages | null;
|
|
1028
|
+
/** Weight as cooked in the game files (PAK). */
|
|
1029
|
+
baseWeight?: number | null;
|
|
1030
|
+
/** Weight after Epic's live hotfix overlay — what the game currently uses. */
|
|
1031
|
+
weight?: number | null;
|
|
1032
|
+
/** Current weight normalized within the family, percentage 0-100. */
|
|
1033
|
+
dropChancePercent?: number | null;
|
|
1034
|
+
boons: SpriteBoonRef[];
|
|
1035
|
+
}
|
|
1036
|
+
export interface SpriteFamily {
|
|
1037
|
+
id: string;
|
|
1038
|
+
name?: string | null;
|
|
1039
|
+
description?: string | null;
|
|
1040
|
+
/** Epic's own sprite-dex ordering number. */
|
|
1041
|
+
dexNumber?: number | null;
|
|
1042
|
+
rarity?: string | null;
|
|
1043
|
+
acquisitionHint?: string | null;
|
|
1044
|
+
extractRewardLootTier?: string | null;
|
|
1045
|
+
images?: SpriteImages | null;
|
|
1046
|
+
tags: string[];
|
|
1047
|
+
boons: SpriteBoonRef[];
|
|
1048
|
+
variants: SpriteVariant[];
|
|
1049
|
+
}
|
|
1050
|
+
export interface SpriteLevel {
|
|
1051
|
+
level: number;
|
|
1052
|
+
xp: number;
|
|
1053
|
+
}
|
|
1054
|
+
export interface SpriteEvent {
|
|
1055
|
+
name: string;
|
|
1056
|
+
weights: Record<string, number>;
|
|
1057
|
+
}
|
|
1058
|
+
export interface SpritesData {
|
|
1059
|
+
gameVersion: string;
|
|
1060
|
+
generated: string;
|
|
1061
|
+
/** True when the drop weights include the live CloudStorage hotfix overlay. */
|
|
1062
|
+
hotfixApplied: boolean;
|
|
1063
|
+
sprites: SpriteFamily[];
|
|
1064
|
+
/** Cumulative Sprite Dust thresholds per sprite level. */
|
|
1065
|
+
levelUpCurve: SpriteLevel[];
|
|
1066
|
+
/** Alternate weight sets from event hotfixes (Power Hours etc.). */
|
|
1067
|
+
events: SpriteEvent[];
|
|
1068
|
+
}
|
|
1069
|
+
export interface SpritesResponse {
|
|
1070
|
+
status: number;
|
|
1071
|
+
data: SpritesData;
|
|
1072
|
+
}
|
|
1073
|
+
export interface SpriteResponse {
|
|
1074
|
+
status: number;
|
|
1075
|
+
data: SpriteFamily;
|
|
1076
|
+
}
|
|
1077
|
+
export interface SpriteBoon {
|
|
1078
|
+
id: string;
|
|
1079
|
+
name?: string | null;
|
|
1080
|
+
description?: string | null;
|
|
1081
|
+
}
|
|
1082
|
+
export interface SpriteBoonsResponse {
|
|
1083
|
+
status: number;
|
|
1084
|
+
data: SpriteBoon[];
|
|
1085
|
+
}
|