MCPcopy Index your code
hub / github.com/callstack/agent-device / parsePermissionAction

Function parsePermissionAction

src/platforms/permission-utils.ts:40–46  ·  view source on GitHub ↗
(action: string)

Source from the content-addressed store, hash-verified

38];
39
40export function parsePermissionAction(action: string): PermissionAction {
41 const normalized = action.trim().toLowerCase();
42 if (normalized === 'grant') return 'grant';
43 if (normalized === 'deny') return 'deny';
44 if (normalized === 'reset') return 'reset';
45 throw new AppError('INVALID_ARGS', `Invalid permission action: ${action}. Use grant|deny|reset.`);
46}
47
48export function parsePermissionTarget(value: string | undefined): PermissionTarget {
49 const normalized = value?.trim().toLowerCase();

Callers 2

setAndroidSettingFunction · 0.90
setIosSettingFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected