26 lines
792 B
TypeScript
26 lines
792 B
TypeScript
/**
|
|
* 入库任务 & 分类任务 API
|
|
*/
|
|
import apiClient from "../client"
|
|
import type { IngestJob, ClassificationJob } from "./types"
|
|
|
|
/** 查询入库任务状态 */
|
|
export const getIngestJob = async (jobId: string): Promise<IngestJob> => {
|
|
const response = await apiClient.get(`/ingest-jobs/${jobId}`)
|
|
return response.data
|
|
}
|
|
|
|
/** 提交素材分类任务 */
|
|
export const submitClassificationJob = async (data: {
|
|
asset_id: string
|
|
}): Promise<ClassificationJob> => {
|
|
const response = await apiClient.post("/classification-jobs", data)
|
|
return response.data
|
|
}
|
|
|
|
/** 查询分类任务状态 */
|
|
export const getClassificationJob = async (jobId: string): Promise<ClassificationJob> => {
|
|
const response = await apiClient.get(`/classification-jobs/${jobId}`)
|
|
return response.data
|
|
}
|