You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web/service/knowledge/use-import.ts

17 lines
449 B
TypeScript

import { useQuery } from '@tanstack/react-query'
import { preImportNotionPages } from '../datasets'
type PreImportNotionPagesParams = {
url: string
datasetId?: string
}
export const usePreImportNotionPages = ({ datasetId }: PreImportNotionPagesParams) => {
return useQuery({
queryKey: ['notion-pre-import-pages'],
queryFn: async () => {
return preImportNotionPages({ url: '/notion/pre-import/pages', datasetId })
},
})
}