import { HDict, HGrid } from 'haystack-core'; import { Client, Watch } from 'haystack-nclient'; export declare const DEFAULT_USER_ROLE_TAG_NAME = "uiElementPermissions"; export interface ResolverData { /** * Haystack client for network communication */ client: Client; /** * Current user dict, used to check permissions */ user?: HDict; /** * Name of the tag that is expected on the user dict to define its role */ userRoleTagName?: string; /** * Function name to be used for expressions eval, * used to enable custom backend permission check using elements path * @example * customEval(\`page/section/elementName\`, parametersDict) */ evalFuncName?: string; } /** * Resolver is a mediator for the network interactions during the resolution process, * in order to enable future optimizations and extra features */ export declare class Resolver implements ResolverData { constructor({ client, user, userRoleTagName, evalFuncName, }: ResolverData); client: Client; user?: HDict; userRoleTagName?: string; evalFuncName?: string; read(filter: string): Promise>; makeWatch(dis: string, grid: HGrid): Promise; /** * Eval an expression using either the provided path or otherwse directly the expression * Providing the path allows for whitelisting of certain functions to specific user roles */ evalExprElement(expr: string, parameters: HDict, path?: string): Promise>; private _buildExpression; /** * Evaluate an expression */ private _eval; }