API Reference
    Preparing search index...
    EraseOptions: MaskingRule & {
        fields?: string[];
        maskingRules?: Record<string, MaskingRule>;
    }

    Options for DataMasking.erase.

    All three layers are optional and compose:

    • a top-level MaskingRule (regexPattern + maskFormat, dynamicMask, or customMask) sets the default masking strategy;
    • fields selects the dot-notation paths to mask — when omitted, a top-level rule is applied to every leaf value in the payload;
    • maskingRules provides per-field rules that take precedence over the top-level rule for the paths they name.

    Calling DataMasking.erase with no options at all replaces the entire payload with the default mask value.

    Type Declaration

    • Optionalfields?: string[]

      Dot-notation path expressions for fields to mask (supports .* and [*] wildcards).

    • OptionalmaskingRules?: Record<string, MaskingRule>

      Per-field custom masking rules keyed by dot-notation path; override the top-level rule.