/** * Data Inventory * * Maintains a registry of all personal data stored by the application. * Supports GDPR Article 30 (Records of Processing Activities). * * Added by Pantheon Security for enterprise compliance support. */ import { DataClassification, type DataInventoryEntry, type DataCategory, type LegalBasis } from "./types.js"; /** * Data Inventory class */ export declare class DataInventory { private static instance; private inventoryFile; private entries; private loaded; private constructor(); /** * Get singleton instance */ static getInstance(): DataInventory; /** * Load inventory from storage */ private load; /** * Save inventory to storage */ private save; /** * Auto-discover data based on known data types and locations */ private autoDiscover; /** * Register a new data type in the inventory */ register(dataType: string, storageLocation: string, options?: { description?: string; classification?: DataClassification; dataCategories?: DataCategory[]; legalBasis?: LegalBasis; retentionDays?: number | "indefinite"; encrypted?: boolean; exportable?: boolean; erasable?: boolean; }): Promise; /** * Update an existing entry */ update(entryId: string, updates: Partial>): Promise; /** * Remove an entry from the inventory */ remove(entryId: string): Promise; /** * Get all inventory entries */ getAll(): Promise; /** * Get entry by ID */ getById(entryId: string): Promise; /** * Get entries by data type */ getByDataType(dataType: string): Promise; /** * Get entries by classification */ getByClassification(classification: DataClassification): Promise; /** * Get entries by data category */ getByCategory(category: DataCategory): Promise; /** * Get exportable data entries (for GDPR data portability) */ getExportable(): Promise; /** * Get erasable data entries (for GDPR right to erasure) */ getErasable(): Promise; /** * Get personal data entries (for DSAR) */ getPersonalData(): Promise; /** * Generate GDPR Article 30 Records of Processing Activities */ generateROPA(): Promise<{ controller: string; purposes: string[]; categories_of_data_subjects: string[]; categories_of_personal_data: string[]; recipients: string[]; transfers_to_third_countries: string[]; retention_periods: { data_type: string; period: string; }[]; security_measures: string[]; }>; /** * Get inventory summary */ getSummary(): Promise<{ total_entries: number; by_classification: Record; exportable_count: number; erasable_count: number; personal_data_count: number; encrypted_count: number; }>; /** * Export inventory for compliance reporting */ export(): Promise; } /** * Get the data inventory instance */ export declare function getDataInventory(): DataInventory; /** * Get all data inventory entries */ export declare function getAllDataInventory(): Promise; /** * Get exportable data entries */ export declare function getExportableData(): Promise; /** * Get erasable data entries */ export declare function getErasableData(): Promise;