(workspaceId?: string)
| 678 | } |
| 679 | |
| 680 | export function useDeleteKnowledgeBase(workspaceId?: string) { |
| 681 | const queryClient = useQueryClient() |
| 682 | |
| 683 | return useMutation({ |
| 684 | mutationFn: deleteKnowledgeBase, |
| 685 | onSettled: (_data, _error, variables) => { |
| 686 | queryClient.invalidateQueries({ |
| 687 | queryKey: knowledgeKeys.lists(), |
| 688 | }) |
| 689 | queryClient.invalidateQueries({ |
| 690 | queryKey: knowledgeKeys.detail(variables.knowledgeBaseId), |
| 691 | }) |
| 692 | }, |
| 693 | }) |
| 694 | } |
| 695 | |
| 696 | interface BulkChunkOperationParams { |
| 697 | knowledgeBaseId: string |
no outgoing calls
no test coverage detected