feat: document support rename in in dataset (#4732)

This commit is contained in:
Joel
2024-06-04 15:10:34 +08:00
committed by GitHub
parent 9cf9720efa
commit 96460d5ea3
7 changed files with 195 additions and 17 deletions

View File

@@ -114,6 +114,12 @@ export const fetchDocumentDetail: Fetcher<DocumentDetailResponse, CommonDocReq &
return get<DocumentDetailResponse>(`/datasets/${datasetId}/documents/${documentId}`, { params })
}
export const renameDocumentName: Fetcher<CommonResponse, CommonDocReq & { name: string }> = ({ datasetId, documentId, name }) => {
return post<CommonResponse>(`/datasets/${datasetId}/documents/${documentId}/rename`, {
body: { name },
})
}
export const pauseDocIndexing: Fetcher<CommonResponse, CommonDocReq> = ({ datasetId, documentId }) => {
return patch<CommonResponse>(`/datasets/${datasetId}/documents/${documentId}/processing/pause`)
}