Merge branch 'heads/main' into daniel/ms-teams-integration

This commit is contained in:
Daniel Hougaard
2025-04-28 05:08:04 +04:00
248 changed files with 5901 additions and 547 deletions
+26 -3
View File
@@ -37,6 +37,7 @@ import {
TListProjectIdentitiesDTO,
ToggleAutoCapitalizationDTO,
ToggleDeleteProjectProtectionDTO,
TProjectSshConfig,
TSearchProjectsDTO,
TUpdateWorkspaceIdentityRoleDTO,
TUpdateWorkspaceUserRoleDTO,
@@ -433,9 +434,13 @@ export const useDeleteWsEnvironment = () => {
});
};
export const useGetWorkspaceUsers = (workspaceId: string, includeGroupMembers?: boolean) => {
export const useGetWorkspaceUsers = (
workspaceId: string,
includeGroupMembers?: boolean,
roles?: string[]
) => {
return useQuery({
queryKey: workspaceKeys.getWorkspaceUsers(workspaceId),
queryKey: workspaceKeys.getWorkspaceUsers(workspaceId, includeGroupMembers, roles),
queryFn: async () => {
const {
data: { users }
@@ -443,7 +448,11 @@ export const useGetWorkspaceUsers = (workspaceId: string, includeGroupMembers?:
`/api/v1/workspace/${workspaceId}/users`,
{
params: {
includeGroupMembers
includeGroupMembers,
roles:
roles && roles.length > 0
? roles.map((role) => encodeURIComponent(role)).join(",")
: undefined
}
}
);
@@ -896,3 +905,17 @@ export const useGetWorkspaceWorkflowIntegrationConfig = ({
enabled: Boolean(workspaceId)
});
};
export const useGetProjectSshConfig = (projectId: string) => {
return useQuery({
queryKey: workspaceKeys.getProjectSshConfig(projectId),
queryFn: async () => {
const { data } = await apiRequest.get<TProjectSshConfig>(
`/api/v1/workspace/${projectId}/ssh-config`
);
return data;
},
enabled: Boolean(projectId)
});
};