service outages and use nws api

This commit is contained in:
Nicholas Orlowsky 2022-10-22 16:21:03 -05:00
parent 025e993700
commit 22129d5268
No known key found for this signature in database
GPG key ID: 3845F78A73B14100
5 changed files with 126 additions and 60 deletions

34
src/nws-api/types.ts Normal file
View file

@ -0,0 +1,34 @@
export type UptimeRecord = {
name: string,
url: string,
uptimeMonth: number,
uptimeAllTime: number,
isUp: boolean,
undergoingMaintenance: boolean
};
export type UptimeResponse = {
datacenters: UptimeRecord[],
services: UptimeRecord[]
};
export type Blog = {
id: number,
title: string,
author: string,
content: string,
imageUrl: string
};
export type Incident = {
id: number,
severity: IncidentSeverity,
title: string,
description: string
};
enum IncidentSeverity {
LOW,
MEDIUM,
HIGH
};