aiden-shared-calculations-unified 1.0.150 → 1.0.151
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/calculations/alerts/Behaviour.js +3 -0
- package/calculations/popular-investor/AumLeaderboard.js +4 -4
- package/calculations/popular-investor/GlobalAumPerAsset30D.js +1 -0
- package/calculations/popular-investor/PIDailyAssetAUM.js +5 -0
- package/calculations/popular-investor/PiAnomalyDetector.js +1 -0
- package/calculations/popular-investor/PiAumOverTime.js +1 -0
- package/calculations/popular-investor/PiCryptoBuyers.js +1 -0
- package/calculations/popular-investor/RecommendedPopularInvestors.js +4 -0
- package/calculations/popular-investor/RiskLeaderboard.js +3 -1
- package/package.json +1 -1
|
@@ -6,10 +6,8 @@ class AumLeaderboard {
|
|
|
6
6
|
return {
|
|
7
7
|
type: 'meta',
|
|
8
8
|
category: 'analytics',
|
|
9
|
-
// We only need the rankings root data
|
|
10
9
|
rootDataDependencies: ['rankings'],
|
|
11
10
|
mandatoryRoots: ['rankings'],
|
|
12
|
-
// Daily schedule is standard for leaderboards
|
|
13
11
|
schedule: { type: 'DAILY' }
|
|
14
12
|
};
|
|
15
13
|
}
|
|
@@ -42,7 +40,6 @@ class AumLeaderboard {
|
|
|
42
40
|
return {
|
|
43
41
|
username: entry.UserName || entry.username || "Unknown",
|
|
44
42
|
cid: String(entry.CustomerId || entry.cid),
|
|
45
|
-
// Use Extractor for safety
|
|
46
43
|
aum: RankingsExtractor.getAUMValue(entry)
|
|
47
44
|
};
|
|
48
45
|
});
|
|
@@ -59,9 +56,12 @@ class AumLeaderboard {
|
|
|
59
56
|
// 4. Output Global Result
|
|
60
57
|
this.results = rankedResult;
|
|
61
58
|
|
|
62
|
-
//
|
|
59
|
+
// Critical: Return for MetaExecutor wrapping
|
|
63
60
|
return this.results;
|
|
64
61
|
}
|
|
62
|
+
|
|
63
|
+
// CRITICAL FIX: Interface required by ResultCommitter
|
|
64
|
+
async getResult() { return this.results; }
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
module.exports = AumLeaderboard;
|
|
@@ -166,7 +166,11 @@ class RecommendedPopularInvestors {
|
|
|
166
166
|
this.results = {
|
|
167
167
|
[context.user.id]: recommendations.slice(0, 5)
|
|
168
168
|
};
|
|
169
|
+
return this.results;
|
|
169
170
|
}
|
|
171
|
+
// CRITICAL FIX: Interface required by ResultCommitter
|
|
172
|
+
async getResult() { return this.results; }
|
|
173
|
+
|
|
170
174
|
}
|
|
171
175
|
|
|
172
176
|
module.exports = RecommendedPopularInvestors;
|
|
@@ -55,9 +55,11 @@ class RiskLeaderboard {
|
|
|
55
55
|
|
|
56
56
|
this.results = rankedResult;
|
|
57
57
|
|
|
58
|
-
// CRITICAL FIX: MetaExecutor requires the data to be returned
|
|
59
58
|
return this.results;
|
|
60
59
|
}
|
|
60
|
+
|
|
61
|
+
// CRITICAL FIX: Interface required by ResultCommitter
|
|
62
|
+
async getResult() { return this.results; }
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
module.exports = RiskLeaderboard;
|