Audit Log
Audit trail entry with actor, resource, action, changes, and IP tracking.
logging
Install
$ npx shadcn@latest add @open-types/audit-log
Source
export type AuditLogAction = "create" | "read" | "update" | "delete";
export interface AuditLogChange {
old?: unknown;
new?: unknown;
}
export interface AuditLogEntry {
id: string;
action: AuditLogAction;
actor_id: string;
actor_type?: string;
resource_type: string;
resource_id: string;
changes?: Record<string, AuditLogChange>;
ip_address?: string;
user_agent?: string;
timestamp: string;
}
export type AuditLogAction = "create" | "read" | "update" | "delete";
export interface AuditLogChange {
old?: unknown;
new?: unknown;
}
export interface AuditLogEntry {
id: string;
action: AuditLogAction;
actor_id: string;
actor_type?: string;
resource_type: string;
resource_id: string;
changes?: Record<string, AuditLogChange>;
ip_address?: string;
user_agent?: string;
timestamp: string;
}