export interface HrmsPermissionNode { canView?: boolean; canViewById?: boolean; canAdd?: boolean; canEdit?: boolean; canDelete?: boolean; /** * Field names the current user is NOT allowed to see on this resource. * Populated from the `r + :param` entry's `attributes.not_allowed` array. * Falls back to the `r + :nop` entry when no :param entry exists (old format). */ notAllowedAttributes?: string[]; /** * Filter keys the current user is NOT allowed to apply on this resource. * Populated from the `r + :param` entry's `filters.not_allowed` array. * Falls back to the `r + :nop` entry when no :param entry exists (old format). */ notAllowedFilters?: string[]; /** * Dynamic action map for compound operations that are NOT nested sub-resources. * Key = camelCase of the named segments extracted from the operation. * * Examples (standalone actions — no /:paramId sibling): * ":param/status" → actions.status * ":param/send" → actions.send * ":param/documents/:param_id/verify" → actions.documentsVerify * "public/welcome/:param/reject" → sub-node "publicWelcome".actions.reject * * Sub-resources (operations that ALSO have a /:paramId variant) get their own * HrmsPermissionNode instead of a key in actions: * ":param/response" + ":param/response/:paramId" → response.canView / canAdd / canViewById / canEdit / canDelete */ actions?: Record; [subRoute: string]: HrmsPermissionNode | boolean | Record | string[] | undefined; } export type HrmsPermissionTree = Record; export declare function buildHrmsPermissionTree(raw: Record): HrmsPermissionTree;