64 lines
1.3 KiB
TypeScript
64 lines
1.3 KiB
TypeScript
/**
|
|
* Shared type definitions for uptime.link
|
|
*/
|
|
|
|
// ============================================
|
|
// Status Types
|
|
// ============================================
|
|
|
|
/**
|
|
* Status types for monitors/services
|
|
*/
|
|
export type TStatusType =
|
|
| 'operational'
|
|
| 'degraded'
|
|
| 'partial_outage'
|
|
| 'major_outage'
|
|
| 'maintenance'
|
|
| 'initializing'
|
|
| 'error'
|
|
| 'paused';
|
|
|
|
/**
|
|
* Check types (discriminant values for TCheck union)
|
|
*/
|
|
export type TCheckType = 'assumption' | 'function' | 'pwa' | 'pagerank';
|
|
|
|
/**
|
|
* Status mode for monitors - auto follows checks, manual is user-set
|
|
*/
|
|
export type TStatusMode = 'auto' | 'manual';
|
|
|
|
// ============================================
|
|
// Incident Types
|
|
// ============================================
|
|
|
|
/**
|
|
* Incident severity levels
|
|
*/
|
|
export type TIncidentSeverity = 'critical' | 'major' | 'minor' | 'maintenance';
|
|
|
|
/**
|
|
* Incident status workflow
|
|
*/
|
|
export type TIncidentStatus =
|
|
| 'investigating'
|
|
| 'identified'
|
|
| 'monitoring'
|
|
| 'resolved'
|
|
| 'postmortem';
|
|
|
|
// ============================================
|
|
// Check Result Types (used by execution)
|
|
// ============================================
|
|
|
|
/**
|
|
* Result status for check execution
|
|
*/
|
|
export type TCheckResultStatus = 'ok' | 'not ok' | 'timed out';
|
|
|
|
/**
|
|
* Last result state for a check
|
|
*/
|
|
export type TCheckLastResult = 'success' | 'failure' | 'pending';
|