| 193 | } |
| 194 | |
| 195 | export interface RedactOptions { |
| 196 | /** Replaces the default column list entirely. */ |
| 197 | columns?: readonly string[]; |
| 198 | /** Appended to the default column list. Ignored when `columns` is provided. */ |
| 199 | extraColumns?: readonly string[]; |
| 200 | /** Additional regex patterns tested against the lowercased column name. */ |
| 201 | columnPatterns?: readonly RegExp[]; |
| 202 | /** |
| 203 | * When true (the default), string values that contain a valid JSON object or |
| 204 | * array are parsed and recursively redacted before being re-serialised. This |
| 205 | * catches PII inside audit-table columns like `new_value` / `old_value` whose |
| 206 | * column name alone does not trigger a PII heuristic. Set to false to opt out |
| 207 | * if JSON parsing overhead is a concern. |
| 208 | */ |
| 209 | parseJsonStrings?: boolean; |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * Recursively walk arrays/objects and redact detected PII in place (returning |
nothing calls this directly
no outgoing calls
no test coverage detected