/**
 * Disclosure-Accounting Report Template (P3.5)
 *
 * Generates a per-data-subject disclosure accounting report from the canonical
 * audit event chain. Directly satisfies:
 *   - HIPAA §164.528 (Accounting of Disclosures of Protected Health Information):
 *     Each disclosure of PHI must be recorded with the date, recipient, description
 *     of the PHI disclosed, and purpose of the disclosure.
 *   - FERPA 34 CFR §99.32 (Record of Disclosures):
 *     Institutions must maintain a record of each request for access and each
 *     disclosure made to parties other than the student/parent.
 *   - RESPA 12 CFR §1024.10 / §1024.17:
 *     Settlement record and escrow accounting documentation.
 *   - Title IX 34 CFR §106.45:
 *     Procedural records for Title IX investigations and hearings.
 *
 * The report is produced from PackEnforcementAuditEvent records that carry
 * five-dimensional identity (P3.5):
 *   1. agentId (dimension 1)
 *   2. operatorId (dimension 2)
 *   3. dataSubjectId (dimension 3, pseudonymized SHA-256)
 *   4. recipientId / recipientType (dimension 4)
 *   5. transportMechanism / transportIntegrity (dimension 5)
 *
 * @connexum/ai-governance
 */
import { PackEnforcementAuditEvent } from '../../../src/classification/pack-driven-classifier';
/** A single line item in the disclosure accounting report. */
export interface DisclosureLineItem {
    /** Canonical audit event. */
    auditId: string;
    /** Timestamp of the disclosure. */
    timestamp: string;
    /** Pack that classified the category. */
    packId: string;
    /** Category that triggered the disclosure (e.g. 'PHI', 'EDUCATION_RECORD'). */
    categoryId: string;
    /** Governance action that was resolved (ALLOW, WARN, LOG, BLOCK, REQUIRE_APPROVAL). */
    action: string;
    /** Dimension 1: Agent that processed the data. */
    agentId?: string;
    /** Dimension 2: Operator who authorized the action. */
    operatorId?: string;
    /** Dimension 4: Pseudonymized recipient ID. */
    recipientId?: string;
    /** Dimension 4: Semantic type of recipient. */
    recipientType?: string;
    /** Dimension 5: Transport mechanism. */
    transportMechanism?: string;
    /** Dimension 5: Transport integrity. */
    transportIntegrity?: string;
    /** True if transport was plaintext (compliance risk flag). */
    plaintextTransportWarning: boolean;
    /** Attribution methods used to resolve dimensions. */
    attributionMethod?: Partial<Record<'agent' | 'operator' | 'dataSubject' | 'recipient' | 'transport', string>>;
}
/** Grouped view of disclosures: by category, then by recipient. */
export interface DisclosureGroup {
    categoryId: string;
    packId: string;
    /** Total number of disclosures in this category group. */
    totalDisclosures: number;
    /** Sub-groups by recipient. */
    byRecipient: Array<{
        recipientId: string;
        recipientType: string;
        transports: string[];
        count: number;
        events: DisclosureLineItem[];
    }>;
}
/** Full disclosure-accounting report for one data subject. */
export interface DisclosureAccountingReport {
    /** The pseudonymized SHA-256 subject hash this report covers. */
    dataSubjectId: string;
    /** Date range of the report. */
    startDate: string | null;
    endDate: string | null;
    /** Pack filter applied, or null if all packs. */
    packId: string | null;
    /** Regulatory basis this report satisfies. */
    regulatoryBasis: string[];
    /** ISO timestamp of report generation. */
    generatedAt: string;
    /** Total number of disclosure events found. */
    totalDisclosures: number;
    /** Number of disclosures with plaintext transport (compliance risk). */
    plaintextTransportCount: number;
    /** Number of disclosures missing recipient attribution. */
    unattributedRecipientCount: number;
    /** Grouped disclosures: category > recipient > transport. */
    disclosures: DisclosureGroup[];
    /** Flat list for export (CSV / print). */
    lineItems: DisclosureLineItem[];
}
/**
 * Generate a disclosure-accounting report for a single data subject.
 *
 * @param dataSubjectId Pseudonymized SHA-256 subject hash.
 * @param events        Array of PackEnforcementAuditEvents from drainAuditEvents()
 *                      or from the persisted audit chain query.
 * @param options       Optional filters: startDate, endDate (ISO strings), packId.
 *
 * @returns DisclosureAccountingReport ready for rendering or API response.
 *
 * @example
 * ```ts
 * const classifier = new PackDrivenClassifier();
 * // ... load packs ...
 * const events = classifier.drainAuditEvents();
 * const report = generateDisclosureAccountingReport(
 *   'sha256:abc123...',
 *   events,
 *   { startDate: '2026-01-01', endDate: '2026-12-31', packId: 'hipaa' },
 * );
 * ```
 */
export declare function generateDisclosureAccountingReport(dataSubjectId: string, events: PackEnforcementAuditEvent[], options?: {
    startDate?: string | null;
    endDate?: string | null;
    packId?: string | null;
}): DisclosureAccountingReport;
/**
 * Render a disclosure-accounting report to a human-readable text summary.
 * Suitable for printing, email delivery, or inclusion in a PDF.
 *
 * @param report The report generated by generateDisclosureAccountingReport.
 * @returns Multi-line text string.
 */
export declare function renderDisclosureAccountingReport(report: DisclosureAccountingReport): string;
//# sourceMappingURL=disclosure-accounting.d.ts.map