/** * Field Hook Execution * * Runs field-level beforeValidate and beforeChange hooks during create/update operations. * Mutates the data object in-place, mirroring the password-hashing pattern already used * by create.ts and update.ts. */ import type { RevealCollectionConfig, RevealDocument, RevealRequest } from '../../types/index.js'; /** * Executes all hooks of `hookType` for every field in the collection that has them. * * Runs sequentially: each hook in a field's array receives the value returned by the * previous hook, so hooks compose (later hooks see the output of earlier ones). * * Called twice per write operation: * 1. `beforeValidate` - before required-field checks, so hooks can generate values * (e.g. slug auto-generation from title) that satisfy required constraints. * 2. `beforeChange` - after validation, before the DB write. */ export declare function runBeforeFieldHooks(config: RevealCollectionConfig, data: Record, operation: 'create' | 'update', hookType: 'beforeValidate' | 'beforeChange', originalDoc?: RevealDocument, req?: RevealRequest): Promise; //# sourceMappingURL=fieldHooks.d.ts.map