import { Model } from "@decaf-ts/decorator-validation"; import { RelationsMetadata } from "../model"; import { RamRepository } from "./types"; import { RamContext } from "./types"; /** * @description Sets the created by field on a model during RAM create/update operations * @summary Automatically populates a model field with the UUID from the context during create or update operations. * This function is designed to be used as a handler for RAM operations to track entity creation. * @template M - Type of the model being created/updated * @template R - Type of the repository handling the model * @template V - Type of the relations metadata * @template F - Type of the RAM flags * @template C - Type of the context * @param {R} this - The repository instance * @param {Context} context - The operation context containing user identification * @param {V} data - The relations metadata * @param key - The property key to set with the UUID * @param {M} model - The model instance being created/updated * @return {Promise} A promise that resolves when the field has been set * @function createdByOnRamCreateUpdate * @memberOf module:core * @category Ram */ export declare function createdByOnRamCreateUpdate>(this: R, context: RamContext, data: RelationsMetadata, key: keyof M, model: M): Promise;