Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/pangea-node-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added

- Detect-only Redact for Sanitize.

## 3.12.0 - 2024-09-25

### Added
Expand Down
29 changes: 29 additions & 0 deletions packages/pangea-node-sdk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2544,6 +2544,12 @@ export namespace Sanitize {
/** Redact sensitive content. */
redact?: boolean;

/**
* If redact is enabled, avoids redacting the file and instead returns the
* PII analysis engine results. Only works if redact is enabled.
*/
redact_detect_only?: boolean;

/** Remove file attachments (PDF only). */
remove_attachments?: boolean;

Expand Down Expand Up @@ -2626,12 +2632,35 @@ export namespace Sanitize {
domain_intel_summary?: string;
}

export interface RedactRecognizerResult {
/** The entity name. */
field_type: string;

/** The certainty score that the entity matches this specific snippet. */
score: number;

/** The text snippet that matched. */
text: string;

/** The starting index of a snippet. */
start: number;

/** The ending index of a snippet. */
end: number;

/** Indicates if this rule was used to anonymize a text snippet. */
redacted: boolean;
}

export interface RedactData {
/** Number of items redacted. */
redaction_count?: number;

/** Summary counts. */
summary_counts?: Dictionary;

/** The scoring result of a set of rules. */
recognizer_results?: RedactRecognizerResult[];
}

export interface CDR {
Expand Down