Collection tag (#2266)

* feat: collection metadata filter (#2211)

* feat: add dataset collection tags (#2231)

* dataset page

* workflow page

* move

* fix

* add plus filter

* fix

* fix

* fix

* perf: collection tag code

* fix: collection tags (#2249)

* fix

* fix

* fix tags of dataset page

* fix tags of workflow page

* doc

* add comments

* fix: collection tags (#2264)

* fix: metadata filter

* feat: search filter

---------

Co-authored-by: heheer <1239331448@qq.com>
Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
Archer
2024-08-05 12:08:46 +08:00
committed by GitHub
parent 56f6e69bc7
commit fe71efbbd2
46 changed files with 1914 additions and 112 deletions

View File

@@ -74,6 +74,23 @@ export type ExternalFileCreateDatasetCollectionParams = ApiCreateDatasetCollecti
filename?: string;
};
/* ================= tag ===================== */
export type CreateDatasetCollectionTagParams = {
datasetId: string;
tag: string;
};
export type AddTagsToCollectionsParams = {
originCollectionIds: string[];
collectionIds: string[];
datasetId: string;
tag: string;
};
export type UpdateDatasetCollectionTagParams = {
datasetId: string;
tagId: string;
tag: string;
};
/* ================= data ===================== */
export type PgSearchRawType = {
id: string;

View File

@@ -69,6 +69,13 @@ export type DatasetCollectionSchemaType = {
};
};
export type DatasetCollectionTagsSchemaType = {
_id: string;
teamId: string;
datasetId: string;
tag: string;
};
export type DatasetDataIndexItemType = {
defaultIndex: boolean;
dataId: string; // pg data id
@@ -144,6 +151,17 @@ export type DatasetItemType = Omit<DatasetSchemaType, 'vectorModel' | 'agentMode
permission: DatasetPermission;
};
/* ================= tag ===================== */
export type DatasetTagType = {
_id: string;
tag: string;
};
export type TagUsageType = {
tagId: string;
collections: string[];
};
/* ================= collection ===================== */
export type DatasetCollectionItemType = CollectionWithDatasetType & {
sourceName: string;