forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalytics.ts
More file actions
51 lines (44 loc) · 934 Bytes
/
Copy pathanalytics.ts
File metadata and controls
51 lines (44 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
export interface SpendingTrend {
period: string;
totalSpent: number;
transactionCount: number;
avgTransactionAmount: number;
}
export interface CategoryBreakdown {
category: string;
amount: number;
}
export interface TopPartner {
partnerId: string;
totalAmount: number;
interactions: number;
name?: string;
}
export interface DebtBalance {
userId: string;
name: string;
amount: number;
direction: "owe" | "owed";
}
export interface HeatmapCell {
date: string;
count: number;
total: number;
}
export interface DateRange {
dateFrom: string;
dateTo: string;
}
export interface TimeDistribution {
label: string;
count: number;
amount: number;
}
export interface AnalyticsData {
spendingTrends: SpendingTrend[];
categoryBreakdown: CategoryBreakdown[];
topPartners: TopPartner[];
debtBalances: DebtBalance[];
heatmapData: HeatmapCell[];
timeDistribution: TimeDistribution[];
}