/** * Generates the audit-log persistence layer: * - app/Jobs/WriteAuditLog.php — queued (or sync) job that inserts a * prepared audit payload into the audits table. * - app/Models/Audit.php — Eloquent model with polymorphic auditable + * user relations and Prunable retention support. * * The trait (HasOmnifyAuditLog) does ALL Auth + Request + scrub work on * the request thread, so the job's only responsibility is the insert. * That's deliberate: workers run with no Auth context, no Request facade, * and no session — anything captured at job HANDLE time would be wrong. * * The Audit model uses Laravel's Prunable trait so `php artisan model:prune` * (scheduled hourly / daily by the consumer) deletes rows older than the * configured retention. When `omnify.audit.retention` is empty the * `prunable()` query matches no rows (audits are kept forever). */ import { SchemaReader } from './schema-reader.js'; import type { GeneratedFile, PhpConfig } from './types.js'; /** Generate the WriteAuditLog job + Audit model. */ export declare function generateAuditObserver(reader: SchemaReader, config: PhpConfig): GeneratedFile[];