Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

540 B
Raw Blame
import type { DocumentDownloadZipRequest } from '../datasets'
import { useMutation } from '@tanstack/react-query'
import { downloadDocumentsZip } from '../datasets'

export const useDocumentDownloadZip = (options?: { silent?: boolean }) => {
  return useMutation({
    mutationFn: ({ datasetId, documentIds }: DocumentDownloadZipRequest) => {
      if (!datasetId || !documentIds?.length)
        throw new Error('datasetId and documentIds are required')
      return downloadDocumentsZip({ datasetId, documentIds }, options)
    },
  })
}