import { DiagnosticResult } from './types.js'; import { RedactionOptions } from './Transport.js'; /** * Clones an object and recursively loops through all keys, redacting their values if the key matches any of a list of strings. * @param obj: Object to clone and redact * @param additionalKeys: Extra keys that can be matched for redaction. Does not overwrite the default set. */ export declare function redactObject(obj: Record, additionalKeys?: string[]): Record; /** * Redacts a DiagnosticResult object using the provided options. * - 'off' does nothing * - 'remove' removes most optional properties, replaces non-optional properties with the simplest possible alternative * - 'replace' runs `redactObject`, which replaces secret keys with `[redacted]` */ export declare function redactDiagnostic(diag: DiagnosticResult, options: RedactionOptions): DiagnosticResult; /** Replaces literal values in a JSON body with placeholders, keeping keys. Null on empty/invalid input; never throws. */ export declare function sanitizeJsonBody(body: string | null | undefined): string | null; /** Extracts an ES|QL/SQL `query` field, but only when parameterized (contains `?`). Null otherwise; never throws. */ export declare function sanitizeStringQuery(body: string | null | undefined): string | null; /** * Sanitizes an msearch NDJSON body: even lines are headers (verbatim), odd lines are * query bodies (run through sanitizeJsonBody). Preserves EOL style and trailing newline. * Null on empty input or if any query line fails to sanitize; never throws. */ export declare function sanitizeNdjsonBody(body: string | null | undefined): string | null; //# sourceMappingURL=security.d.ts.map