summaryrefslogtreecommitdiff
path: root/api/types.ts
diff options
context:
space:
mode:
authorJustZvan <justzvan@justzvan.xyz>2026-02-06 13:22:33 +0100
committerJustZvan <justzvan@justzvan.xyz>2026-02-06 13:22:33 +0100
commit7eb8ccae48b0cc18a9dcaa9c3626a02df8e6d919 (patch)
tree57b7dd06ac9aa7053c671d916f7183e3b4fa9410 /api/types.ts
feat: initial commit!
Diffstat (limited to 'api/types.ts')
-rw-r--r--api/types.ts53
1 files changed, 53 insertions, 0 deletions
diff --git a/api/types.ts b/api/types.ts
new file mode 100644
index 0000000..7338d4b
--- /dev/null
+++ b/api/types.ts
@@ -0,0 +1,53 @@
+export type OverallStatus = "all_clear" | "attention";
+
+export type AlertSeverity = "gentle" | "needs_attention";
+
+export type Alert = {
+ id: string;
+ title: string;
+ timeLabel: string;
+ whatHappened: string;
+ whyItMatters: string;
+ suggestedAction: string;
+ severity: AlertSeverity;
+};
+
+export type HomeData = {
+ overallStatus: OverallStatus;
+ deviceOnline: boolean;
+ alertStats: {
+ last24Hours: number;
+ thisWeekReviewed: number;
+ };
+};
+
+export type ActivityMetric = {
+ id: string;
+ icon: "chatbubbles" | "people" | "time";
+ title: string;
+ description: string;
+ level: "Normal" | "Low" | "High" | "Better" | "Worse";
+};
+
+export type ActivityData = {
+ period: string;
+ metrics: ActivityMetric[];
+};
+
+export type Device = {
+ id: string;
+ name: string;
+ status: "online" | "offline";
+ lastCheck: string;
+};
+
+export type SafetyControl = {
+ key: string;
+ title: string;
+ description: string;
+ defaultValue: boolean;
+};
+
+export type ControlsData = {
+ safetyControls: SafetyControl[];
+};