my own status page
at main 70 lines 1.4 kB view raw
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 triage_url: string | null; 21 services: Service[]; 22} 23 24export type ServicesManifest = Record<string, Machine>; 25 26export interface UptimeResponse { 27 service_id: string; 28 window_hours: number; 29 buckets: { 30 timestamp: number; 31 status: "up" | "degraded" | "down"; 32 }[]; 33} 34 35export interface Incident { 36 id: number; 37 service_id: string; 38 title: string; 39 status: "investigating" | "identified" | "resolved"; 40 severity: "critical" | "major" | "minor"; 41 triage_report: string | null; 42 github_repo: string | null; 43 github_issue_number: number | null; 44 started_at: number; 45 resolved_at: number | null; 46 created_at: number; 47 updated_at: number; 48} 49 50export interface IncidentUpdate { 51 id: number; 52 incident_id: number; 53 status: string; 54 message: string; 55 created_at: number; 56} 57 58export interface IncidentWithUpdates extends Incident { 59 updates: IncidentUpdate[]; 60} 61 62export interface Env { 63 DB: D1Database; 64 KV: KVNamespace; 65 TAILSCALE_API_KEY?: string; 66 TRIAGE_AUTH_TOKEN?: string; 67 GITHUB_TOKEN?: string; 68 GITHUB_ASSIGN_TOKEN?: string; 69 GITHUB_ASSIGNEE?: string; 70}