import type { Context, Next } from "hono"; import type { Action, PermissionContext, Resource } from "./types"; import { ForbiddenError } from "./types"; export interface RequirePermissionOptions { onDenied?: (c: Context, error: ForbiddenError) => Response | Promise; extractSubject?: (c: Context) => unknown; } export declare function requirePermission(action: Action, resource: Resource, options?: RequirePermissionOptions): (c: Context, next: Next) => Promise; export declare function attachPermissionContext(extractUser: (c: Context) => PermissionContext | Promise): (c: Context, next: Next) => Promise)>; //# sourceMappingURL=middleware.d.ts.map