/** * The class manages the interaction between the user and the database entry, taking into account user permissions and the main config file settings. */ import { Entity } from "../interfaces/types"; import { ActionType } from "../interfaces/adminpanelConfig"; import { Fields } from "../helpers/fieldsHelper"; import { Adminizer } from "./Adminizer"; import { UserAP } from "../models/UserAP"; export declare class DataAccessor { readonly adminizer: Adminizer; user: UserAP; entity: Entity; action: ActionType; private fields; private actionVerb; constructor(adminizer: Adminizer, user: UserAP, entity: Entity, action: ActionType); private getModelConfig; /** * Retrieves the fields for the given entity based on action type, * taking into account access rights and configuration settings. * @returns {Fields} An object with configured fields and their properties. */ getFieldsConfig(): Fields; private getAssociatedFieldsConfig; private checkFieldAccess; /** * Returns filtered record applying config from this.fields on this record * @data - record from a specific model */ process(record: T): Partial; /** Filters associated records (simplified process() function) */ private filterAssociatedRecord; /** Process for an array of records */ processMany(records: T[]): Partial[]; sanitizeUserRelationAccess(criteria: T): Promise>; setUserRelationAccess(record: T): Promise>; }