UNPKG

polyv-live-cli

Version:

CLI tool for managing PolyV live streaming services.

51 lines 1.84 kB
import { EventEmitter } from 'events'; import { AlertRule, AlertType, AlertEvaluationContext, AlertRuleEvaluationResult } from '../types/alert'; export declare class AlertRuleManager extends EventEmitter { private rules; private lastTriggerTimes; private evaluationInterval?; private readonly evaluationIntervalMs; private isRunning; constructor(); private setupDefaultRules; addRule(rule: AlertRule): void; updateRule(ruleId: string, updates: Partial<AlertRule>): boolean; deleteRule(ruleId: string): boolean; getRule(ruleId: string): AlertRule | undefined; getAllRules(): AlertRule[]; getEnabledRules(): AlertRule[]; getRulesByType(type: AlertType): AlertRule[]; getRulesByTag(tag: string): AlertRule[]; setRuleEnabled(ruleId: string, enabled: boolean): boolean; private validateRule; private validateCondition; private validateAction; start(): void; stop(): void; evaluateRules(context?: AlertEvaluationContext): AlertRuleEvaluationResult[]; evaluateRule(rule: AlertRule, context: AlertEvaluationContext): AlertRuleEvaluationResult; private evaluateCondition; private getFieldValue; private createAlertFromRule; private handleTriggeredRule; private executeAction; private executeLogAction; private executeNotificationAction; private executeEmailAction; private executeWebhookAction; private executeSoundAction; getRuleStatistics(): { total: number; enabled: number; triggered: number; byType: Record<AlertType, number>; }; exportRules(): AlertRule[]; importRules(rules: AlertRule[], replace?: boolean): { imported: number; errors: string[]; }; clearRules(): void; destroy(): void; } //# sourceMappingURL=alert-rule-manager.d.ts.map