feature: scim group org role mapping

This commit is contained in:
Scott Wilson
2024-10-15 07:57:26 -07:00
parent bda0681dee
commit 8c4a26b0e2
26 changed files with 802 additions and 41 deletions
@@ -0,0 +1,19 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { apiRequest } from "@app/config/request";
import { externalGroupOrgRoleMappingKeys } from "@app/hooks/api/externalGroupOrgRoleMappings/queries";
import { TSyncExternalGroupOrgRoleMappingsDTO } from "@app/hooks/api/externalGroupOrgRoleMappings/types";
export const useUpdateExternalGroupOrgRoleMappings = () => {
const queryClient = useQueryClient();
return useMutation({
mutationFn: async (payload: TSyncExternalGroupOrgRoleMappingsDTO) => {
const { data } = await apiRequest.post("/api/v1/external-group-mappings", payload);
return data;
},
onSuccess: () => {
queryClient.invalidateQueries(externalGroupOrgRoleMappingKeys.list());
}
});
};