import type { SanitizedCollectionConfig } from '../../../collections/config/types.js'; import type { SanitizedGlobalConfig } from '../../../globals/config/types.js'; import type { RequestContext } from '../../../index.js'; import type { JsonObject, Operation, PayloadRequest } from '../../../types/index.js'; export type Args = { collection: null | SanitizedCollectionConfig; context: RequestContext; data: T; doc: T; docWithLocales: JsonObject; /** * Names of the top-level fields submitted by the caller. When present, validation skips other * top-level fields and validates all nested fields below each submitted field. */ fieldsToValidate?: ReadonlySet; global: null | SanitizedGlobalConfig; id?: number | string; onDataProcessed?: (data: T) => void; operation: Operation; overrideAccess?: boolean; req: PayloadRequest; skipValidation?: boolean; }; /** * This function is responsible for the following actions, in order: * - Run condition * - Execute field hooks * - Validate data * - Transform data for storage * - Unflatten locales. The input `data` is the normal document for one locale. The output result will become the document with locales. */ export declare const beforeChange: ({ id, collection, context, data: incomingData, doc, docWithLocales, fieldsToValidate: submittedTopLevelFieldNames, global, onDataProcessed, operation, overrideAccess, req, skipValidation, }: Args) => Promise; //# sourceMappingURL=index.d.ts.map