Redact | Node.js SDK
The Pangea Redact API helps developers limit the sprawl of sensitive information by performing redaction using defined rules.
Redact
constructor(token: PangeaToken, config: PangeaConfig, options: RedactOptions): RedactServiceCreates a new RedactService
with the given Pangea API token and
configuration.
const config = new PangeaConfig({ domain: "pangea_domain" });
const redact = new RedactService("pangea_token", config);
Redact
redact(text: string, options: TextOptions): Promise<PangeaResponse<TextResult>>Redact sensitive information from provided text.
const response = await redact.redact(
"Jenny Jenny... 555-867-5309"
);
Redact structured
redactStructured(data: object, options: StructuredOptions): Promise<PangeaResponse<StructuredResult>>Redact sensitive information from structured data (e.g., JSON).
const response = await redact.redactStructured({
"phone": "555-867-5309"
});
Unredact
unredact(request: UnredactRequest): Promise<PangeaResponse<UnredactResult<O>>>Decrypt or unredact fpe redactions.
Enum FPEAlphabet
FPEAlphabetALPHANUMERIC
= "alphanumeric"
ALPHANUMERICLOWER
= "alphanumericlower"
NUMERIC
= "numeric"
Enum MaskingType
MaskingTypeMASK
= "mask"
UNMASK
= "unmask"
Enum RedactType
RedactTypeDETECT_ONLY
= "detect_only"
FPE
= "fpe"
HASH
= "hash"
MASK
= "mask"
PARTIAL_MASKING
= "partial_masking"
REPLACEMENT
= "replacement"