UNPKG

@n4it/typeorm-audit

Version:

TypeORM Auditing: Create history tables and manage changes of entities automagically.

16 lines (15 loc) 607 B
import { AuditAction, type AuditSubscriberOptions, type AuditOptions } from '../types'; export declare const createHistoryEntity: (opts: AuditOptions & { saveEntityType: boolean; }) => { new (): { id: string | number; modifiedBy: string; entityType: string; entityId: string; data: Record<string, unknown> | string; action: AuditAction; modifiedAt: Date; }; }; export declare const createHistoryInstance: ({ opts, target }: AuditSubscriberOptions, newEntity: Record<string, unknown>, action: AuditAction, userId?: number | string) => any;