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

View File

@@ -1,13 +1,24 @@
import * as plugins from '../ul-interfaces.plugins.js';
import * as search from './search.js';
import * as checks from './checks/index.js';
import type * as checks from './checks/index.js';
/**
* A collection of checks to run against a property/service.
*
* Two storage modes supported:
* 1. Legacy: Separate arrays for each check type (assumptionChecks, functionChecks, etc.)
* 2. Modern: Single unified array using discriminated union (checks)
*/
export interface ICheckCollection {
id: string;
name?: string;
description?: string;
intervalMs: number;
assumptionChecks?: Array<checks.IAssumptionCheck>;
functionChecks: Array<checks.IFunctionCheck>;
pwaChecks?: Array<checks.IPwaCheck>;
pageRankChecks: Array<checks.IPageRankCheck>;
// Modern: Single array with discriminated union
checks?: checks.TCheckConfig[];
// Legacy: Separate arrays by type (for backward compatibility)
assumptionChecks?: checks.IAssumptionCheck[];
functionChecks?: checks.IFunctionCheck[];
pwaChecks?: checks.IPwaCheck[];
pageRankChecks?: checks.IPageRankCheck[];
}