| |
| import type { |
| PermissionAllowDecision, |
| PermissionAskDecision, |
| PermissionDecision, |
| PermissionDecisionReason, |
| PermissionDenyDecision, |
| PermissionMetadata, |
| PermissionResult, |
| } from '../../types/permissions.js' |
|
|
| |
| export type { |
| PermissionAllowDecision, |
| PermissionAskDecision, |
| PermissionDecision, |
| PermissionDecisionReason, |
| PermissionDenyDecision, |
| PermissionMetadata, |
| PermissionResult, |
| } |
|
|
| |
| export function getRuleBehaviorDescription( |
| permissionResult: PermissionResult['behavior'], |
| ): string { |
| switch (permissionResult) { |
| case 'allow': |
| return 'allowed' |
| case 'deny': |
| return 'denied' |
| default: |
| return 'asked for confirmation for' |
| } |
| } |
|
|