generated from lyc8503/UptimeFlare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uptime.types.ts
48 lines (44 loc) · 1011 Bytes
/
uptime.types.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
42
43
44
45
46
47
48
type MonitorState = {
lastUpdate: number
overallUp: number
overallDown: number
incident: Record<
string,
{
start: number[]
end: number | undefined // undefined if it's still open
error: string[]
}[]
>
latency: Record<
string,
{
recent: {
loc: string
ping: number
time: number
}[] // recent 12 hour data, 2 min interval
all: {
loc: string
ping: number
time: number
}[] // all data in 90 days, 1 hour interval
}
>
}
type MonitorTarget = {
id: string
name: string
method: string // "TCP_PING" or Http Method (e.g. GET, POST, OPTIONS, etc.)
target: string // url for http, hostname:port for tcp
tooltip?: string
statusPageLink?: string
checkLocationWorkerRoute?: string
// HTTP Code
expectedCodes?: number[]
timeout?: number
headers?: Record<string, string | undefined>
body?: BodyInit
responseKeyword?: string
}
export type { MonitorState, MonitorTarget }