import type { Severity } from "./contracts.js"; export declare const SCHEMA_VERSION = "1.0.0"; export declare function nowIso(): string; export declare function randomId(prefix: string): string; export declare function clamp(value: number, min?: number, max?: number): number; export declare function normalizeSeverity(score: number): Severity; export declare function dedupe(values: T[]): T[]; export declare function safeArray(value: T[] | undefined | null): T[]; export declare function safeNumber(value: unknown, fallback?: number): number; export declare function haversineDistanceKm(lat1: number, lon1: number, lat2: number, lon2: number): number; /** * Sanitize a string to prevent XSS and injection. Strips control characters and * truncates to a safe length. */ export declare function sanitizeString(value: unknown, maxLength?: number): string; /** * Validate that an ID matches the expected ADBIS identifier format. * Prevents path-traversal and injection through route params. */ export declare function isValidId(id: unknown): boolean; /** * Deep-scan an object and strip prototype-pollution keys (__proto__, constructor, prototype). * Returns a clean copy. Operates recursively with depth limit to prevent stack overflow. */ export declare function stripPoisonedKeys(obj: unknown, depth?: number): unknown; /** * Safe JSON parse that rejects prototype pollution payloads. * Returns null on parse failure instead of throwing. */ export declare function safeJsonParse(raw: string): T | null; //# sourceMappingURL=utils.d.ts.map