import type { Container } from '@pondoknusa/container'; import type { Constructor } from '@pondoknusa/container'; import type { Authenticatable } from './types.js'; import type { PolicyConstructor } from './types.js'; export declare class Gate { private readonly container; private readonly policyMap; constructor(container: Container, policies?: Record); policy(model: Constructor, policy: PolicyConstructor): this; allows(user: Authenticatable | null, ability: string, model?: unknown): Promise; authorize(user: Authenticatable | null, ability: string, model?: unknown): Promise; denyUnless(user: Authenticatable | null, ability: string, model?: unknown): Promise; private resolvePolicy; } export declare function createAuthorizeMiddleware(gate: Gate, ability: string, resolveModel?: (request: import('@pondoknusa/http').PondoknusaRequest) => Promise | unknown): import('@pondoknusa/http').Middleware; //# sourceMappingURL=gate.d.ts.map