@blueking/ai-ui-sdk 0.1.19-beta.1 → 0.1.19-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/render-auth/auth-dialog.vue.d.ts +2 -1
- package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.d.ts +2 -1
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.vue.css +9 -8
- package/dist/components/render-auto-refresh/index.vue.d.ts +2 -1
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-checkbox/index.vue.css +9 -9
- package/dist/components/render-checkbox/index.vue.d.ts +2 -1
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.script.vue.js.js +15 -4
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.d.ts +5 -1
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.d.ts +3 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-review-dataset-data/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/dataset-data-level/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/dataset-data-status/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset/components/operation-record/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/dataset-footer.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +5 -2
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.d.ts +4 -2
- package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +2 -2
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset/index.vue.d.ts +4 -3
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/category.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.vue.d.ts +4 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/file.vue.d.ts +4 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.d.ts +4 -2
- package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/index.vue.d.ts +4 -3
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/search-dataset/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/search-dataset-data/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/search-operation-record/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/source-type-icon/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/index.script.vue.js +5 -0
- package/dist/components/render-dataset/index.vue.d.ts +2 -6
- package/dist/components/render-dataset/index.vue.js +2 -3
- package/dist/components/render-dataset-detail/components/header.script.vue.js.js +2 -4
- package/dist/components/render-dataset-detail/components/header.vue.d.ts +4 -2
- package/dist/components/render-dataset-detail/components/tab.vue.d.ts +2 -1
- package/dist/components/render-dataset-detail/index.vue.d.ts +2 -1
- package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.vue.d.ts +2 -1
- package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.d.ts +4 -2
- package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
- package/dist/components/render-dataset-detail-origin-data/index.vue.d.ts +2 -1
- package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
- package/dist/components/render-dataset-list/components/header.script.vue.js.js +60 -15
- package/dist/components/render-dataset-list/components/header.vue.d.ts +16 -1
- package/dist/components/render-dataset-list/components/main.script.vue.js.js +35 -9
- package/dist/components/render-dataset-list/components/main.vue.css +4 -4
- package/dist/components/render-dataset-list/components/main.vue.d.ts +15 -6
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/components/table.script.vue.js.js +46 -13
- package/dist/components/render-dataset-list/components/table.vue.d.ts +15 -3
- package/dist/components/render-dataset-list/index.script.vue.js.js +111 -17
- package/dist/components/render-dataset-list/index.vue.css +5 -0
- package/dist/components/render-dataset-list/index.vue.d.ts +2 -8
- package/dist/components/render-dataset-list/index.vue.js +2 -0
- package/dist/components/render-file-card/index.vue.css +11 -11
- package/dist/components/render-file-card/index.vue.d.ts +8 -7
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +5 -5
- package/dist/components/render-file-type-icon/index.vue.d.ts +2 -1
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-header/index.script.vue.js.js +46 -54
- package/dist/components/render-header/index.vue.css +6 -27
- package/dist/components/render-header/index.vue.d.ts +19 -49
- package/dist/components/render-header/index.vue.js +1 -1
- package/dist/components/render-like/index.vue.css +5 -5
- package/dist/components/render-like/index.vue.d.ts +6 -5
- package/dist/components/render-like/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.vue.css +3 -3
- package/dist/components/render-router-tab/index.vue.d.ts +2 -1
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/components/render-search-select/index.vue.d.ts +8 -7
- package/dist/components/render-tag-tree/index.script.vue.js.js +143 -0
- package/dist/components/render-tag-tree/index.vue.css +30 -0
- package/dist/components/render-tag-tree/index.vue.d.ts +22 -0
- package/dist/components/render-tag-tree/index.vue.js +5 -0
- package/dist/components/render-tree/index.script.vue.js +162 -0
- package/dist/components/render-tree/index.vue.css +24 -0
- package/dist/components/render-tree/index.vue.d.ts +43 -0
- package/dist/components/render-tree/index.vue.js +4 -0
- package/dist/components.d.ts +3 -1
- package/dist/components.ts.js +3 -1
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.svg +6 -0
- package/dist/css/fonts/iconcool.ttf +0 -0
- package/dist/css/fonts/iconcool.woff +0 -0
- package/dist/css/iconcool.js +1 -1
- package/dist/css/style.css +6 -0
- package/dist/css/tailwind.css +1 -1
- package/dist/hooks/use-chat.d.ts +2 -0
- package/dist/hooks/use-common-http.d.ts +5 -0
- package/dist/hooks/use-common-http.ts.js +16 -0
- package/dist/hooks/use-dataset-http.d.ts +2 -1
- package/dist/hooks/use-dataset-http.ts.js +3 -1
- package/dist/hooks/use-meta-http.d.ts +1 -1
- package/dist/hooks/use-meta-http.ts.js +3 -1
- package/dist/hooks/use-table.d.ts +2 -7
- package/dist/hooks/use-table.ts.js +3 -3
- package/dist/http/helper/common.d.ts +25 -0
- package/dist/http/helper/common.ts.js +45 -0
- package/dist/http/helper/dataset.ts.js +10 -17
- package/dist/http/helper/model.ts.js +4 -4
- package/dist/http/helper/tool.ts.js +2 -0
- package/dist/transforms.d.ts +1 -0
- package/dist/transforms.ts.js +1 -0
- package/dist/types/common.d.ts +37 -4
- package/dist/types/dataset.d.ts +12 -10
- package/dist/types/enum.d.ts +13 -1
- package/dist/types/enum.ts.js +14 -0
- package/dist/types/model.d.ts +8 -8
- package/dist/types/tool.d.ts +2 -0
- package/package.json +2 -2
- package/dist/components/render-aside/index.script.vue.js +0 -69
- package/dist/components/render-aside/index.vue.css +0 -49
- package/dist/components/render-aside/index.vue.d.ts +0 -26
- package/dist/components/render-aside/index.vue.js +0 -5
- package/dist/components/render-dataset/index.script.vue.js.js +0 -126
- package/dist/components/render-dataset/index.vue.css +0 -6
- package/dist/components/render-expand-collapse/index.script.vue.js.js +0 -33
- package/dist/components/render-expand-collapse/index.vue.css +0 -23
- package/dist/components/render-expand-collapse/index.vue.d.ts +0 -12
- package/dist/components/render-expand-collapse/index.vue.js +0 -5
package/dist/css/tailwind.css
CHANGED
package/dist/hooks/use-chat.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
|
|
|
95
95
|
updateTime: string;
|
|
96
96
|
toolCode: string;
|
|
97
97
|
toolName: string;
|
|
98
|
+
tagNames: string[][];
|
|
98
99
|
icon: string;
|
|
99
100
|
description: string;
|
|
100
101
|
method: string;
|
|
@@ -585,6 +586,7 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
|
|
|
585
586
|
updateTime: string;
|
|
586
587
|
toolCode: string;
|
|
587
588
|
toolName: string;
|
|
589
|
+
tagNames: string[][];
|
|
588
590
|
icon: string;
|
|
589
591
|
description: string;
|
|
590
592
|
method: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { GroupType, Module } from '@/types/enum';
|
|
3
|
+
export declare const useCommonHttp: (apiPrefix: string, spaceId?: Ref<string>) => {
|
|
4
|
+
getTagTree: (module: Module, subModule: Module, tagName: string, groupType?: GroupType) => Promise<import("@/types/common").ITagTree>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import fetch from '../http/fetch/index.ts.js';
|
|
2
|
+
import { transferTagTreeApiToTagTree } from '../http/helper/common.ts.js';
|
|
3
|
+
export const useCommonHttp = (apiPrefix, spaceId)=>{
|
|
4
|
+
// 获取标签树
|
|
5
|
+
const getTagTree = (module, subModule, tagName, groupType)=>fetch.get(`${apiPrefix}/${module}/v1/${subModule}/tag_tree/`, {
|
|
6
|
+
tag_name: tagName,
|
|
7
|
+
group_type: groupType
|
|
8
|
+
}, {
|
|
9
|
+
headers: {
|
|
10
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
11
|
+
}
|
|
12
|
+
}).then((data)=>transferTagTreeApiToTagTree(data));
|
|
13
|
+
return {
|
|
14
|
+
getTagTree
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import type { IBatchRetryReviewDatasetData, IBatchReviewDatasetData, IComponent, IDatasetApi, IDatasetDataApi, IDatasetDataForm, IDatasetDataParam, IDatasetForm, IDatasetInfo, IDatasetListParam, IDatasetStatusInfo, IOperatRecordParam, ISchema, IUserInfoForm } from '@/types/dataset';
|
|
3
|
+
import { Module } from '@/types/enum';
|
|
3
4
|
import type { ITagApi } from '@/types/meta';
|
|
4
5
|
export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>) => {
|
|
5
6
|
getCompanyList: () => Promise<import("@/types/dataset").ICompany[]>;
|
|
@@ -45,7 +46,7 @@ export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>)
|
|
|
45
46
|
}>;
|
|
46
47
|
batchReviewDatasetData: (data: IBatchReviewDatasetData) => Promise<unknown>;
|
|
47
48
|
batchRetryReviewDatasetData: (data: IBatchRetryReviewDatasetData) => Promise<unknown>;
|
|
48
|
-
getTags: () => Promise<import("@/types/meta").ITag[]>;
|
|
49
|
+
getTags: (module: Module) => Promise<import("@/types/meta").ITag[]>;
|
|
49
50
|
plusTag: (tagNames: string[][]) => Promise<ITagApi>;
|
|
50
51
|
checkTag: (tagNames: string[][]) => Promise<boolean>;
|
|
51
52
|
};
|
|
@@ -202,7 +202,9 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
|
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
204
|
// 获取tag列表
|
|
205
|
-
const getTags = ()=>fetch.get(`${apiPrefix}/${datasetPerfix}/tag/`,
|
|
205
|
+
const getTags = (module)=>fetch.get(`${apiPrefix}/${datasetPerfix}/tag/`, {
|
|
206
|
+
scope_name: module
|
|
207
|
+
}, {
|
|
206
208
|
headers: {
|
|
207
209
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
208
210
|
}
|
|
@@ -10,7 +10,7 @@ export declare const useMetaHttp: (apiPrefix: string, spaceId?: Ref<string>) =>
|
|
|
10
10
|
data: boolean;
|
|
11
11
|
message: string;
|
|
12
12
|
}>;
|
|
13
|
-
getTags: () => Promise<import("@/types/meta").ITag[]>;
|
|
13
|
+
getTags: (module: Module) => Promise<import("@/types/meta").ITag[]>;
|
|
14
14
|
plusTag: (tagNames: string[][]) => Promise<ITagApi>;
|
|
15
15
|
checkTag: (tagNames: string[][]) => Promise<boolean>;
|
|
16
16
|
};
|
|
@@ -51,7 +51,9 @@ export const useMetaHttp = (apiPrefix, spaceId)=>{
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
// 获取tag列表
|
|
54
|
-
const getTags = ()=>fetch.get(`${apiPrefix}/${metaPerfix}/tag/`,
|
|
54
|
+
const getTags = (module)=>fetch.get(`${apiPrefix}/${metaPerfix}/tag/`, {
|
|
55
|
+
scope_name: module
|
|
56
|
+
}, {
|
|
55
57
|
headers: {
|
|
56
58
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
57
59
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
limit: number;
|
|
4
|
-
order_by: string;
|
|
5
|
-
order_method: string;
|
|
6
|
-
}
|
|
7
|
-
type CallBack = (params: CallBackParams) => Promise<unknown>;
|
|
1
|
+
import type { IPaginationParam, ISortParam } from '@/types/common';
|
|
2
|
+
type CallBack = (params: IPaginationParam & ISortParam) => Promise<unknown>;
|
|
8
3
|
declare const _default: <T>(callBack: CallBack, key?: string, defaultPagination?: {
|
|
9
4
|
current: number;
|
|
10
5
|
limit: number;
|
|
@@ -23,9 +23,9 @@ export default ((callBack, key = 'results', defaultPagination = {
|
|
|
23
23
|
// 拉取数据
|
|
24
24
|
return callBack({
|
|
25
25
|
page: pagination.value.current,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
pageSize: pagination.value.limit,
|
|
27
|
+
orderBy: sort.value,
|
|
28
|
+
orderMethod: order.value
|
|
29
29
|
}).then((listResult)=>{
|
|
30
30
|
tableData.value = (listResult === null || listResult === void 0 ? void 0 : listResult[key]) || [];
|
|
31
31
|
pagination.value.count = (listResult === null || listResult === void 0 ? void 0 : listResult.count) || 0;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IPaginationParam, IPaginationParamApi, ISortParam, ISortParamApi, ITagTree, ITagTreeApi, ITagTreeNode, ITagTreeNodeApi } from '@/types/common';
|
|
2
|
+
/**
|
|
3
|
+
* 接口转换为ui使用
|
|
4
|
+
* @param data ITagsTreeApi
|
|
5
|
+
* @returns ITagsTree
|
|
6
|
+
*/
|
|
7
|
+
export declare const transferTagTreeApiToTagTree: (data: ITagTreeApi) => ITagTree;
|
|
8
|
+
/**
|
|
9
|
+
* 接口转换为ui使用
|
|
10
|
+
* @param data ITagsTreeNodeApi
|
|
11
|
+
* @returns ITagsTreeNode
|
|
12
|
+
*/
|
|
13
|
+
export declare const transferTagTreeNodeApiToTagTreeNode: (data: ITagTreeNodeApi) => ITagTreeNode;
|
|
14
|
+
/**
|
|
15
|
+
* ui转换为接口使用
|
|
16
|
+
* @param data IPaginationParam
|
|
17
|
+
* @returns IPaginationParamApi
|
|
18
|
+
*/
|
|
19
|
+
export declare const transferIPaginationParamToIPaginationParamApi: (data: IPaginationParam) => IPaginationParamApi;
|
|
20
|
+
/**
|
|
21
|
+
* ui转换为接口使用
|
|
22
|
+
* @param data ISortParam
|
|
23
|
+
* @returns ISortParamApi
|
|
24
|
+
*/
|
|
25
|
+
export declare const transferISortParamToISortParamApi: (data: ISortParam) => ISortParamApi;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 接口转换为ui使用
|
|
3
|
+
* @param data ITagsTreeApi
|
|
4
|
+
* @returns ITagsTree
|
|
5
|
+
*/ export const transferTagTreeApiToTagTree = (data)=>{
|
|
6
|
+
return {
|
|
7
|
+
all: data.all,
|
|
8
|
+
tree: data.tree.map(transferTagTreeNodeApiToTagTreeNode)
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 接口转换为ui使用
|
|
13
|
+
* @param data ITagsTreeNodeApi
|
|
14
|
+
* @returns ITagsTreeNode
|
|
15
|
+
*/ export const transferTagTreeNodeApiToTagTreeNode = (data)=>{
|
|
16
|
+
var _data_children;
|
|
17
|
+
return {
|
|
18
|
+
tagName: data.tag_name,
|
|
19
|
+
tagId: data.tag_id,
|
|
20
|
+
count: data.count,
|
|
21
|
+
level: data.level,
|
|
22
|
+
property: data.property,
|
|
23
|
+
children: (_data_children = data.children) === null || _data_children === void 0 ? void 0 : _data_children.map(transferTagTreeNodeApiToTagTreeNode)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* ui转换为接口使用
|
|
28
|
+
* @param data IPaginationParam
|
|
29
|
+
* @returns IPaginationParamApi
|
|
30
|
+
*/ export const transferIPaginationParamToIPaginationParamApi = (data)=>{
|
|
31
|
+
return {
|
|
32
|
+
page: data.page,
|
|
33
|
+
page_size: data.pageSize
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* ui转换为接口使用
|
|
38
|
+
* @param data ISortParam
|
|
39
|
+
* @returns ISortParamApi
|
|
40
|
+
*/ export const transferISortParamToISortParamApi = (data)=>{
|
|
41
|
+
return {
|
|
42
|
+
order_by: data.orderBy,
|
|
43
|
+
order_method: data.orderMethod
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -77,6 +77,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
+
import { transferIPaginationParamToIPaginationParamApi, transferISortParamToISortParamApi } from './common.ts.js';
|
|
80
81
|
import { transferResourcePermission } from './permission.ts.js';
|
|
81
82
|
/**
|
|
82
83
|
* 接口转换为ui使用
|
|
@@ -168,8 +169,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
168
169
|
* @param data IDatasetListParam
|
|
169
170
|
* @returns IDatasetListParamApi
|
|
170
171
|
*/ export const transferDatasetListParam2DatasetListParamApi = (data)=>{
|
|
171
|
-
return {
|
|
172
|
-
ordering: data === null || data === void 0 ? void 0 : data.ordering,
|
|
172
|
+
return _object_spread_props(_object_spread({}, transferIPaginationParamToIPaginationParamApi(data), transferISortParamToISortParamApi(data)), {
|
|
173
173
|
company_name: data === null || data === void 0 ? void 0 : data.companyName,
|
|
174
174
|
dataset_name: data === null || data === void 0 ? void 0 : data.datasetName,
|
|
175
175
|
type: data === null || data === void 0 ? void 0 : data.type,
|
|
@@ -178,17 +178,10 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
178
178
|
fuzzy: data === null || data === void 0 ? void 0 : data.fuzzy,
|
|
179
179
|
description: data === null || data === void 0 ? void 0 : data.description,
|
|
180
180
|
tag_name: data === null || data === void 0 ? void 0 : data.tagName,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
limit: data === null || data === void 0 ? void 0 : data.limit,
|
|
184
|
-
order_by: (data === null || data === void 0 ? void 0 : data.order_by) ? ({
|
|
185
|
-
datasetItemCount: 'dataset_item_count',
|
|
186
|
-
datasetItemUnreviewedCount: 'dataset_item_unreviewed_count',
|
|
187
|
-
createdAt: 'created_at'
|
|
188
|
-
})[data.order_by] : undefined,
|
|
189
|
-
order_method: data === null || data === void 0 ? void 0 : data.order_method,
|
|
181
|
+
group_type: data === null || data === void 0 ? void 0 : data.groupType,
|
|
182
|
+
tag_id: data === null || data === void 0 ? void 0 : data.tagId,
|
|
190
183
|
source_type: data === null || data === void 0 ? void 0 : data.sourceType
|
|
191
|
-
};
|
|
184
|
+
});
|
|
192
185
|
};
|
|
193
186
|
/**
|
|
194
187
|
* ui转换为接口使用
|
|
@@ -210,10 +203,10 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
210
203
|
* @param data IDatasetDataParam
|
|
211
204
|
* @returns IDatasetDataParamApi
|
|
212
205
|
*/ export const transferDatasetDataParam2DatasetDataParamApi = (data)=>{
|
|
213
|
-
const { datasetId, createdBy,
|
|
206
|
+
const { datasetId, createdBy, pageSize, ordering, page, sourceTypes, modelType, levels, statuses, reviewStatuses } = data, rest = _object_without_properties(data, [
|
|
214
207
|
"datasetId",
|
|
215
208
|
"createdBy",
|
|
216
|
-
"
|
|
209
|
+
"pageSize",
|
|
217
210
|
"ordering",
|
|
218
211
|
"page",
|
|
219
212
|
"sourceTypes",
|
|
@@ -230,7 +223,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
230
223
|
review_statuses: reviewStatuses,
|
|
231
224
|
levels,
|
|
232
225
|
statuses,
|
|
233
|
-
|
|
226
|
+
page_size: pageSize,
|
|
234
227
|
ordering,
|
|
235
228
|
page
|
|
236
229
|
});
|
|
@@ -313,7 +306,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
313
306
|
* @param data IOperatRecordParam
|
|
314
307
|
* @returns IOperatRecordParamApi
|
|
315
308
|
*/ export const transferOperatRecordParam2OperatRecordParamApi = (data)=>{
|
|
316
|
-
return {
|
|
309
|
+
return _object_spread_props(_object_spread({}, transferIPaginationParamToIPaginationParamApi(data)), {
|
|
317
310
|
id: data.id,
|
|
318
311
|
instance_id: data.instanceId,
|
|
319
312
|
resource_type_id: data.resourceTypeId,
|
|
@@ -323,7 +316,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
323
316
|
date: data.date,
|
|
324
317
|
result_code: data.resultCode,
|
|
325
318
|
instance_data: data.instanceData
|
|
326
|
-
};
|
|
319
|
+
});
|
|
327
320
|
};
|
|
328
321
|
/**
|
|
329
322
|
* 接口转换为ui使用
|
|
@@ -10,14 +10,14 @@ export const transferModelApi2Model = (data)=>({
|
|
|
10
10
|
activatedParams: data.activated_params,
|
|
11
11
|
createdBy: data.created_by,
|
|
12
12
|
createdAt: data.created_at,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
updatedBy: data.updated_by,
|
|
14
|
+
updatedAt: data.updated_at,
|
|
15
15
|
tagNames: data.tag_names,
|
|
16
16
|
likeCount: data.like_count,
|
|
17
17
|
like: data.like,
|
|
18
18
|
dislikeCount: data.dislike_count,
|
|
19
19
|
dislike: data.dislike,
|
|
20
|
-
property: {
|
|
20
|
+
property: data.property ? {
|
|
21
21
|
onlyUserAssistant: data.property.only_user_assistant,
|
|
22
22
|
supportTools: data.property.support_tools,
|
|
23
23
|
supportWindow: data.property.support_window,
|
|
@@ -26,5 +26,5 @@ export const transferModelApi2Model = (data)=>({
|
|
|
26
26
|
supportThinkingQuick: data.property.support_thinking_quick,
|
|
27
27
|
default: data.property.default,
|
|
28
28
|
isSelfHost: data.property.is_self_host
|
|
29
|
-
}
|
|
29
|
+
} : undefined
|
|
30
30
|
});
|
|
@@ -13,6 +13,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
13
13
|
updateTime: data.updated_at,
|
|
14
14
|
toolCode: data.tool_code,
|
|
15
15
|
toolName: data.tool_name,
|
|
16
|
+
tagNames: data.tag_names,
|
|
16
17
|
icon: data.icon,
|
|
17
18
|
description: data.description,
|
|
18
19
|
method: data.method,
|
|
@@ -39,6 +40,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
39
40
|
updated_at: data.updateTime,
|
|
40
41
|
tool_code: data.toolCode,
|
|
41
42
|
tool_name: data.toolName,
|
|
43
|
+
tag_names: data.tagNames,
|
|
42
44
|
icon: data.icon,
|
|
43
45
|
description: data.description,
|
|
44
46
|
method: data.method,
|
package/dist/transforms.d.ts
CHANGED
package/dist/transforms.ts.js
CHANGED
package/dist/types/common.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { OrderMethod } from './enum';
|
|
1
2
|
export interface ITab {
|
|
2
3
|
id?: string | number;
|
|
3
4
|
name: string;
|
|
4
5
|
number?: number;
|
|
5
6
|
children?: ITab[];
|
|
6
7
|
}
|
|
7
|
-
export interface
|
|
8
|
-
limit?: number;
|
|
8
|
+
export interface IPaginationParam {
|
|
9
9
|
page?: number;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface IPaginationParamApi {
|
|
13
|
+
page?: number;
|
|
14
|
+
page_size?: number;
|
|
10
15
|
}
|
|
11
16
|
export interface ISearchSelectItem {
|
|
12
17
|
id: string | number | boolean;
|
|
@@ -17,12 +22,40 @@ export interface ISearchSelectItem {
|
|
|
17
22
|
children?: ISearchSelectItem[];
|
|
18
23
|
multipleKey?: string;
|
|
19
24
|
}
|
|
20
|
-
export interface
|
|
25
|
+
export interface ISortParam {
|
|
26
|
+
orderBy?: string;
|
|
27
|
+
orderMethod?: OrderMethod;
|
|
28
|
+
}
|
|
29
|
+
export interface ISortParamApi {
|
|
21
30
|
order_by?: string;
|
|
22
|
-
order_method?:
|
|
31
|
+
order_method?: OrderMethod;
|
|
23
32
|
}
|
|
24
33
|
export type RequestHookData = {
|
|
25
34
|
url: string;
|
|
26
35
|
header?: Record<string, string>;
|
|
27
36
|
data?: unknown;
|
|
28
37
|
};
|
|
38
|
+
export interface ITagTree {
|
|
39
|
+
all: number;
|
|
40
|
+
tree: ITagTreeNode[];
|
|
41
|
+
}
|
|
42
|
+
export interface ITagTreeApi {
|
|
43
|
+
all: number;
|
|
44
|
+
tree: ITagTreeNodeApi[];
|
|
45
|
+
}
|
|
46
|
+
export interface ITagTreeNode {
|
|
47
|
+
tagName: string;
|
|
48
|
+
tagId?: number;
|
|
49
|
+
count?: number;
|
|
50
|
+
level?: number;
|
|
51
|
+
property?: string;
|
|
52
|
+
children?: Array<ITagTreeNode>;
|
|
53
|
+
}
|
|
54
|
+
export interface ITagTreeNodeApi {
|
|
55
|
+
tag_name: string;
|
|
56
|
+
tag_id?: number;
|
|
57
|
+
count?: number;
|
|
58
|
+
level?: number;
|
|
59
|
+
property?: string;
|
|
60
|
+
children?: Array<ITagTreeNodeApi>;
|
|
61
|
+
}
|
package/dist/types/dataset.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DatasetDataOperatRecordActionId, DatasetDataOperatRecordResultCode, DatasetDataReviewLevel, DatasetDataReviewStatus, DatasetDataSourceType, DatasetDataStatus, DatasetType,
|
|
1
|
+
import type { IPaginationParam, IPaginationParamApi, ISortParam, ISortParamApi } from './common';
|
|
2
|
+
import type { DatasetDataOperatRecordActionId, DatasetDataOperatRecordResultCode, DatasetDataReviewLevel, DatasetDataReviewStatus, DatasetDataSourceType, DatasetDataStatus, DatasetType, GroupType, UserStatus } from './enum';
|
|
3
3
|
import type { IFileInfo, IFileInfoApi } from './file';
|
|
4
4
|
import type { IResourcePermission, IResourcePermissionApi } from './permission';
|
|
5
5
|
export interface IDatasetInfo {
|
|
@@ -50,7 +50,7 @@ export interface IDataset extends IDatasetForm {
|
|
|
50
50
|
id: number;
|
|
51
51
|
permission: IResourcePermission;
|
|
52
52
|
}
|
|
53
|
-
export interface IDatasetListParam extends
|
|
53
|
+
export interface IDatasetListParam extends IPaginationParam, ISortParam {
|
|
54
54
|
componentIds?: string;
|
|
55
55
|
createdBy?: string;
|
|
56
56
|
datasetName?: string;
|
|
@@ -61,10 +61,11 @@ export interface IDatasetListParam extends IPage, ISort {
|
|
|
61
61
|
datasetCode?: string;
|
|
62
62
|
description?: string;
|
|
63
63
|
tagName?: string;
|
|
64
|
-
|
|
64
|
+
groupType?: GroupType;
|
|
65
|
+
tagId?: number;
|
|
65
66
|
sourceType?: DatasetDataSourceType;
|
|
66
67
|
}
|
|
67
|
-
export interface IDatasetListParamApi extends
|
|
68
|
+
export interface IDatasetListParamApi extends IPaginationParamApi, ISortParamApi {
|
|
68
69
|
component_ids?: string;
|
|
69
70
|
created_by?: string;
|
|
70
71
|
dataset_name?: string;
|
|
@@ -75,7 +76,8 @@ export interface IDatasetListParamApi extends IPage, ISort {
|
|
|
75
76
|
dataset_code?: string;
|
|
76
77
|
description?: string;
|
|
77
78
|
tag_name?: string;
|
|
78
|
-
|
|
79
|
+
group_type?: GroupType;
|
|
80
|
+
tag_id?: number;
|
|
79
81
|
source_type?: DatasetDataSourceType;
|
|
80
82
|
}
|
|
81
83
|
export interface IDatasetApiGuideApi {
|
|
@@ -144,7 +146,7 @@ export interface IDatasetData extends IDatasetDataForm {
|
|
|
144
146
|
reviewLevel: DatasetDataReviewLevel;
|
|
145
147
|
id: number;
|
|
146
148
|
}
|
|
147
|
-
export interface IDatasetDataParam extends
|
|
149
|
+
export interface IDatasetDataParam extends IPaginationParam, ISortParam {
|
|
148
150
|
datasetId?: number;
|
|
149
151
|
createdBy?: string;
|
|
150
152
|
modelType?: string;
|
|
@@ -154,7 +156,7 @@ export interface IDatasetDataParam extends IPage, ISort {
|
|
|
154
156
|
statuses?: DatasetDataStatus[];
|
|
155
157
|
reviewStatuses?: DatasetDataReviewStatus[];
|
|
156
158
|
}
|
|
157
|
-
export interface IDatasetDataParamApi extends
|
|
159
|
+
export interface IDatasetDataParamApi extends IPaginationParamApi, ISortParamApi {
|
|
158
160
|
dataset_id?: number;
|
|
159
161
|
created_by?: string;
|
|
160
162
|
model_type?: string;
|
|
@@ -210,7 +212,7 @@ export interface ISchema {
|
|
|
210
212
|
name: string;
|
|
211
213
|
schema: Record<string, string>;
|
|
212
214
|
}
|
|
213
|
-
export interface IOperatRecordParam {
|
|
215
|
+
export interface IOperatRecordParam extends IPaginationParam {
|
|
214
216
|
id?: number;
|
|
215
217
|
instanceId?: number;
|
|
216
218
|
parentId?: number;
|
|
@@ -224,7 +226,7 @@ export interface IOperatRecordParam {
|
|
|
224
226
|
resultCode?: DatasetDataOperatRecordResultCode;
|
|
225
227
|
instanceData?: string;
|
|
226
228
|
}
|
|
227
|
-
export interface IOperatRecordParamApi {
|
|
229
|
+
export interface IOperatRecordParamApi extends IPaginationParamApi {
|
|
228
230
|
id?: number;
|
|
229
231
|
instance_id?: number;
|
|
230
232
|
parent_id?: number;
|
package/dist/types/enum.d.ts
CHANGED
|
@@ -149,7 +149,9 @@ export declare enum Module {
|
|
|
149
149
|
Mcp = "mcp",
|
|
150
150
|
Model = "model",
|
|
151
151
|
Default = "default",
|
|
152
|
-
PromptVariables = "prompt_variables"
|
|
152
|
+
PromptVariables = "prompt_variables",
|
|
153
|
+
Dataset = "dataset",
|
|
154
|
+
Meta = "meta"
|
|
153
155
|
}
|
|
154
156
|
export declare enum ResourcePermissionAction {
|
|
155
157
|
AccessModel = "access_model",
|
|
@@ -232,3 +234,13 @@ export declare enum KnowledgebaseType {
|
|
|
232
234
|
Default = "default",
|
|
233
235
|
IntentRecog = "intent_recog"
|
|
234
236
|
}
|
|
237
|
+
export declare enum GroupType {
|
|
238
|
+
All = "all",
|
|
239
|
+
Space = "space",
|
|
240
|
+
User = "user",
|
|
241
|
+
Deleted = "deleted"
|
|
242
|
+
}
|
|
243
|
+
export declare enum OrderMethod {
|
|
244
|
+
Asc = "asc",
|
|
245
|
+
Desc = "desc"
|
|
246
|
+
}
|
package/dist/types/enum.ts.js
CHANGED
|
@@ -170,6 +170,8 @@ export var Module;
|
|
|
170
170
|
Module["Model"] = "model";
|
|
171
171
|
Module["Default"] = "default";
|
|
172
172
|
Module["PromptVariables"] = "prompt_variables";
|
|
173
|
+
Module["Dataset"] = "dataset";
|
|
174
|
+
Module["Meta"] = "meta";
|
|
173
175
|
})(Module || (Module = {}));
|
|
174
176
|
export var ResourcePermissionAction;
|
|
175
177
|
(function(ResourcePermissionAction) {
|
|
@@ -260,3 +262,15 @@ export var KnowledgebaseType;
|
|
|
260
262
|
KnowledgebaseType["Default"] = "default";
|
|
261
263
|
KnowledgebaseType["IntentRecog"] = "intent_recog";
|
|
262
264
|
})(KnowledgebaseType || (KnowledgebaseType = {}));
|
|
265
|
+
export var GroupType;
|
|
266
|
+
(function(GroupType) {
|
|
267
|
+
GroupType["All"] = "all";
|
|
268
|
+
GroupType["Space"] = "space";
|
|
269
|
+
GroupType["User"] = "user";
|
|
270
|
+
GroupType["Deleted"] = "deleted";
|
|
271
|
+
})(GroupType || (GroupType = {}));
|
|
272
|
+
export var OrderMethod;
|
|
273
|
+
(function(OrderMethod) {
|
|
274
|
+
OrderMethod["Asc"] = "asc";
|
|
275
|
+
OrderMethod["Desc"] = "desc";
|
|
276
|
+
})(OrderMethod || (OrderMethod = {}));
|
package/dist/types/model.d.ts
CHANGED
|
@@ -4,21 +4,21 @@ export interface IModel {
|
|
|
4
4
|
llmName: string;
|
|
5
5
|
llmType: LLMSupport;
|
|
6
6
|
id: number;
|
|
7
|
-
icon
|
|
8
|
-
description
|
|
7
|
+
icon?: string;
|
|
8
|
+
description?: string;
|
|
9
9
|
baseModel?: string;
|
|
10
10
|
contextLength?: string;
|
|
11
11
|
activatedParams?: string;
|
|
12
12
|
createdBy?: string;
|
|
13
13
|
createdAt?: string;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
updatedBy?: string;
|
|
15
|
+
updatedAt?: string;
|
|
16
16
|
tagNames?: string[][];
|
|
17
17
|
likeCount?: number;
|
|
18
18
|
like?: boolean;
|
|
19
19
|
dislikeCount?: number;
|
|
20
20
|
dislike?: boolean;
|
|
21
|
-
property
|
|
21
|
+
property?: {
|
|
22
22
|
onlyUserAssistant?: boolean;
|
|
23
23
|
supportTools?: boolean;
|
|
24
24
|
supportWindow?: boolean;
|
|
@@ -34,8 +34,8 @@ export interface IModelApi {
|
|
|
34
34
|
llm_name: string;
|
|
35
35
|
llm_type: LLMSupport;
|
|
36
36
|
id: number;
|
|
37
|
-
icon
|
|
38
|
-
description
|
|
37
|
+
icon?: string;
|
|
38
|
+
description?: string;
|
|
39
39
|
tag_names?: string[][];
|
|
40
40
|
base_model?: string;
|
|
41
41
|
context_length?: string;
|
|
@@ -48,7 +48,7 @@ export interface IModelApi {
|
|
|
48
48
|
like?: boolean;
|
|
49
49
|
dislike_count?: number;
|
|
50
50
|
dislike?: boolean;
|
|
51
|
-
property
|
|
51
|
+
property?: {
|
|
52
52
|
only_user_assistant?: boolean;
|
|
53
53
|
support_tools?: boolean;
|
|
54
54
|
support_window?: boolean;
|
package/dist/types/tool.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface IToolApi {
|
|
|
29
29
|
updated_at: string;
|
|
30
30
|
tool_code: string;
|
|
31
31
|
tool_name: string;
|
|
32
|
+
tag_names: string[][];
|
|
32
33
|
icon: string;
|
|
33
34
|
description: string;
|
|
34
35
|
method: string;
|
|
@@ -55,6 +56,7 @@ export interface ITool {
|
|
|
55
56
|
updateTime: string;
|
|
56
57
|
toolCode: string;
|
|
57
58
|
toolName: string;
|
|
59
|
+
tagNames: string[][];
|
|
58
60
|
icon: string;
|
|
59
61
|
description: string;
|
|
60
62
|
method: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/ai-ui-sdk",
|
|
3
|
-
"version": "0.1.19-beta.
|
|
3
|
+
"version": "0.1.19-beta.10",
|
|
4
4
|
"description": "蓝鲸AI UI SDK",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -86,6 +86,6 @@
|
|
|
86
86
|
"postcss-nested": "^7.0.2",
|
|
87
87
|
"postcss-nested-ancestors": "^3.0.0",
|
|
88
88
|
"typescript": "^5.5.4",
|
|
89
|
-
"vue-tsc": "^
|
|
89
|
+
"vue-tsc": "^3.1.4"
|
|
90
90
|
}
|
|
91
91
|
}
|