/** * Plugin hooks utilities for merging global hooks with collection hooks. * * Global plugin hooks run before collection-specific hooks because they represent * cross-cutting concerns (audit logging, encryption) that should see data before * collection-specific transformations. */ import type { HooksConfig } from "../types/hook-types.js"; import type { GlobalHooksConfig } from "./plugin-types.js"; /** * Merges global plugin hooks with collection-specific hooks. * * For each hook type, global hooks are prepended before collection hooks. * This ensures global hooks (cross-cutting concerns) run first. * * Type narrowing: Global hooks are `HooksConfig>`, * collection hooks are `HooksConfig`. The merged result is `HooksConfig` * with global hooks cast appropriately. * * @param globalHooks - Global hooks from plugin registry (may be empty/undefined) * @param collectionHooks - Collection-specific hooks (may be empty/undefined) * @returns Merged hooks config with global hooks first */ export declare const mergeGlobalHooks: >(globalHooks: GlobalHooksConfig | undefined, collectionHooks: HooksConfig | undefined) => HooksConfig; //# sourceMappingURL=plugin-hooks.d.ts.map