import { type Container } from "@webiny/di"; import type { SecurityIdentity, SecurityPermission } from "../../types/security.js"; import { Authenticator } from "../../features/security/authentication/Authenticator/index.js"; /** * Legacy bridge that implements the old Security interface. * As we implement each phase, we'll replace forwarding with delegation. */ export declare class LegacyContext { private container; constructor(container: Container); private get identityContext(); private get authenticationContext(); addAuthenticator(authenticator: Authenticator.Interface["authenticate"]): void; authenticate(token: string): Promise; getIdentity(): SecurityIdentity; setIdentity(identity: SecurityIdentity): void; getToken(): string | undefined; isAuthorizationEnabled(): boolean; withoutAuthorization(cb: () => Promise): Promise; withIdentity(identity: SecurityIdentity | undefined, cb: () => Promise): Promise; getPermission(permission: string): Promise; getPermissions(permission: string): Promise; listPermissions(): Promise; hasFullAccess(): Promise; getRole(params: any): Promise; listRoles(params?: any): Promise; createRole(input: any): Promise; updateRole(id: string, input: any): Promise; deleteRole(id: string): Promise; addAuthorizer(authorizer: any): void; getTeam(params: any): Promise; listTeams(params?: any): Promise; createTeam(input: any): Promise; updateTeam(id: string, input: any): Promise; deleteTeam(id: string): Promise; }