Files
interfaces/ts/data/servicestatus.ts

65 lines
1.3 KiB
TypeScript

import type { TStatusType, TStatusMode, TCheckType } from './types.js';
// ============================================
// Service Status
// ============================================
/**
* Represents the status of a monitored service.
*/
export interface IServiceStatus {
id: string;
name: string;
displayName: string;
description?: string;
// Current state
currentStatus: TStatusType;
lastChecked: number;
responseTime: number;
// Uptime metrics
uptime30d: number;
uptime90d: number;
// Organization
category?: string;
dependencies?: string[];
// Status management
statusMode: TStatusMode;
manualStatus?: TStatusType;
paused: boolean;
// Check configuration
checkType?: TCheckType;
checkCollectionId?: string;
intervalMs?: number;
}
// ============================================
// Status History
// ============================================
/**
* A point in the status history timeline.
*/
export interface IStatusHistoryPoint {
timestamp: number;
status: TStatusType;
responseTime?: number;
}
// ============================================
// Overall Status
// ============================================
/**
* Aggregate status for a group of services or entire status page.
*/
export interface IOverallStatus {
status: TStatusType;
message?: string;
lastUpdated: number;
}