import { PopulateConfig, PopulateConfigWithoutStringSyntax } from '../types/mongoDbTypes.js'; import { DaoGenericMethods, MaskHook, DaoHookSharedParsed } from '../../../types/core.types.js'; import { AllDbIds } from '../../../cache/dbs/index.generated.js'; export type Mask = DaoHookSharedParsed & MaskHook; export declare function applyMaskIncludingOnPopulatedFieldsRecursive>(ctx: Ctx, method: DaoGenericMethods, dbName: AllDbIds, modelName: ModelName, fields: T, recursive?: boolean): Promise; export declare function applyMaskOnObjectForUser>(ctx: Ctx, dbName: AllDbIds, modelName: string, method: DaoGenericMethods, obj: T): Promise; /** @returns array of field adresses like `organization.team[0].name` /!\ it will not return fields with mongo format, organization.team[0].name should be transformed to organization.team.name * * Note that _id field is never present in neither mask nor select * NOTE 2 /!\ IF THERE IS A SELECT, THE SELECT WINS OVER THE MASK */ export declare function combineMaskHooksAndReturnMaskOrSelectAddrArray(ctx: Ctx, dbName: AllDbIds, modelName: string, maskHooks: Mask[], method: DaoGenericMethods): Promise<{ mask: string[]; }>; export declare function applyMaskToPopulateConfig(ctx: Ctx, conf: PopulateConfig[], dbName: AllDbIds, baseModelName: string, method: DaoGenericMethods): Promise[]>; export declare function getMaskFromSelect(selectArr: string[], dbName: string, modelName: string): Promise; /** @returns mongo select array to put in .select() (Eg. ['name', 'phone']) no negative ('-feldName') will be returned */ export declare function getMongoMaskForUser(ctx: Ctx, method: DaoGenericMethods, dbName: AllDbIds, modelName: string): Promise;