1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { z } from "zod";
// Ping a list of URLs and report up/down + response time. Keyless.
export const UptimeConfig = z.object({
urls: z.array(z.string()).default([]),
});
export type UptimeConfig = z.infer<typeof UptimeConfig>;
export const UptimeSite = z.object({
url: z.string(),
ok: z.boolean(),
status: z.number().nullable(),
ms: z.number().nullable(),
});
export const UptimePayload = z.object({
sites: z.array(UptimeSite).default([]),
});
export type UptimePayload = z.infer<typeof UptimePayload>;
|