import type { AuditLogProtocol } from "@repo/core-shared/di/bind-protocols";
import type { AuditEntry } from "@repo/core-shared/audit";

/**
 * Full audit log interface. Extends the minimal `AuditLogProtocol` from
 * core-shared with the privileged `eraseSubject` op for GDPR erasure.
 *
 * Feature binders that receive `ctx.auditLog` see only `AuditLogProtocol`
 * (record). Admin-path code that needs erasure imports this full interface.
 *
 * The `extends` link forces typecheck failure if either side narrows below
 * the protocol surface — same safety net as IEventBus, IRealtimeBroadcaster,
 * IRealtimeHandlerRegistry, IMetrics.
 */
export interface IAuditLog extends AuditLogProtocol {
  // record(entry: AuditEntry): Promise<void>  — inherited from protocol
  eraseSubject(actorId: string, mode: "pseudonymize" | "delete"): Promise<void>;
}

// Re-export AuditEntry for convenience (so consumers don't always need
// to dual-import from @repo/core-shared/audit).
export type { AuditEntry };
