import type { Authenticatable } from '../contracts/Authenticatable.js'; import type { AuthorizationResponse } from './AuthorizationResponse.js'; type PolicyResult = boolean | AuthorizationResponse | Promise; /** * Base policy with optional `before` / `after` hooks and CRUD-style methods. */ export declare abstract class Policy { /** * Optional global gate executed before any ability method. * * @param user - Current user. * @param ability - Ability name being checked. * @returns `true` allow all, `false` deny, `null`/`undefined` continue to methods. */ before?(user: Authenticatable, ability: string): boolean | null | undefined | Promise; /** * Optional post-hook that may override the resolved boolean. */ after?(user: Authenticatable, ability: string, result: boolean): boolean | undefined | Promise; viewAny?(user: Authenticatable): PolicyResult; view?(user: Authenticatable, model: unknown): PolicyResult; create?(user: Authenticatable): PolicyResult; update?(user: Authenticatable, model: unknown): PolicyResult; delete?(user: Authenticatable, model: unknown): PolicyResult; restore?(user: Authenticatable, model: unknown): PolicyResult; forceDelete?(user: Authenticatable, model: unknown): PolicyResult; } export {}; //# sourceMappingURL=Policy.d.ts.map