import type { RBACInstance } from '../types';
import { BaseMiddlewareOptions } from './types';
import { NestExecutionContext } from './nest.types';
import type { NestNextFunction, NestResponse } from './nest.types';
export interface NestOptions<P = unknown> extends BaseMiddlewareOptions<P> {
    getRole?: (req: NestExecutionContext) => string;
    getParams?: (req: NestExecutionContext) => P;
    onDenied?: (req: NestExecutionContext, res: NestResponse, next: NestNextFunction) => void;
}
export declare const createNestMiddleware: <P>(rbac: RBACInstance<P>) => (operation: string | RegExp, options?: NestOptions<P>) => (req: NestExecutionContext, res: NestResponse, next: NestNextFunction) => Promise<void>;
export default createNestMiddleware;
