-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
41 lines (37 loc) · 837 Bytes
/
index.ts
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
import type { Metric, Stats, Website } from '../services/umami';
export type ConfigurationMetric = 'url' | 'referrer' | 'browser' | 'os' | 'device' | 'country' | 'event';
export type Configuration = {
auth: {
username?: string;
password?: string;
token?: string;
};
endpoint: string;
exclude?: string[];
include?: string[];
period?: number;
metrics?: Array<ConfigurationMetric>;
output: {
file?: {
path: string;
output?: 'text' | 'json';
};
telegram?: {
token: string;
chatId: string;
};
webhook?: {
url: string;
output?: 'text' | 'json';
};
};
};
export type AugmentedConfiguration = Configuration & {
start: Date;
end: Date;
};
export type WebsiteData = {
website: Website;
stats: Stats;
metrics: Record<string, Array<Metric>>;
};