feat: Separate host and port for TCP services
This commit is contained in:
@@ -3,6 +3,8 @@ export interface Service {
|
|||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
url: 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";
|
type: "HTTP" | "HTTPS" | "TCP" | "DNS" | "PING" | "HTTP" | "http" | "https" | "tcp" | "dns" | "ping" | "smtp" | "icmp";
|
||||||
status: "up" | "down" | "paused" | "pending" | "warning";
|
status: "up" | "down" | "paused" | "pending" | "warning";
|
||||||
responseTime: number;
|
responseTime: number;
|
||||||
@@ -15,11 +17,15 @@ export interface Service {
|
|||||||
muteAlerts?: boolean; // Keep this to avoid breaking existing code
|
muteAlerts?: boolean; // Keep this to avoid breaking existing code
|
||||||
alerts?: "muted" | "unmuted"; // Make sure alerts is properly typed as union
|
alerts?: "muted" | "unmuted"; // Make sure alerts is properly typed as union
|
||||||
muteChangedAt?: string;
|
muteChangedAt?: string;
|
||||||
|
domain?: string; // Add domain field for DNS services
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateServiceParams {
|
export interface CreateServiceParams {
|
||||||
name: string;
|
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;
|
type: string;
|
||||||
interval: number;
|
interval: number;
|
||||||
retries: number;
|
retries: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user