mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
feat: Sync collection (#3368)
* feat: sync collection * feat: sync collection * perf: website selector * update doc
This commit is contained in:
5
packages/global/core/dataset/api.d.ts
vendored
5
packages/global/core/dataset/api.d.ts
vendored
@@ -17,6 +17,9 @@ export type DatasetUpdateBody = {
|
||||
externalReadUrl?: DatasetSchemaType['externalReadUrl'];
|
||||
defaultPermission?: DatasetSchemaType['defaultPermission'];
|
||||
apiServer?: DatasetSchemaType['apiServer'];
|
||||
|
||||
// sync schedule
|
||||
autoSync?: boolean;
|
||||
};
|
||||
|
||||
/* ================= collection ===================== */
|
||||
@@ -47,6 +50,8 @@ export type CreateDatasetCollectionParams = DatasetCollectionChunkMetadataType &
|
||||
tags?: string[];
|
||||
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
nextSyncTime?: Date;
|
||||
};
|
||||
|
||||
export type ApiCreateDatasetCollectionParams = DatasetCollectionChunkMetadataType & {
|
||||
|
@@ -82,7 +82,8 @@ export const DatasetCollectionTypeMap = {
|
||||
|
||||
export enum DatasetCollectionSyncResultEnum {
|
||||
sameRaw = 'sameRaw',
|
||||
success = 'success'
|
||||
success = 'success',
|
||||
failed = 'failed'
|
||||
}
|
||||
export const DatasetCollectionSyncResultMap = {
|
||||
[DatasetCollectionSyncResultEnum.sameRaw]: {
|
||||
@@ -90,6 +91,9 @@ export const DatasetCollectionSyncResultMap = {
|
||||
},
|
||||
[DatasetCollectionSyncResultEnum.success]: {
|
||||
label: i18nT('common:core.dataset.collection.sync.result.success')
|
||||
},
|
||||
[DatasetCollectionSyncResultEnum.failed]: {
|
||||
label: i18nT('dataset:sync_collection_failed')
|
||||
}
|
||||
};
|
||||
|
||||
|
9
packages/global/core/dataset/type.d.ts
vendored
9
packages/global/core/dataset/type.d.ts
vendored
@@ -34,8 +34,7 @@ export type DatasetSchemaType = {
|
||||
inheritPermission: boolean;
|
||||
apiServer?: APIFileServer;
|
||||
|
||||
syncSchedule?: { cronString: string; timezone: string };
|
||||
syncNextTime?: Date;
|
||||
autoSync?: boolean;
|
||||
|
||||
// abandon
|
||||
externalReadUrl?: string;
|
||||
@@ -65,11 +64,13 @@ export type DatasetCollectionSchemaType = {
|
||||
fileId?: string; // local file id
|
||||
rawLink?: string; // link url
|
||||
externalFileId?: string; //external file id
|
||||
apiFileId?: string; // api file id
|
||||
externalFileUrl?: string; // external import url
|
||||
|
||||
nextSyncTime?: Date;
|
||||
|
||||
rawTextLength?: number;
|
||||
hashRawText?: string;
|
||||
externalFileUrl?: string; // external import url
|
||||
apiFileId?: string; // api file id
|
||||
metadata?: {
|
||||
webPageSelector?: string;
|
||||
relatedImgId?: string; // The id of the associated image collections
|
||||
|
Reference in New Issue
Block a user