|
|
|
@@ -11,10 +11,12 @@ import { |
|
|
|
deleteModelVersion, |
|
|
|
editDatasetVersion, |
|
|
|
editModelVersion, |
|
|
|
getDatasetFileUrlReq, |
|
|
|
getDatasetInfo, |
|
|
|
getDatasetList, |
|
|
|
getDatasetNextVersionReq, |
|
|
|
getDatasetVersionList, |
|
|
|
getModelFileUrlReq, |
|
|
|
getModelInfo, |
|
|
|
getModelList, |
|
|
|
getModelNextVersionReq, |
|
|
|
@@ -48,6 +50,7 @@ type ResourceTypeInfo = { |
|
|
|
compareVersion: (params: any) => Promise<any>; // 版本对比 |
|
|
|
getNextVersion: (params: any) => Promise<any>; // 获取下一个版本 |
|
|
|
publish: (params: any) => Promise<any>; // 发布 |
|
|
|
getFileUrl: (params: any) => Promise<any>; // 获取文件地址 |
|
|
|
name: string; // 名称 |
|
|
|
typeParamKey: 'data_type' | 'model_type'; // 类型参数名称,获取资源列表接口使用 |
|
|
|
tagParamKey: 'data_tag' | 'model_tag'; // 标签参数名称,获取资源列表接口使用 |
|
|
|
@@ -80,6 +83,7 @@ export const resourceConfig: Record<ResourceType, ResourceTypeInfo> = { |
|
|
|
compareVersion: compareDatasetVersion, |
|
|
|
getNextVersion: getDatasetNextVersionReq, |
|
|
|
publish: publishDatasetReq, |
|
|
|
getFileUrl: getDatasetFileUrlReq, |
|
|
|
name: '数据集', |
|
|
|
typeParamKey: 'data_type', |
|
|
|
tagParamKey: 'data_tag', |
|
|
|
@@ -121,6 +125,7 @@ export const resourceConfig: Record<ResourceType, ResourceTypeInfo> = { |
|
|
|
compareVersion: compareModelVersion, |
|
|
|
getNextVersion: getModelNextVersionReq, |
|
|
|
publish: publishModelReq, |
|
|
|
getFileUrl: getModelFileUrlReq, |
|
|
|
name: '模型', |
|
|
|
typeParamKey: 'model_type', |
|
|
|
tagParamKey: 'model_tag', |
|
|
|
|