-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
76 lines (70 loc) · 1.79 KB
/
Copy pathtypes.ts
File metadata and controls
76 lines (70 loc) · 1.79 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
export interface ContribDay {
date: string;
count: number;
level: 0 | 1 | 2 | 3 | 4;
}
export interface LanguageStat {
name: string;
count: number;
percentage: number;
color: string;
}
export interface RepoContribution {
name: string; // owner/repo
url: string;
contributions: number;
stars?: number;
language?: string | null;
}
export interface TopRepos {
// "all-time" = accurate commit counts via GraphQL (needs GITHUB_TOKEN).
// "recent" = approximation from the public Events API (~last 90 days).
source: "all-time" | "recent";
items: RepoContribution[];
}
export interface Rank {
title: string;
emoji: string;
level: number; // 1..7
score: number;
color: string;
blurb: string;
}
export interface FunFacts {
bestWeekday: string | null; // e.g. "Tuesday"
busiestMonth: string | null; // e.g. "November 2025"
}
export interface GithubStats {
user: {
login: string;
name: string | null;
avatarUrl: string;
bio: string | null;
htmlUrl: string;
company: string | null;
location: string | null;
blog: string | null;
followers: number;
following: number;
publicRepos: number;
publicGists: number;
createdAt: string;
};
contributions: {
total: number; // total contributions across all tracked history
days: ContribDay[]; // flat list, chronological
activeDays: number; // days with count > 0 ("green")
trackedDays: number; // total days in the calendar history
accountAgeDays: number; // days since account creation
longestStreak: number;
currentStreak: number;
busiestDay: ContribDay | null;
};
languages: LanguageStat[];
topRepos: TopRepos;
totalStars: number;
rank: Rank;
funFacts: FunFacts;
weekdayHistogram: number[]; // 7 values, Sun..Sat
generatedAt: string;
}