@llm-dev-ops/shield-sdk
Version:
Enterprise-grade SDK for securing Large Language Model applications
30 lines • 893 B
TypeScript
import { BaseScanner } from './base.js';
import type { ScanResult } from '../types.js';
/**
* Configuration for PII scanner
*/
export interface PIIConfig {
/** Types of PII to detect */
piiTypes?: PIIType[];
/** Whether to redact detected PII */
redact?: boolean;
/** Country-specific formats to detect */
countries?: string[];
}
type PIIType = 'email' | 'phone' | 'ssn' | 'credit-card' | 'ip-address' | 'address' | 'passport' | 'drivers-license';
/**
* Scanner for detecting Personally Identifiable Information (PII)
*/
export declare class PIIScanner extends BaseScanner {
readonly name = "pii";
private patterns;
private redact;
constructor(config?: PIIConfig);
scan(text: string): Promise<ScanResult>;
private validate;
private luhnCheck;
private getConfidence;
private maskPII;
}
export {};
//# sourceMappingURL=pii.d.ts.map