import { type CrudAction } from "../../../../fd-toolbox/enums/enums";
import { ResourceMeta } from "../../core/resource-meta";
import { WithId } from "../../../../fd-toolbox-core/types/resource-with-id";
/**
 * Checks if the user has the necessary CRUD permission for a given resource.
 * Notifies if access is denied.
 *
 * @param crudAction - The CRUD action to check
 * @param resourceMeta - Metadata of the resource to check permissions against
 * @param withId - resource instance
 */
export declare function checkAndNotifyCrudPermission(crudAction: CrudAction, resourceMeta: ResourceMeta, withId?: WithId): boolean;
/**
 * Performs a preliminary check for CRUD permissions on a resource,
 * using a less restrictive policy that doesn't rely on specific user or workspace Ids.
 *
 * This method is typically used in early stages of access validation,
 * before more specific checks that use the resource are available.
 *
 * It grants access if the user either:
 * - has the required permission directly, or
 * - could potentially be allowed based on broader rules, for example
 *   {@link accessByWorkspaceId} or {@link accessByUserId}.
 *
 * Notifies if access is denied.
 *
 * Example use case:
 * You have a resource that supports access by workspace Id  or user Id ,
 * but at the moment of checking, you only know the resource type and general metadata.
 * This function allows you to perform a first-pass check before resolving more detailed access rules.
 *
 * @param crudAction - The CRUD action to check
 * @param resourceMeta - Metadata of the resource to check permissions against
 */
export declare function checkAndNotifyCrudPermissionLessRestrictive(crudAction: CrudAction, resourceMeta: ResourceMeta): boolean;
