import { NextContextBase } from "../NextContext"; import { NextAuthorizationBase } from "./NextAuthorizationBase"; import { NextPermissionDefinition } from './NextPermission'; export interface NextRole { Id: any; Name: string; } export interface NextPermission { Id: any; Path: string; } export interface NextUser { Id: any; } export interface NextTeam { Id: any; Name: string; } export interface AuthorizedRecordResult { success: boolean; data: any; name?: string; } export type RetrieveAuthorizedRecord = (ctx: NextContextBase, user: NextUser, role: NextRole, permissions: NextPermission[]) => Promise; export type RetrieveCurrentUserDelegate = (ctx: NextContextBase) => Promise; export type RetrieveUserRoleDelegate = (ctx: NextContextBase, UserId: any) => Promise; export type RetrieveRolePermissionDelegate = (ctx: NextContextBase, RoleId: any) => Promise; export type RetrieveUserTeamsDelegate = (ctx: NextContextBase, UserId: any) => Promise; export type RetrieveTeamPermissionsDelegate = (ctx: NextContextBase, TeamId: any) => Promise; export type ModifyRequestedPathDelegate = (requestPath: string) => string; export declare class NextAuthorization extends NextAuthorizationBase { retrieveCurrentUser?: RetrieveCurrentUserDelegate; retrieveUserRole?: RetrieveUserRoleDelegate; retrieveRolePermissions?: RetrieveRolePermissionDelegate; retrieveAuthorizedRecord?: RetrieveAuthorizedRecord; modifyRequestedPath?: ModifyRequestedPathDelegate; retrieveUserTeams?: RetrieveUserTeamsDelegate; retrieveTeamPermissions?: RetrieveTeamPermissionsDelegate; enableTeamAuthorization: boolean; private pathMatcherCache; constructor(); init(): Promise; private hasPermissionForPath; private normalizePath; private normalizePattern; private getMatcher; check(ctx: NextContextBase, permission: NextPermissionDefinition): Promise; } //# sourceMappingURL=NextAuthorization.d.ts.map