StaticClassifyStaticFieldClassify a specific field.
@FieldClassification('email', 'PII')
@FieldClassification('ssn', 'PHI', { level: 'SECRET', regulations: ['HIPAA'] })
@FieldClassification('creditCard', 'PCI_PAN', { level: 'TOP_SECRET' })
StaticgetGet the classification for a specific field.
StaticgetGet all classifications for a model.
StaticgetGet all fields with a specific category (e.g., all PII fields).
StaticgetConvenience: get all PII (Personally Identifiable Information) fields.
StaticgetConvenience: get all PHI (Protected Health Information) fields.
StaticgetConvenience: get all PCI (Payment Card Industry) fields.
StaticgetConvenience: get all financial data fields.
StaticgetGet all fields with a specific sensitivity level.
StaticgetGet all fields classified as CONFIDENTIAL or higher.
StaticisCheck if a field contains sensitive data (PII, PHI, PCI, etc.).
StaticautoAutomatically classify fields based on their names. Call this after model definition to tag common sensitive fields.
The model to scan
OptionaladditionalPatterns: (string | RegExp)[]StaticinheritMerge classifications from another model (useful for inheritance).
Classify the entire model (applies to all fields, use field-level for specifics).