/** * @medicine-wheel/consent-lifecycle — Alerts Module * * Consent health monitoring: stale consent warnings, renewal * due dates, scope mismatches, and batch health checks. * Consent that goes unmonitored decays — these alerts prevent that. */ import type { ConsentRecord } from './types.js'; import type { ConsentHealthResult } from './lifecycle.js'; /** * Check whether a consent record is stale and needs renewal. * Returns a warning if consent is approaching or past expiration. */ export declare function consentStaleAlert(record: ConsentRecord): StaleAlert | null; /** * Find all consent records that need renewal. * Returns records sorted by urgency (most urgent first). */ export declare function renewalDue(records: ConsentRecord[]): RenewalDueResult; /** * Detect whether an action falls outside the consent scope. * Returns a mismatch report if the action is not covered. */ export declare function scopeMismatch(record: ConsentRecord, action: ActionDescription): ScopeMismatchResult; /** * Batch health check across all consent records. * Returns a comprehensive health report for the entire consent landscape. */ export declare function healthCheck(records: ConsentRecord[]): BatchHealthResult; /** Stale consent alert */ export interface StaleAlert { recordId: string; severity: 'info' | 'warning' | 'critical'; message: string; daysUntilExpiry: number | null; } /** A single renewal item */ export interface RenewalItem { recordId: string; grantor: string; grantee: string; severity: 'info' | 'warning' | 'critical'; daysUntilExpiry: number | null; message: string; } /** Result of renewal due check */ export interface RenewalDueResult { totalDue: number; items: RenewalItem[]; summary: string; } /** Description of an action to check against scope */ export interface ActionDescription { dataType: string; purpose: string; } /** Result of scope mismatch check */ export interface ScopeMismatchResult { mismatch: boolean; issues: string[]; recommendation: string; } /** Batch health check result */ export interface BatchHealthResult { total: number; healthy: number; unhealthy: number; results: Array<{ recordId: string; health: ConsentHealthResult; }>; summary: string; } //# sourceMappingURL=alerts.d.ts.map