hive-bedrock-api 2.1.0 → 2.1.2
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.
|
@@ -100,10 +100,12 @@ function getAllTimeStatistics(identifier, game_or_options, options) {
|
|
|
100
100
|
response_data_1 = Object.entries(response.data);
|
|
101
101
|
processed_data_1 = Object.fromEntries(response_data_1.map(function (_a) {
|
|
102
102
|
var _b = __read(_a, 2), id = _b[0], statistics = _b[1];
|
|
103
|
-
if (!statistics || !(0, isGame_1.default)(id) || Array.isArray(statistics))
|
|
104
|
-
return [id, null];
|
|
105
103
|
if (id === "main")
|
|
106
104
|
return ["player", (0, processors_1.PlayerProcessor)(statistics)];
|
|
105
|
+
if (!statistics ||
|
|
106
|
+
!(0, isGame_1.default)(id) ||
|
|
107
|
+
Array.isArray(statistics))
|
|
108
|
+
return [id, null];
|
|
107
109
|
return [
|
|
108
110
|
id,
|
|
109
111
|
typeof processors_1.AllTimeProcessors[id] === "function"
|
package/lib/types/output.d.ts
CHANGED
|
@@ -34,7 +34,12 @@ export interface AllTimeProcessedStatistics {
|
|
|
34
34
|
[Game.TreasureWars]: Processed_TreasureWars_AllTimeStatistics;
|
|
35
35
|
[Game.ParkourWorlds]: Processed_ParkourWorlds_AllTimeStatistics;
|
|
36
36
|
}
|
|
37
|
-
export type AllTimeProcessedLeaderboard<G extends Game> = AllTimeProcessedStatistics[G]
|
|
37
|
+
export type AllTimeProcessedLeaderboard<G extends Game> = (AllTimeProcessedStatistics[G] & {
|
|
38
|
+
index: number;
|
|
39
|
+
human_index: number;
|
|
40
|
+
username: string;
|
|
41
|
+
UUID: string;
|
|
42
|
+
})[];
|
|
38
43
|
export interface MonthlyProcessedStatistics {
|
|
39
44
|
[Game.BedWars]: Processed_BedWars_MonthlyStatistics;
|
|
40
45
|
[Game.BlockDrop]: Processed_BlockDrop_MonthlyStatistics;
|
|
@@ -52,4 +57,6 @@ export interface MonthlyProcessedStatistics {
|
|
|
52
57
|
[Game.TreasureWars]: Processed_TreasureWars_MonthlyStatistics;
|
|
53
58
|
[Game.ParkourWorlds]: never;
|
|
54
59
|
}
|
|
55
|
-
export type MonthlyProcessedLeaderboard<G extends Game> = MonthlyProcessedStatistics[G]
|
|
60
|
+
export type MonthlyProcessedLeaderboard<G extends Game> = (MonthlyProcessedStatistics[G] & {
|
|
61
|
+
UUID: string;
|
|
62
|
+
})[];
|