import { IUser, PermissionsEnum, LanguagesEnum, RolesEnum } from '@metad/contracts'; export declare class RequestContext { readonly id: number; request: Request; response: Response; constructor(request: Request, response: Response); static currentRequestContext(): RequestContext; static currentRequest(): Request; static currentTenantId(): string; static currentUserId(): string; static currentRoleId(): string; static currentUser(throwError?: boolean): IUser; static hasPermission(permission: PermissionsEnum | string, throwError?: boolean): boolean; /** * Retrieves the language code from the headers of the current request. * @returns The language code (LanguagesEnum) extracted from the headers, or the default language (ENGLISH) if not found. */ static getLanguageCode(): LanguagesEnum; static getOrganizationId(): string; static hasPermissions(findPermissions: Array, throwError?: boolean): boolean; static hasAnyPermission(findPermissions: PermissionsEnum[], throwError?: boolean): boolean; static currentToken(throwError?: boolean): any; /** * Checks if the current user has a specific role. * @param {RolesEnum} role - The role to check. * @param {boolean} throwError - Flag indicating whether to throw an error if the role is not granted. * @returns {boolean} - True if the user has the role, otherwise false. */ static hasRole(role: RolesEnum, throwError?: boolean): boolean; /** * Checks if the current request context has any of the specified roles. * * @param roles - An array of roles to check. * @param throwError - Whether to throw an error if no roles are found. * @returns True if any of the required roles are found, otherwise false. */ static hasRoles(roles: RolesEnum[], throwError?: boolean): boolean; }