import { A as Promisable, l as DispatchOption, x as TransformerInputFn } from "./hook-context-BsxU1vfN.mjs"; import { HookContext, NextFunction } from "@feathersjs/feathers"; //#region src/utils/mutate-data/mutate-data.util.d.ts /** * Applies a transformer function to each item in `context.data`, updating it in place. * If the transformer returns a new object, it replaces the original item. * Correctly handles both single-item and array data, preserving the original shape. * * @example * ```ts * import { mutateData } from 'feathers-utils/utils' * * await mutateData(context, (item) => { item.name = item.name.trim() }) * ``` * * @see https://utils.feathersjs.com/utils/mutate-data.html */ declare function mutateData(context: H, transformer: TransformerInputFn): Promisable; //#endregion //#region src/utils/mutate-result/mutate-result.util.d.ts type MutateResultOptions = { next?: NextFunction; transform?: (items: any[]) => any[]; dispatch?: DispatchOption; }; /** * Applies a transformer function to each item in `context.result` (and optionally `context.dispatch`). * Handles paginated results, single items, and arrays transparently. * Use the `dispatch` option to control whether result, dispatch, or both are transformed. * * @example * ```ts * import { mutateResult } from 'feathers-utils/utils' * * await mutateResult(context, (item) => { delete item.password }) * ``` * * @see https://utils.feathersjs.com/utils/mutate-result.html */ declare function mutateResult(context: H, transformer: TransformerInputFn, options?: MutateResultOptions): Promisable; //#endregion export { mutateResult as n, mutateData as r, MutateResultOptions as t }; //# sourceMappingURL=mutate-result.util-DR9JMsvl.d.mts.map