/**
 * LegalHold entity types -- P4-RET-03 Legal Hold Mechanism
 *
 * Defines the canonical LegalHold entity, scope, status, and the
 * AuditChainRef type used to link hold lifecycle events into the
 * tamper-evident audit chain.
 *
 * Pack-binding primacy (Thomas directive 2026-04-22): the scope can
 * target a specific packId (e.g. 'hipaa'), binding the hold to all
 * records whose packBinding includes that pack ID for the given tenant.
 *
 * Spec: P4-RET-01 Section 2.3, AC 7-10
 *
 * @connexum/ai-governance
 */
export type ISO8601 = string;
/**
 * A reference into the tamper-evident audit chain for a single
 * hold lifecycle event (created, extended, released).
 */
export interface AuditChainRef {
    /** Canonical event name (e.g. 'retention:legal-hold-created') */
    eventName: string;
    /** ISO-8601 timestamp the event was appended */
    timestamp: ISO8601;
    /** Chain entry ID returned by the storage layer */
    chainEntryId: string;
    /** Actor who triggered the lifecycle event */
    actor: string;
}
/**
 * The scope of records covered by a LegalHold.
 *
 * Matching semantics (OR over scope fields, with tenant primacy):
 *   - A tenant-scope hold catches ALL records for that tenant,
 *     regardless of narrower agentId / contractId / caseTag fields.
 *   - A packId-scope hold catches all records whose packBinding
 *     array includes the specified packId.
 *   - dateRange applies as a secondary filter on top of the primary
 *     scope fields (when present, only records whose timestamp falls
 *     in the range are held).
 *   - At least ONE of the non-dateRange fields must be populated.
 *     Empty scope (no fields set) is refused with LegalHoldScopeEmptyError.
 */
export interface LegalHoldScope {
    /** Tenant whose records are held. Authoritative: catches all sub-scopes. */
    tenantId?: string;
    /** Contract-scoped hold (narrows within a tenant). */
    contractId?: string;
    /** Agent-scoped hold (narrows further). */
    agentId?: string;
    /**
     * Arbitrary case tag (e.g. litigation docket number).
     * Used by counsel to group records across tenants.
     */
    caseTag?: string;
    /**
     * Pack-binding hold (pack-binding primacy, Thomas 2026-04-22).
     * Catches records whose packBinding[] includes this pack ID.
     * Example: 'hipaa' catches all HIPAA-governed records for the tenant.
     */
    packId?: string;
    /** Optional time-window filter applied on top of primary scope. */
    dateRange?: {
        from: ISO8601;
        to?: ISO8601;
    };
}
/**
 * Lifecycle state of a LegalHold.
 *
 * pending  -- awaiting legal-reviewer approval in the approval queue.
 *             Records whose scope matches are NOT blocked in this state:
 *             the hold only activates after approval.
 * active   -- approved and in force. Matching records are preserved.
 * released -- approved-release received. Records return to normal
 *             policy evaluation. Past-retention records are flagged
 *             for the next scheduled job (AC 10: no backdated delete).
 */
export type LegalHoldStatus = 'pending' | 'active' | 'released';
/**
 * The canonical LegalHold record.
 * Stored by LegalHoldStore. Emitted into the public SDK.
 *
 * Spec: P4-RET-01 AC 7
 */
export interface LegalHold {
    /** UUID generated at creation time. */
    holdId: string;
    /** Scope of records covered. At least one field must be non-empty. */
    scope: LegalHoldScope;
    /**
     * Lifecycle status.
     * pending  -- in approval queue, does NOT block deletions.
     * active   -- approved, blocks deletions within scope.
     * released -- approved-release, no longer blocks deletions.
     */
    status: LegalHoldStatus;
    /** Actor (sub claim from JWT, or 'system') who submitted the creation. */
    createdBy: string;
    createdAt: ISO8601;
    /** Human-readable reason for the hold (e.g. litigation matter reference). */
    reason: string;
    /** Optional expiry for the active hold. After this timestamp the hold is NOT
     *  auto-released -- a fresh approval is still required; this field is advisory
     *  for dashboard alerting only. */
    expiresAt?: ISO8601;
    /** Set when status transitions to 'released'. */
    releasedBy?: string;
    releasedAt?: ISO8601;
    /**
     * Ordered list of audit-chain references for every lifecycle event
     * (created, extended, released). Append-only.
     */
    chainOfCustody: AuditChainRef[];
    /**
     * Internal: the approval-queue entry ID that must resolve before
     * this hold becomes active. Null once the hold is active or released.
     */
    pendingApprovalId?: string;
}
//# sourceMappingURL=legal-hold.d.ts.map