my own status page
1export interface Service {
2 name: string;
3 description: string;
4 domain: string;
5 health_url: string | null;
6 port: number;
7 repository: string | null;
8 runtime: string;
9 data: {
10 files: string[];
11 postgres: string | null;
12 sqlite: string | null;
13 };
14}
15
16export interface Machine {
17 hostname: string;
18 tailscale_host: string;
19 type: "server" | "client";
20 services: Service[];
21}
22
23export type ServicesManifest = Record<string, Machine>;
24
25export interface UptimeResponse {
26 service_id: string;
27 window_hours: number;
28 buckets: {
29 timestamp: number;
30 status: "up" | "degraded" | "down";
31 }[];
32}
33
34export interface Incident {
35 id: number;
36 service_id: string;
37 title: string;
38 status: "investigating" | "identified" | "resolved";
39 severity: "critical" | "major" | "minor";
40 github_repo: string | null;
41 github_issue_number: number | null;
42 started_at: number;
43 resolved_at: number | null;
44 created_at: number;
45 updated_at: number;
46}
47
48export interface IncidentUpdate {
49 id: number;
50 incident_id: number;
51 status: string;
52 message: string;
53 created_at: number;
54}
55
56export interface IncidentWithUpdates extends Incident {
57 updates: IncidentUpdate[];
58}
59
60export interface Env {
61 DB: D1Database;
62 KV: KVNamespace;
63 TAILSCALE_API_KEY?: string;
64 GITHUB_TOKEN?: string;
65 GITHUB_ASSIGN_TOKEN?: string;
66 GITHUB_ASSIGNEE?: string;
67}