# AuditAction variable · @imqueue/pg-prisma

Source: https://imqueue.org/api/pg-prisma/latest/pg-prisma.auditaction/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-prisma 1.0.1 — generated reference, not hand-written

The three kinds of write recorded in the audit trail.

**Signature:**

```typescript
AuditAction: {
    readonly INSERT: 'INSERT';
    readonly UPDATE: 'UPDATE';
    readonly DELETE: 'DELETE';
}

export type AuditAction = (typeof AuditAction)[keyof typeof AuditAction];
```

## Remarks

These are the literal strings written to the audit table's action column, so they are part of the stored data, not just an internal enum — a reader querying the trail matches on `'INSERT'`, `'UPDATE'` or `'DELETE'`.

The mapping from Prisma operations is not one-to-one: `create` records `INSERT`, `update` and `updateMany` record `UPDATE`, `delete` and `deleteMany` record `DELETE`. A soft delete is recorded as `DELETE`, since it is the caller's `delete` that is seen — but only when [audit()](https://imqueue.org/api/pg-prisma/latest/pg-prisma.audit/) is added before [softDelete()](https://imqueue.org/api/pg-prisma/latest/pg-prisma.softdelete/), because the reroute goes to the unextended client and otherwise never reaches the audit extension at all.

The value and the type share a name and a page, as the const-plus-derived-union idiom requires.

