UNPKG

@forestadmin/forestadmin-client

Version:

This package contains the logic to use the ForestAdmin API inside an agent.

20 lines 1.08 kB
import type { RawTreeWithSources } from './types'; import type { ForestAdminClientOptionsWithDefaults } from '../types'; import { ForestAdminServerInterface } from '../types'; export default class ActionPermissionService { private readonly options; private readonly forestAdminServerInterface; private permissionsCache; constructor(options: ForestAdminClientOptionsWithDefaults, forestAdminServerInterface: ForestAdminServerInterface); isDevelopmentPermission(): Promise<boolean>; can(roleId: number, actionName: string): Promise<boolean>; private hasPermissionOrRefetch; private isAllowed; private getPermissions; private fetchEnvironmentPermissions; getCustomActionCondition(roleId: number, actionName: string): Promise<RawTreeWithSources | undefined>; getAllCustomActionConditions(actionName: string): Promise<Map<number, RawTreeWithSources> | undefined>; getRoleIdsAllowedToApproveWithoutConditions(actionName: string): Promise<Array<number>>; invalidateCache(): void; } //# sourceMappingURL=action-permission.d.ts.map