🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804)

This commit is contained in:
Danny Avila 2025-06-23 10:54:25 -04:00
parent d471209ced
commit c6d4629fd1
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
99 changed files with 11318 additions and 621 deletions

View file

@ -54,7 +54,7 @@ export const useListAgentsQuery = <TData = t.AgentListResponse>(
};
/**
* Hook for retrieving details about a single agent
* Hook for retrieving basic details about a single agent (VIEW permission)
*/
export const useGetAgentByIdQuery = (
agent_id: string,
@ -212,3 +212,26 @@ export const useSearchAgentsQuery = <TData = t.AgentListResponse>(
},
);
};
/**
* Hook for retrieving full agent details including sensitive configuration (EDIT permission)
*/
export const useGetExpandedAgentByIdQuery = (
agent_id: string,
config?: UseQueryOptions<t.Agent>,
): QueryObserverResult<t.Agent> => {
return useQuery<t.Agent>(
[QueryKeys.agent, agent_id, 'expanded'],
() =>
dataService.getExpandedAgentById({
agent_id,
}),
{
refetchOnWindowFocus: false,
refetchOnReconnect: false,
refetchOnMount: false,
retry: false,
...config,
},
);
};