typeorm-auditing
Version:
TypeORM Auditing: Create history tables and manage changes of entity automatically.
11 lines (10 loc) • 543 B
TypeScript
import { EntitySubscriberInterface, InsertEvent, RemoveEvent, SoftRemoveEvent, UpdateEvent } from 'typeorm';
export declare class AuditingSubscriber implements EntitySubscriberInterface {
private static subscribers;
static Subscribe(origin: Function, target: Function): void;
private saveHistory;
afterInsert(event: InsertEvent<any>): Promise<any>;
afterUpdate(event: UpdateEvent<any>): Promise<any>;
afterRemove(event: RemoveEvent<any>): Promise<any>;
afterSoftRemove(event: SoftRemoveEvent<any>): Promise<any>;
}