feat(interfaces): add structured data models and discriminated check configs; migrate tooling and package metadata

This commit is contained in:
2025-12-26 18:20:01 +00:00
parent add4a52635
commit da0bdc0564
23 changed files with 7721 additions and 3689 deletions

64
ts/data/servicestatus.ts Normal file
View File

@@ -0,0 +1,64 @@
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;
}