import type { Violation } from './violation'; export type WaiverStatus = 'requested' | 'approved' | 'rejected' | 'expired'; export interface Waiver { readonly waiverRef: string; readonly version: number; readonly fingerprint: string; readonly status: WaiverStatus; readonly reason: string; readonly requestedBy: string; readonly requestedAt: string; readonly approvedBy?: string; readonly approvedAt?: string; readonly expiresAt: string; readonly supersedes?: number; } export declare class WaiverTransitionError extends Error { constructor(message: string); } export interface RequestWaiverInput { readonly waiverRef: string; readonly fingerprint: string; readonly reason: string; readonly requestedBy: string; readonly requestedAt: string; readonly expiresAt: string; } export declare function requestWaiver(input: RequestWaiverInput): Waiver; export declare function approveWaiver(waiver: Waiver, approvedBy: string, approvedAt: string): Waiver; export declare function rejectWaiver(waiver: Waiver): Waiver; export interface ReviseWaiverInput { readonly reason?: string; readonly requestedBy: string; readonly requestedAt: string; readonly expiresAt: string; } export declare function reviseWaiver(current: Waiver, input: ReviseWaiverInput): Waiver; export declare function isExpired(waiver: Waiver, now: string): boolean; export declare function effectiveStatus(waiver: Waiver, now: string): WaiverStatus; export declare function isWaiverActive(waiver: Waiver, now: string): boolean; export interface IWaiverStore { list(fingerprint: string): readonly Waiver[]; all(): readonly Waiver[]; put(waiver: Waiver): void; } export declare class InMemoryWaiverStore implements IWaiverStore { private readonly byFingerprint; constructor(seed?: readonly Waiver[]); list(fingerprint: string): readonly Waiver[]; all(): readonly Waiver[]; put(waiver: Waiver): void; } export declare function activeWaiverFor(store: IWaiverStore, fingerprint: string, now: string): Waiver | undefined; export interface WaiverSuppression { readonly violation: Violation; readonly waiver: Waiver; } export interface ApplyWaiversResult { readonly retained: readonly Violation[]; readonly suppressed: readonly WaiverSuppression[]; } export declare function applyWaivers(violations: readonly Violation[], store: IWaiverStore, now: string): ApplyWaiversResult; export interface FreezeWaivedResult { readonly violations: readonly Violation[]; readonly suppressed: readonly WaiverSuppression[]; readonly unmatched: readonly string[]; } export declare function freezeWaivedViolations(violations: readonly Violation[], store: IWaiverStore, now: string): FreezeWaivedResult;