From 0758b1d24b5e990d8e7cf6483a35ef649cc707c7 Mon Sep 17 00:00:00 2001 From: Tola Leng Date: Wed, 18 Jun 2025 23:13:14 +0700 Subject: [PATCH] feat: Separate host and port for TCP services --- application/src/types/service.types.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/src/types/service.types.ts b/application/src/types/service.types.ts index 6b987cf..a3b810a 100644 --- a/application/src/types/service.types.ts +++ b/application/src/types/service.types.ts @@ -3,6 +3,8 @@ export interface Service { id: string; name: string; url: string; + host?: string; // Add host field for PING and TCP services + port?: number; // Add port field for TCP services type: "HTTP" | "HTTPS" | "TCP" | "DNS" | "PING" | "HTTP" | "http" | "https" | "tcp" | "dns" | "ping" | "smtp" | "icmp"; status: "up" | "down" | "paused" | "pending" | "warning"; responseTime: number; @@ -15,11 +17,15 @@ export interface Service { muteAlerts?: boolean; // Keep this to avoid breaking existing code alerts?: "muted" | "unmuted"; // Make sure alerts is properly typed as union muteChangedAt?: string; + domain?: string; // Add domain field for DNS services } export interface CreateServiceParams { name: string; - url: string; + url?: string; + host?: string; // Add host field for PING and TCP services + port?: number; // Add port field for TCP services + domain?: string; // Add domain field for DNS services type: string; interval: number; retries: number; @@ -35,4 +41,4 @@ export interface UptimeData { timestamp: string; status: "up" | "down" | "paused" | "pending" | "warning"; responseTime: number; -} +} \ No newline at end of file