From 5036518d39189a956c8864c1298c5dd7de9c878a Mon Sep 17 00:00:00 2001 From: dayuy <973860441@qq.com> Date: Wed, 22 Nov 2023 13:56:19 +0800 Subject: [PATCH] feat: add dataset.gql and versioned_dataset.gql --- graphql-server/bff-sdk/package.json | 2 +- graphql-server/bff-sdk/src/sdk.ts | 1349 ++++++++++++++++- .../go-server/graph/schema/dataset.gql | 80 + .../go-server/graph/schema/model.gql | 8 +- .../graph/schema/versioned_dataset.gql | 78 + 5 files changed, 1483 insertions(+), 34 deletions(-) create mode 100644 graphql-server/go-server/graph/schema/dataset.gql create mode 100644 graphql-server/go-server/graph/schema/versioned_dataset.gql diff --git a/graphql-server/bff-sdk/package.json b/graphql-server/bff-sdk/package.json index 53b2e3328..07813b590 100644 --- a/graphql-server/bff-sdk/package.json +++ b/graphql-server/bff-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@tenx-ui/arcadia-bff-sdk", - "version": "0.0.13", + "version": "0.0.14", "description": "", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", diff --git a/graphql-server/bff-sdk/src/sdk.ts b/graphql-server/bff-sdk/src/sdk.ts index 505572036..f128326dc 100644 --- a/graphql-server/bff-sdk/src/sdk.ts +++ b/graphql-server/bff-sdk/src/sdk.ts @@ -39,31 +39,239 @@ export type Scalars = { Void: { input: any; output: any }; }; +export type CreateDatasetInput = { + /** 一些备注用的注视信息,或者记录一个简单的配置 */ + annotations?: InputMaybe; + /** 数据集里面的数据的类型,文本,视频,图片 */ + contentType: Scalars["String"]["input"]; + /** 描述信息,可以不写 */ + description?: InputMaybe; + /** 展示名称,用于展示在界面上的,必须填写 */ + displayName: Scalars["String"]["input"]; + /** 应用场景,可以为空 */ + filed?: InputMaybe; + /** 一些标签选择信息,可以不添加 */ + labels?: InputMaybe; + /** 数据集的CR名字,要满足k8s的名称规则 */ + name: Scalars["String"]["input"]; + namespace: Scalars["String"]["input"]; +}; + +/** 新增数据源时输入条件 */ export type CreateDatasourceInput = { + /** 数据源资源注释 */ annotations?: InputMaybe; + /** 数据源资源描述 */ description?: InputMaybe; + /** 数据源资源展示名称作为显示,并提供编辑 */ displayName: Scalars["String"]["input"]; + /** 提供对象存储时输入条件 */ endpointinput?: InputMaybe; + /** 数据源资源标签 */ labels?: InputMaybe; + /** 数据源资源名称(不可同名) */ name: Scalars["String"]["input"]; + /** 数据源创建命名空间 */ namespace: Scalars["String"]["input"]; ossinput?: InputMaybe; }; +export type CreateEmbedderInput = { + /** 模型服务资源注释 */ + annotations?: InputMaybe; + /** 模型服务资源描述 */ + description?: InputMaybe; + /** 模型服务资源展示名称作为显示,并提供编辑 */ + displayName: Scalars["String"]["input"]; + endpointinput?: InputMaybe; + /** 模型服务资源标签 */ + labels?: InputMaybe; + /** 模型服务资源名称(不可同名) */ + name: Scalars["String"]["input"]; + /** 模型服务创建命名空间 */ + namespace: Scalars["String"]["input"]; + /** 模型服务类型 */ + serviceType?: InputMaybe; +}; + +export type CreateKnowledgeBaseInput = { + /** 知识库资源注释 */ + annotations?: InputMaybe; + /** 知识库资源描述 */ + description?: InputMaybe; + /** 知识库资源展示名称作为显示,并提供编辑 */ + displayName: Scalars["String"]["input"]; + /** 模型服务 */ + embedder?: InputMaybe; + /** 知识库文件 */ + fileGroups?: InputMaybe>; + /** 知识库资源标签 */ + labels?: InputMaybe; + /** 知识库资源名称(不可同名) */ + name: Scalars["String"]["input"]; + /** 知识库创建命名空间 */ + namespace: Scalars["String"]["input"]; + /** "向量数据库(使用默认值) */ + vectorStore?: InputMaybe; +}; + export type CreateModelInput = { + /** 模型资源描述 */ description?: InputMaybe; + /** 模型资源展示名称作为显示,并提供编辑 */ displayName: Scalars["String"]["input"]; + /** 模型应用领域 */ field: Scalars["String"]["input"]; - modeltype: Scalars["String"]["input"]; + /** 模型类型 */ + modeltypes: Scalars["String"]["input"]; + /** 模型资源名称(不可同名) */ + name: Scalars["String"]["input"]; + /** 模型创建命名空间 */ + namespace: Scalars["String"]["input"]; +}; + +export type CreateVersionedDatasetInput = { + /** 一些备注用的注视信息,或者记录一个简单的配置 */ + annotations?: InputMaybe; + /** + * dataset的名字,需要根据这个名字, + * 判断是否最新版本不包含任何文件(产品要求,有一个不包含任何文件的版本,不允许创建新的版本) + */ + datasetName: Scalars["String"]["input"]; + /** 描述信息,可以不写 */ + description?: InputMaybe; + /** 展示名称,用于展示在界面上的,必须填写 */ + displayName: Scalars["String"]["input"]; + /** 从数据源要上传的文件,目前以及不用了 */ + fileGrups?: InputMaybe>>; + /** 界面上创建新版本选择从某个版本集成的时候,填写version字段 */ + inheritedFrom?: InputMaybe; + /** 一些标签选择信息,可以不添加 */ + labels?: InputMaybe; + /** 数据集的CR名字,要满足k8s的名称规则 */ + name: Scalars["String"]["input"]; + namespace: Scalars["String"]["input"]; + /** 是否发布,0是未发布,1是已经发布,创建一个版本的时候默认传递0就可以 */ + released: Scalars["Int"]["input"]; + /** 数据集里面的数据的类型,文本,视频,图片 */ + version: Scalars["String"]["input"]; +}; + +/** + * Dataset + * 数据集代表用户纳管的一组相似属性的文件,采用相同的方式进行数据处理并用于后续的 + * 1. 模型训练 + * 2. 知识库 + * + * 支持多种类型数据: + * - 文本 + * - 图片 + * - 视频 + * + * 单个数据集仅允许包含同一类型文件,不同类型文件将被忽略 + * 数据集允许有多个版本,数据处理针对单个版本进行 + * 数据集某个版本完成数据处理后,数据处理服务需要将处理后的存储回 版本数据集 + */ +export type Dataset = { + __typename?: "Dataset"; + /** 添加一些辅助性记录信息 */ + annotations?: Maybe; + /** 数据集类型,文本,图片,视频 */ + contentType: Scalars["String"]["output"]; + /** 创建者,正查给你这个字段是不需要人写的,自动添加 */ + creator?: Maybe; + /** 展示名字, 与metadat.name不一样,这个展示名字是可以用中文的 */ + displayName: Scalars["String"]["output"]; + /** 应用场景 */ + field?: Maybe; + /** 一些用于标记,选择的的标签 */ + labels?: Maybe; + /** 数据集名称 */ + name: Scalars["String"]["output"]; + /** 数据集所在的namespace,也是后续桶的名字 */ + namespace: Scalars["String"]["output"]; + /** 更新时间, 这里更新指文件同步,或者数据处理完成后,做的更新操作的时间 */ + updateTimestamp?: Maybe; + /** 数据集的总版本数量 */ + versionCount: Scalars["Int"]["output"]; + /** + * 这个是一个resolver,数据集下面的版本列表。 + * 支持对名字,类型的完全匹配过滤。 + * 支持通过标签(somelabel=abc),字段(metadata.name=abc)进行过滤 + */ + versions: PaginatedResult; +}; + +/** + * Dataset + * 数据集代表用户纳管的一组相似属性的文件,采用相同的方式进行数据处理并用于后续的 + * 1. 模型训练 + * 2. 知识库 + * + * 支持多种类型数据: + * - 文本 + * - 图片 + * - 视频 + * + * 单个数据集仅允许包含同一类型文件,不同类型文件将被忽略 + * 数据集允许有多个版本,数据处理针对单个版本进行 + * 数据集某个版本完成数据处理后,数据处理服务需要将处理后的存储回 版本数据集 + */ +export type DatasetVersionsArgs = { + input: ListVersionedDatasetInput; +}; + +export type DatasetMutation = { + __typename?: "DatasetMutation"; + createDataset: Dataset; + /** + * 删除数据集 + * 可以提供一个名称列表,会将所有名字在这个列表的dataset全部删除 + * 支持通过标签进行删除,提供一个标签选择器,将满足标签的dataset全部删除 + * 如果提供了这两个参数,以名字列表为主。 + */ + deleteDatasets?: Maybe; + updateDataset: Dataset; +}; + +export type DatasetMutationCreateDatasetArgs = { + input?: InputMaybe; +}; + +export type DatasetMutationDeleteDatasetsArgs = { + input?: InputMaybe; +}; + +export type DatasetMutationUpdateDatasetArgs = { + input?: InputMaybe; +}; + +export type DatasetQuery = { + __typename?: "DatasetQuery"; + /** 根据名字获取某个具体的数据集 */ + getDataset: Dataset; + /** + * 获取数据集列表,支持通过标签和字段进行选择。 + * labelSelector: aa=bbb + * fieldSelector= metadata.name=somename + */ + listDatasets: PaginatedResult; +}; + +export type DatasetQueryGetDatasetArgs = { name: Scalars["String"]["input"]; namespace: Scalars["String"]["input"]; - updateTimestamp?: InputMaybe; +}; + +export type DatasetQueryListDatasetsArgs = { + input?: InputMaybe; }; export type Datasource = { __typename?: "Datasource"; annotations?: Maybe; creator?: Maybe; + description?: Maybe; displayName: Scalars["String"]["output"]; endpoint?: Maybe; fileCount?: Maybe; @@ -71,26 +279,26 @@ export type Datasource = { name: Scalars["String"]["output"]; namespace: Scalars["String"]["output"]; oss?: Maybe; - status?: Maybe; + status?: Maybe; updateTimestamp: Scalars["Time"]["output"]; }; -export type DatasourceMuation = { - __typename?: "DatasourceMuation"; +export type DatasourceMutation = { + __typename?: "DatasourceMutation"; createDatasource: Datasource; deleteDatasource?: Maybe; updateDatasource: Datasource; }; -export type DatasourceMuationCreateDatasourceArgs = { +export type DatasourceMutationCreateDatasourceArgs = { input: CreateDatasourceInput; }; -export type DatasourceMuationDeleteDatasourceArgs = { +export type DatasourceMutationDeleteDatasourceArgs = { input?: InputMaybe; }; -export type DatasourceMuationUpdateDatasourceArgs = { +export type DatasourceMutationUpdateDatasourceArgs = { input?: InputMaybe; }; @@ -109,20 +317,103 @@ export type DatasourceQueryListDatasourcesArgs = { input: ListDatasourceInput; }; +export type DeleteDatasetInput = { + fieldSelector?: InputMaybe; + labelSelector?: InputMaybe; + name?: InputMaybe; + namespace: Scalars["String"]["input"]; +}; + export type DeleteDatasourceInput = { fieldSelector?: InputMaybe; + /** 筛选器 */ + labelSelector?: InputMaybe; + name?: InputMaybe; + namespace: Scalars["String"]["input"]; +}; + +export type DeleteEmbedderInput = { + /** 字段选择器 */ + fieldSelector?: InputMaybe; + /** 标签选择器 */ + labelSelector?: InputMaybe; + name?: InputMaybe; + namespace: Scalars["String"]["input"]; +}; + +export type DeleteKnowledgeBaseInput = { + /** 字段选择器 */ + fieldSelector?: InputMaybe; + /** 标签选择器 */ labelSelector?: InputMaybe; name?: InputMaybe; namespace: Scalars["String"]["input"]; }; export type DeleteModelInput = { + /** 字段选择器 */ + fieldSelector?: InputMaybe; + /** 标签选择器 */ + labelSelector?: InputMaybe; + name?: InputMaybe; + namespace: Scalars["String"]["input"]; +}; + +export type DeleteVersionedDatasetInput = { fieldSelector?: InputMaybe; labelSelector?: InputMaybe; name?: InputMaybe; namespace: Scalars["String"]["input"]; }; +export type Embedder = { + __typename?: "Embedder"; + annotations?: Maybe; + creator?: Maybe; + description?: Maybe; + displayName: Scalars["String"]["output"]; + endpoint?: Maybe; + labels?: Maybe; + name: Scalars["String"]["output"]; + namespace: Scalars["String"]["output"]; + serviceType?: Maybe; + updateTimestamp?: Maybe; +}; + +export type EmbedderMutation = { + __typename?: "EmbedderMutation"; + createEmbedder: Embedder; + deleteEmbedder?: Maybe; + updateEmbedder: Embedder; +}; + +export type EmbedderMutationCreateEmbedderArgs = { + input: CreateEmbedderInput; +}; + +export type EmbedderMutationDeleteEmbedderArgs = { + input?: InputMaybe; +}; + +export type EmbedderMutationUpdateEmbedderArgs = { + input?: InputMaybe; +}; + +export type EmbedderQuery = { + __typename?: "EmbedderQuery"; + getEmbedder: Embedder; + listEmbedders: PaginatedResult; +}; + +export type EmbedderQueryGetEmbedderArgs = { + name: Scalars["String"]["input"]; + namespace: Scalars["String"]["input"]; +}; + +export type EmbedderQueryListEmbeddersArgs = { + input: ListEmbedderInput; +}; + export type Endpoint = { __typename?: "Endpoint"; authSecret?: Maybe; @@ -130,17 +421,149 @@ export type Endpoint = { url?: Maybe; }; +/** 对象存储终端输入 */ export type EndpointInput = { + /** secret验证密码 */ authSecret?: InputMaybe; + /** 默认true */ insecure?: InputMaybe; url?: InputMaybe; }; +/** + * File + * 展示某个版本的所有文件。 + */ +export type F = { + __typename?: "F"; + /** 数据量 */ + count?: Maybe; + /** 文件类型 */ + fileType: Scalars["String"]["output"]; + /** 文件在数据源中的路径,a/b/c.txt或者d.txt */ + path: Scalars["String"]["output"]; + /** 文件成功导入时间,如果没有导入成功,这个字段为空 */ + time?: Maybe; +}; + +/** 根据条件顾虑版本内的文件,只支持关键词搜索 */ +export type FileFilter = { + /** 根据关键词搜索文件,strings.Container(fileName, keyword) */ + keyword: Scalars["String"]["input"]; + /** 页 */ + page: Scalars["Int"]["input"]; + /** 页内容数量 */ + pageSize: Scalars["Int"]["input"]; + /** 根据文件名字或者更新时间排序, file, time */ + sortBy?: InputMaybe; +}; + +export type FileGroup = { + /** 用到的文件路径,注意⚠️ 一定不要加bucket的名字 */ + paths?: InputMaybe>; + /** 数据源的基础信息 */ + source: TypedObjectReferenceInput; +}; + +export type KnowledgeBase = { + __typename?: "KnowledgeBase"; + annotations?: Maybe; + creator?: Maybe; + description?: Maybe; + displayName: Scalars["String"]["output"]; + embedder?: Maybe; + fileGroups?: Maybe>>; + labels?: Maybe; + name: Scalars["String"]["output"]; + namespace: Scalars["String"]["output"]; + /** 知识库连接状态 */ + status?: Maybe; + updateTimestamp: Scalars["Time"]["output"]; + vectorStore?: Maybe; +}; + +export type KnowledgeBaseMutation = { + __typename?: "KnowledgeBaseMutation"; + createKnowledgeBase: KnowledgeBase; + deleteKnowledgeBase?: Maybe; + updateKnowledgeBase: KnowledgeBase; +}; + +export type KnowledgeBaseMutationCreateKnowledgeBaseArgs = { + input: CreateKnowledgeBaseInput; +}; + +export type KnowledgeBaseMutationDeleteKnowledgeBaseArgs = { + input?: InputMaybe; +}; + +export type KnowledgeBaseMutationUpdateKnowledgeBaseArgs = { + input?: InputMaybe; +}; + +export type KnowledgeBaseQuery = { + __typename?: "KnowledgeBaseQuery"; + getKnowledgeBase: KnowledgeBase; + listKnowledgeBases: PaginatedResult; +}; + +export type KnowledgeBaseQueryGetKnowledgeBaseArgs = { + name: Scalars["String"]["input"]; + namespace: Scalars["String"]["input"]; +}; + +export type KnowledgeBaseQueryListKnowledgeBasesArgs = { + input: ListKnowledgeBaseInput; +}; + +export type ListDatasetInput = { + displayName?: InputMaybe; + fieldSelector?: InputMaybe; + keyword?: InputMaybe; + labelSelector?: InputMaybe; + name?: InputMaybe; + namespace: Scalars["String"]["input"]; + /** 分页页码,从1开始,默认是1 */ + page?: InputMaybe; + /** 每页数量,默认10 */ + pageSize?: InputMaybe; +}; + +/** 分页查询输入 */ export type ListDatasourceInput = { + /** 数据源资源展示名称 */ displayName?: InputMaybe; fieldSelector?: InputMaybe; keyword?: InputMaybe; labelSelector?: InputMaybe; + /** 数据源资源名称(不可同名) */ + name?: InputMaybe; + /** 数据源创建命名空间 */ + namespace: Scalars["String"]["input"]; + page?: InputMaybe; + pageSize?: InputMaybe; +}; + +export type ListEmbedderInput = { + displayName?: InputMaybe; + /** 字段选择器 */ + fieldSelector?: InputMaybe; + keyword?: InputMaybe; + /** 标签选择器 */ + labelSelector?: InputMaybe; + name?: InputMaybe; + namespace: Scalars["String"]["input"]; + page?: InputMaybe; + pageSize?: InputMaybe; +}; + +export type ListKnowledgeBaseInput = { + displayName?: InputMaybe; + /** 字段选择器 */ + fieldSelector?: InputMaybe; + keyword?: InputMaybe; + /** 标签选择器 */ + labelSelector?: InputMaybe; name?: InputMaybe; namespace: Scalars["String"]["input"]; page?: InputMaybe; @@ -149,8 +572,10 @@ export type ListDatasourceInput = { export type ListModelInput = { displayName?: InputMaybe; + /** 字段选择器 */ fieldSelector?: InputMaybe; keyword?: InputMaybe; + /** 标签选择器 */ labelSelector?: InputMaybe; name?: InputMaybe; namespace: Scalars["String"]["input"]; @@ -158,6 +583,19 @@ export type ListModelInput = { pageSize?: InputMaybe; }; +export type ListVersionedDatasetInput = { + displayName?: InputMaybe; + fieldSelector?: InputMaybe; + keyword?: InputMaybe; + labelSelector?: InputMaybe; + name?: InputMaybe; + namespace: Scalars["String"]["input"]; + /** 分页页码,从1开始,默认是1 */ + page?: InputMaybe; + /** 每页数量,默认10 */ + pageSize?: InputMaybe; +}; + export type Model = { __typename?: "Model"; annotations?: Maybe; @@ -166,7 +604,7 @@ export type Model = { displayName: Scalars["String"]["output"]; field: Scalars["String"]["output"]; labels?: Maybe; - modeltype: Scalars["String"]["output"]; + modeltypes: Scalars["String"]["output"]; name: Scalars["String"]["output"]; namespace: Scalars["String"]["output"]; updateTimestamp?: Maybe; @@ -208,8 +646,12 @@ export type ModelQueryListModelsArgs = { export type Mutation = { __typename?: "Mutation"; - Datasource?: Maybe; + Dataset?: Maybe; + Datasource?: Maybe; + Embedder?: Maybe; + KnowledgeBase?: Maybe; Model?: Maybe; + VersionedDataset?: Maybe; hello: Scalars["String"]["output"]; }; @@ -223,12 +665,20 @@ export type Oss = { bucket?: Maybe; }; +/** 文件输入 */ export type OssInput = { Object?: InputMaybe; bucket?: InputMaybe; }; -export type PageNode = Datasource | Model; +export type PageNode = + | Dataset + | Datasource + | Embedder + | F + | KnowledgeBase + | Model + | VersionedDataset; export type PaginatedResult = { __typename?: "PaginatedResult"; @@ -241,8 +691,12 @@ export type PaginatedResult = { export type Query = { __typename?: "Query"; + Dataset?: Maybe; Datasource?: Maybe; + Embedder?: Maybe; + KnowledgeBase?: Maybe; Model?: Maybe; + VersionedDataset?: Maybe; hello: Scalars["String"]["output"]; }; @@ -265,22 +719,338 @@ export type TypedObjectReferenceInput = { kind: Scalars["String"]["input"]; }; +export type UpdateDatasetInput = { + annotations?: InputMaybe; + /** 同理 */ + description?: InputMaybe; + /** 如果不更新,为空就可以 */ + displayName?: InputMaybe; + /** + * 更新的的标签信息,这里涉及到增加或者删除标签, + * 所以,如果标签有任何改动,传递完整的label。 + * 例如之前的标齐是: abc:def 新增一个标签aa:bb, 那么传递 abc:def, aa:bb + */ + labels?: InputMaybe; + /** name, namespace用来确定资源,不允许修改的。将原数据传递回来即可。 */ + name: Scalars["String"]["input"]; + namespace: Scalars["String"]["input"]; +}; + export type UpdateDatasourceInput = { + /** 数据源资源注释 */ annotations?: InputMaybe; + /** 数据源资源描述 */ description?: InputMaybe; + /** 数据源资源展示名称作为显示,并提供编辑 */ displayName: Scalars["String"]["input"]; + /** 数据源资源标签 */ labels?: InputMaybe; + /** 数据源资源名称(不可同名) */ + name: Scalars["String"]["input"]; + /** 数据源创建命名空间 */ + namespace: Scalars["String"]["input"]; +}; + +export type UpdateEmbedderInput = { + /** 模型服务资源注释 */ + annotations?: InputMaybe; + /** 模型服务资源描述 */ + description?: InputMaybe; + /** 模型服务资源展示名称作为显示,并提供编辑 */ + displayName: Scalars["String"]["input"]; + /** 模型服务资源标签 */ + labels?: InputMaybe; + /** 模型服务资源名称(不可同名) */ + name: Scalars["String"]["input"]; + /** 模型服务创建命名空间 */ + namespace: Scalars["String"]["input"]; +}; + +export type UpdateKnowledgeBaseInput = { + /** 知识库资源注释 */ + annotations?: InputMaybe; + /** 知识库资源描述 */ + description?: InputMaybe; + /** 知识库资源展示名称作为显示,并提供编辑 */ + displayName: Scalars["String"]["input"]; + /** 知识库资源标签 */ + labels?: InputMaybe; + /** 知识库资源名称(不可同名) */ + name: Scalars["String"]["input"]; + /** 知识库创建命名空间 */ + namespace: Scalars["String"]["input"]; +}; + +export type UpdateModelInput = { + /** 模型资源注释 */ + annotations?: InputMaybe; + /** 模型资源描述 */ + description?: InputMaybe; + /** 模型资源展示名称作为显示,并提供编辑 */ + displayName: Scalars["String"]["input"]; + /** 模型资标签 */ + labels?: InputMaybe; + /** 模型资源名称(不可同名) */ + name: Scalars["String"]["input"]; + /** 模型创建命名空间 */ + namespace: Scalars["String"]["input"]; +}; + +export type UpdateVersionedDatasetInput = { + /** 传递方式同label */ + annotations?: InputMaybe; + description?: InputMaybe; + displayName: Scalars["String"]["input"]; + /** + * 更新,删除数据集版本中的文件,传递方式于label相同,完全传递。 + * 如果传递一个空的数组过去,认为是删除全部文件。 + */ + fileGroups?: InputMaybe>; + /** + * 更新的的标签信息,这里涉及到增加或者删除标签, + * 所以,如果标签有任何改动,传递完整的label。 + * 例如之前的标齐是: abc:def 新增一个标签aa:bb, 那么传递 abc:def, aa:bb + */ + labels?: InputMaybe; + /** + * 这个名字就是metadat.name, 根据name和namespace确定资源 + * name,namespac是不可以更新的。 + */ + name: Scalars["String"]["input"]; + namespace: Scalars["String"]["input"]; +}; + +/** + * VersionedDataset + * 数据集的版本信息。 + * 主要记录版本名字,数据的来源,以及文件的同步状态 + */ +export type VersionedDataset = { + __typename?: "VersionedDataset"; + /** 添加一些辅助性记录信息 */ + annotations?: Maybe; + creationTimestamp: Scalars["Time"]["output"]; + /** 创建者,正查给你这个字段是不需要人写的,自动添加 */ + creator?: Maybe; + /** 数据处理状态,如果为空,表示还没有开始,其他表示 */ + dataProcessStatus?: Maybe; + /** 所属的数据集 */ + dataset: TypedObjectReference; + /** 展示名字, 与metadat.name不一样,这个展示名字是可以用中文的 */ + displayName: Scalars["String"]["output"]; + /** 该数据集版本所包含的数据总量 */ + fileCount: Scalars["Int"]["output"]; + /** 数据集所包含的文件,对于文件需要支持过滤和分页 */ + files: PaginatedResult; + /** 一些用于标记,选择的的标签 */ + labels?: Maybe; + /** 数据集名称, 这个应该是前端随机生成就可以,没有实际用途 */ + name: Scalars["String"]["output"]; + /** 数据集所在的namespace,也是后续桶的名字 */ + namespace: Scalars["String"]["output"]; + /** 该版本是否已经发布, 0是未发布,1是已经发布 */ + released: Scalars["Int"]["output"]; + /** 文件的同步状态, Processing或者'' 表示文件正在同步,Succeede 文件同步成功,Failed 存在文件同步失败 */ + syncStatus?: Maybe; + /** 更新时间, 这里更新指文件同步,或者数据处理完成后,做的更新操作的时间 */ + updateTimestamp?: Maybe; + /** 版本名称 */ + version: Scalars["String"]["output"]; +}; + +/** + * VersionedDataset + * 数据集的版本信息。 + * 主要记录版本名字,数据的来源,以及文件的同步状态 + */ +export type VersionedDatasetFilesArgs = { + input?: InputMaybe; +}; + +export type VersionedDatasetMutation = { + __typename?: "VersionedDatasetMutation"; + createVersionedDataset: VersionedDataset; + deleteVersionedDatasets?: Maybe; + updateVersionedDataset: VersionedDataset; +}; + +export type VersionedDatasetMutationCreateVersionedDatasetArgs = { + input: CreateVersionedDatasetInput; +}; + +export type VersionedDatasetMutationDeleteVersionedDatasetsArgs = { + input: DeleteVersionedDatasetInput; +}; + +export type VersionedDatasetMutationUpdateVersionedDatasetArgs = { + input: UpdateVersionedDatasetInput; +}; + +export type VersionedDatasetQuery = { + __typename?: "VersionedDatasetQuery"; + getVersionedDataset: VersionedDataset; + listVersionedDatasets: PaginatedResult; +}; + +export type VersionedDatasetQueryGetVersionedDatasetArgs = { name: Scalars["String"]["input"]; namespace: Scalars["String"]["input"]; }; -export type UpdateModelInput = { - annotations?: InputMaybe; - description?: InputMaybe; - displayName: Scalars["String"]["input"]; - labels?: InputMaybe; - name: Scalars["String"]["input"]; - namespace: Scalars["String"]["input"]; +export type VersionedDatasetQueryListVersionedDatasetsArgs = { + input: ListVersionedDatasetInput; +}; + +export type Filegroup = { + __typename?: "filegroup"; + path?: Maybe>; + source?: Maybe; +}; + +/** 源文件输入 */ +export type Filegroupinput = { + /** 路径 */ + path?: InputMaybe>; + /** 数据源字段 */ + source: TypedObjectReferenceInput; +}; + +export type ListDatasetsQueryVariables = Exact<{ + input?: InputMaybe; + versionsInput: ListVersionedDatasetInput; + filesInput?: InputMaybe; +}>; + +export type ListDatasetsQuery = { + __typename?: "Query"; + Dataset?: { + __typename?: "DatasetQuery"; + listDatasets: { + __typename?: "PaginatedResult"; + nodes?: Array< + | { + __typename?: "Dataset"; + name: string; + namespace: string; + creator?: string | null; + displayName: string; + updateTimestamp?: any | null; + contentType: string; + field?: string | null; + versionCount: number; + versions: { + __typename?: "PaginatedResult"; + nodes?: Array< + | { __typename?: "Dataset" } + | { __typename?: "Datasource" } + | { __typename?: "Embedder" } + | { __typename?: "F" } + | { __typename?: "KnowledgeBase" } + | { __typename?: "Model" } + | { + __typename?: "VersionedDataset"; + name: string; + namespace: string; + displayName: string; + files: { + __typename?: "PaginatedResult"; + nodes?: Array< + | { __typename?: "Dataset" } + | { __typename?: "Datasource" } + | { __typename?: "Embedder" } + | { + __typename?: "F"; + path: string; + fileType: string; + count?: number | null; + } + | { __typename?: "KnowledgeBase" } + | { __typename?: "Model" } + | { __typename?: "VersionedDataset" } + > | null; + }; + } + > | null; + }; + } + | { __typename?: "Datasource" } + | { __typename?: "Embedder" } + | { __typename?: "F" } + | { __typename?: "KnowledgeBase" } + | { __typename?: "Model" } + | { __typename?: "VersionedDataset" } + > | null; + }; + } | null; +}; + +export type GetDatasetQueryVariables = Exact<{ + name: Scalars["String"]["input"]; + namespace: Scalars["String"]["input"]; +}>; + +export type GetDatasetQuery = { + __typename?: "Query"; + Dataset?: { + __typename?: "DatasetQuery"; + getDataset: { + __typename?: "Dataset"; + name: string; + namespace: string; + creator?: string | null; + displayName: string; + updateTimestamp?: any | null; + contentType: string; + field?: string | null; + versionCount: number; + }; + } | null; +}; + +export type CreateDatasetMutationVariables = Exact<{ + input?: InputMaybe; +}>; + +export type CreateDatasetMutation = { + __typename?: "Mutation"; + Dataset?: { + __typename?: "DatasetMutation"; + createDataset: { + __typename?: "Dataset"; + name: string; + displayName: string; + labels?: any | null; + }; + } | null; +}; + +export type UpdateDatasetMutationVariables = Exact<{ + input?: InputMaybe; +}>; + +export type UpdateDatasetMutation = { + __typename?: "Mutation"; + Dataset?: { + __typename?: "DatasetMutation"; + updateDataset: { + __typename?: "Dataset"; + name: string; + displayName: string; + labels?: any | null; + }; + } | null; +}; + +export type DeleteDatasetsMutationVariables = Exact<{ + input?: InputMaybe; +}>; + +export type DeleteDatasetsMutation = { + __typename?: "Mutation"; + Dataset?: { + __typename?: "DatasetMutation"; + deleteDatasets?: any | null; + } | null; }; export type CreateDatasourceMutationVariables = Exact<{ @@ -290,7 +1060,7 @@ export type CreateDatasourceMutationVariables = Exact<{ export type CreateDatasourceMutation = { __typename?: "Mutation"; Datasource?: { - __typename?: "DatasourceMuation"; + __typename?: "DatasourceMutation"; createDatasource: { __typename?: "Datasource"; name: string; @@ -318,7 +1088,7 @@ export type UpdateDatasourceMutationVariables = Exact<{ export type UpdateDatasourceMutation = { __typename?: "Mutation"; Datasource?: { - __typename?: "DatasourceMuation"; + __typename?: "DatasourceMutation"; updateDatasource: { __typename?: "Datasource"; name: string; @@ -346,7 +1116,7 @@ export type DeleteDatasourceMutationVariables = Exact<{ export type DeleteDatasourceMutation = { __typename?: "Mutation"; Datasource?: { - __typename?: "DatasourceMuation"; + __typename?: "DatasourceMutation"; deleteDatasource?: any | null; } | null; }; @@ -364,6 +1134,7 @@ export type ListDatasourcesQuery = { totalCount: number; hasNextPage: boolean; nodes?: Array< + | { __typename: "Dataset" } | { __typename: "Datasource"; name: string; @@ -381,7 +1152,11 @@ export type ListDatasourcesQuery = { } | null; oss?: { __typename?: "Oss"; bucket?: string | null } | null; } + | { __typename: "Embedder" } + | { __typename: "F" } + | { __typename: "KnowledgeBase" } | { __typename: "Model" } + | { __typename: "VersionedDataset" } > | null; }; } | null; @@ -429,7 +1204,11 @@ export type ListModelsQuery = { totalCount: number; hasNextPage: boolean; nodes?: Array< + | { __typename: "Dataset" } | { __typename: "Datasource" } + | { __typename: "Embedder" } + | { __typename: "F" } + | { __typename: "KnowledgeBase" } | { __typename: "Model"; name: string; @@ -440,9 +1219,10 @@ export type ListModelsQuery = { displayName: string; description?: string | null; field: string; - modeltype: string; + modeltypes: string; updateTimestamp?: any | null; } + | { __typename: "VersionedDataset" } > | null; }; } | null; @@ -467,7 +1247,7 @@ export type GetModelQuery = { displayName: string; description?: string | null; field: string; - modeltype: string; + modeltypes: string; updateTimestamp?: any | null; }; } | null; @@ -491,7 +1271,7 @@ export type CreateModelMutation = { displayName: string; description?: string | null; field: string; - modeltype: string; + modeltypes: string; updateTimestamp?: any | null; }; } | null; @@ -515,7 +1295,7 @@ export type UpdateModelMutation = { displayName: string; description?: string | null; field: string; - modeltype: string; + modeltypes: string; updateTimestamp?: any | null; }; } | null; @@ -530,6 +1310,232 @@ export type DeleteModelMutation = { Model?: { __typename?: "ModelMutation"; deleteModel?: any | null } | null; }; +export type CreateVersionedDatasetMutationVariables = Exact<{ + input: CreateVersionedDatasetInput; +}>; + +export type CreateVersionedDatasetMutation = { + __typename?: "Mutation"; + VersionedDataset?: { + __typename?: "VersionedDatasetMutation"; + createVersionedDataset: { + __typename?: "VersionedDataset"; + name: string; + displayName: string; + creator?: string | null; + namespace: string; + version: string; + updateTimestamp?: any | null; + creationTimestamp: any; + fileCount: number; + released: number; + syncStatus?: string | null; + dataProcessStatus?: string | null; + }; + } | null; +}; + +export type UpdateVersionedDatasetMutationVariables = Exact<{ + input: UpdateVersionedDatasetInput; +}>; + +export type UpdateVersionedDatasetMutation = { + __typename?: "Mutation"; + VersionedDataset?: { + __typename?: "VersionedDatasetMutation"; + updateVersionedDataset: { + __typename?: "VersionedDataset"; + name: string; + displayName: string; + }; + } | null; +}; + +export type DeleteVersionedDatasetsMutationVariables = Exact<{ + input: DeleteVersionedDatasetInput; +}>; + +export type DeleteVersionedDatasetsMutation = { + __typename?: "Mutation"; + VersionedDataset?: { + __typename?: "VersionedDatasetMutation"; + deleteVersionedDatasets?: any | null; + } | null; +}; + +export type GetVersionedDatasetQueryVariables = Exact<{ + name: Scalars["String"]["input"]; + namespace: Scalars["String"]["input"]; + fileInput?: InputMaybe; +}>; + +export type GetVersionedDatasetQuery = { + __typename?: "Query"; + VersionedDataset?: { + __typename?: "VersionedDatasetQuery"; + getVersionedDataset: { + __typename?: "VersionedDataset"; + name: string; + displayName: string; + namespace: string; + creator?: string | null; + files: { + __typename?: "PaginatedResult"; + nodes?: Array< + | { __typename?: "Dataset" } + | { __typename?: "Datasource" } + | { __typename?: "Embedder" } + | { + __typename?: "F"; + path: string; + time?: any | null; + fileType: string; + count?: number | null; + } + | { __typename?: "KnowledgeBase" } + | { __typename?: "Model" } + | { __typename?: "VersionedDataset" } + > | null; + }; + }; + } | null; +}; + +export type ListVersionedDatasetsQueryVariables = Exact<{ + input: ListVersionedDatasetInput; + fileInput?: InputMaybe; +}>; + +export type ListVersionedDatasetsQuery = { + __typename?: "Query"; + VersionedDataset?: { + __typename?: "VersionedDatasetQuery"; + listVersionedDatasets: { + __typename?: "PaginatedResult"; + nodes?: Array< + | { __typename?: "Dataset" } + | { __typename?: "Datasource" } + | { __typename?: "Embedder" } + | { __typename?: "F" } + | { __typename?: "KnowledgeBase" } + | { __typename?: "Model" } + | { + __typename?: "VersionedDataset"; + name: string; + displayName: string; + namespace: string; + creator?: string | null; + files: { + __typename?: "PaginatedResult"; + nodes?: Array< + | { __typename?: "Dataset" } + | { __typename?: "Datasource" } + | { __typename?: "Embedder" } + | { + __typename?: "F"; + path: string; + time?: any | null; + fileType: string; + count?: number | null; + } + | { __typename?: "KnowledgeBase" } + | { __typename?: "Model" } + | { __typename?: "VersionedDataset" } + > | null; + }; + } + > | null; + }; + } | null; +}; + +export const ListDatasetsDocument = gql` + query listDatasets( + $input: ListDatasetInput + $versionsInput: ListVersionedDatasetInput! + $filesInput: FileFilter + ) { + Dataset { + listDatasets(input: $input) { + nodes { + ... on Dataset { + name + namespace + creator + displayName + updateTimestamp + contentType + field + versionCount + versions(input: $versionsInput) { + nodes { + ... on VersionedDataset { + name + namespace + displayName + files(input: $filesInput) { + nodes { + ... on F { + path + fileType + count + } + } + } + } + } + } + } + } + } + } + } +`; +export const GetDatasetDocument = gql` + query getDataset($name: String!, $namespace: String!) { + Dataset { + getDataset(name: $name, namespace: $namespace) { + name + namespace + creator + displayName + updateTimestamp + contentType + field + versionCount + } + } + } +`; +export const CreateDatasetDocument = gql` + mutation createDataset($input: CreateDatasetInput) { + Dataset { + createDataset(input: $input) { + name + displayName + labels + } + } + } +`; +export const UpdateDatasetDocument = gql` + mutation updateDataset($input: UpdateDatasetInput) { + Dataset { + updateDataset(input: $input) { + name + displayName + labels + } + } + } +`; +export const DeleteDatasetsDocument = gql` + mutation deleteDatasets($input: DeleteDatasetInput) { + Dataset { + deleteDatasets(input: $input) + } + } +`; export const CreateDatasourceDocument = gql` mutation createDatasource($input: CreateDatasourceInput!) { Datasource { @@ -649,7 +1655,7 @@ export const ListModelsDocument = gql` displayName description field - modeltype + modeltypes updateTimestamp } } @@ -669,7 +1675,7 @@ export const GetModelDocument = gql` displayName description field - modeltype + modeltypes updateTimestamp } } @@ -687,7 +1693,7 @@ export const CreateModelDocument = gql` displayName description field - modeltype + modeltypes updateTimestamp } } @@ -705,7 +1711,7 @@ export const UpdateModelDocument = gql` displayName description field - modeltype + modeltypes updateTimestamp } } @@ -718,6 +1724,97 @@ export const DeleteModelDocument = gql` } } `; +export const CreateVersionedDatasetDocument = gql` + mutation createVersionedDataset($input: CreateVersionedDatasetInput!) { + VersionedDataset { + createVersionedDataset(input: $input) { + name + displayName + creator + namespace + version + updateTimestamp + creationTimestamp + fileCount + released + syncStatus + dataProcessStatus + } + } + } +`; +export const UpdateVersionedDatasetDocument = gql` + mutation updateVersionedDataset($input: UpdateVersionedDatasetInput!) { + VersionedDataset { + updateVersionedDataset(input: $input) { + name + displayName + } + } + } +`; +export const DeleteVersionedDatasetsDocument = gql` + mutation deleteVersionedDatasets($input: DeleteVersionedDatasetInput!) { + VersionedDataset { + deleteVersionedDatasets(input: $input) + } + } +`; +export const GetVersionedDatasetDocument = gql` + query getVersionedDataset( + $name: String! + $namespace: String! + $fileInput: FileFilter + ) { + VersionedDataset { + getVersionedDataset(name: $name, namespace: $namespace) { + name + displayName + namespace + creator + files(input: $fileInput) { + nodes { + ... on F { + path + time + fileType + count + } + } + } + } + } + } +`; +export const ListVersionedDatasetsDocument = gql` + query listVersionedDatasets( + $input: ListVersionedDatasetInput! + $fileInput: FileFilter + ) { + VersionedDataset { + listVersionedDatasets(input: $input) { + nodes { + ... on VersionedDataset { + name + displayName + namespace + creator + files(input: $fileInput) { + nodes { + ... on F { + path + time + fileType + count + } + } + } + } + } + } + } + } +`; export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, @@ -736,6 +1833,79 @@ export function getSdk( withWrapper: SdkFunctionWrapper = defaultWrapper, ) { return { + listDatasets( + variables: ListDatasetsQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request(ListDatasetsDocument, variables, { + ...requestHeaders, + ...wrappedRequestHeaders, + }), + "listDatasets", + "query", + ); + }, + getDataset( + variables: GetDatasetQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request(GetDatasetDocument, variables, { + ...requestHeaders, + ...wrappedRequestHeaders, + }), + "getDataset", + "query", + ); + }, + createDataset( + variables?: CreateDatasetMutationVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request( + CreateDatasetDocument, + variables, + { ...requestHeaders, ...wrappedRequestHeaders }, + ), + "createDataset", + "mutation", + ); + }, + updateDataset( + variables?: UpdateDatasetMutationVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request( + UpdateDatasetDocument, + variables, + { ...requestHeaders, ...wrappedRequestHeaders }, + ), + "updateDataset", + "mutation", + ); + }, + deleteDatasets( + variables?: DeleteDatasetsMutationVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request( + DeleteDatasetsDocument, + variables, + { ...requestHeaders, ...wrappedRequestHeaders }, + ), + "deleteDatasets", + "mutation", + ); + }, createDatasource( variables: CreateDatasourceMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, @@ -880,6 +2050,81 @@ export function getSdk( "mutation", ); }, + createVersionedDataset( + variables: CreateVersionedDatasetMutationVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request( + CreateVersionedDatasetDocument, + variables, + { ...requestHeaders, ...wrappedRequestHeaders }, + ), + "createVersionedDataset", + "mutation", + ); + }, + updateVersionedDataset( + variables: UpdateVersionedDatasetMutationVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request( + UpdateVersionedDatasetDocument, + variables, + { ...requestHeaders, ...wrappedRequestHeaders }, + ), + "updateVersionedDataset", + "mutation", + ); + }, + deleteVersionedDatasets( + variables: DeleteVersionedDatasetsMutationVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request( + DeleteVersionedDatasetsDocument, + variables, + { ...requestHeaders, ...wrappedRequestHeaders }, + ), + "deleteVersionedDatasets", + "mutation", + ); + }, + getVersionedDataset( + variables: GetVersionedDatasetQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request( + GetVersionedDatasetDocument, + variables, + { ...requestHeaders, ...wrappedRequestHeaders }, + ), + "getVersionedDataset", + "query", + ); + }, + listVersionedDatasets( + variables: ListVersionedDatasetsQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request( + ListVersionedDatasetsDocument, + variables, + { ...requestHeaders, ...wrappedRequestHeaders }, + ), + "listVersionedDatasets", + "query", + ); + }, }; } export type Sdk = ReturnType; @@ -899,6 +2144,26 @@ export function getSdkWithHooks( ]; return { ...sdk, + useListDatasets( + variables: ListDatasetsQueryVariables, + config?: SWRConfigInterface, + ) { + return useSWR( + genKey("ListDatasets", variables), + () => sdk.listDatasets(variables), + config, + ); + }, + useGetDataset( + variables: GetDatasetQueryVariables, + config?: SWRConfigInterface, + ) { + return useSWR( + genKey("GetDataset", variables), + () => sdk.getDataset(variables), + config, + ); + }, useListDatasources( variables: ListDatasourcesQueryVariables, config?: SWRConfigInterface, @@ -939,6 +2204,32 @@ export function getSdkWithHooks( config, ); }, + useGetVersionedDataset( + variables: GetVersionedDatasetQueryVariables, + config?: SWRConfigInterface, + ) { + return useSWR( + genKey( + "GetVersionedDataset", + variables, + ), + () => sdk.getVersionedDataset(variables), + config, + ); + }, + useListVersionedDatasets( + variables: ListVersionedDatasetsQueryVariables, + config?: SWRConfigInterface, + ) { + return useSWR( + genKey( + "ListVersionedDatasets", + variables, + ), + () => sdk.listVersionedDatasets(variables), + config, + ); + }, }; } export type SdkWithHooks = ReturnType; diff --git a/graphql-server/go-server/graph/schema/dataset.gql b/graphql-server/go-server/graph/schema/dataset.gql new file mode 100644 index 000000000..37695452d --- /dev/null +++ b/graphql-server/go-server/graph/schema/dataset.gql @@ -0,0 +1,80 @@ +query listDatasets($input: ListDatasetInput, $versionsInput: ListVersionedDatasetInput!, $filesInput: FileFilter){ + Dataset { + listDatasets(input: $input) { + nodes { + ... on Dataset { + name + namespace + creator + displayName + updateTimestamp + contentType + field + versionCount + versions(input: $versionsInput) { + nodes { + ... on VersionedDataset { + name + namespace + displayName + files(input: $filesInput) { + nodes { + ... on F { + path + fileType + count + } + } + } + } + } + } + } + } + } + } +} + +query getDataset($name: String!, $namespace: String!){ + Dataset { + getDataset(name:$name, namespace:$namespace) { + name + namespace + creator + displayName + updateTimestamp + contentType + field + versionCount + } + } +} + + + +mutation createDataset($input: CreateDatasetInput){ + Dataset { + createDataset(input: $input){ + name + displayName + labels + } + } +} + + +mutation updateDataset($input: UpdateDatasetInput){ + Dataset { + updateDataset(input: $input){ + name + displayName + labels + } + } +} + +mutation deleteDatasets($input: DeleteDatasetInput){ + Dataset { + deleteDatasets(input: $input) + } +} diff --git a/graphql-server/go-server/graph/schema/model.gql b/graphql-server/go-server/graph/schema/model.gql index ffa7b8ab8..98a5f9cbc 100644 --- a/graphql-server/go-server/graph/schema/model.gql +++ b/graphql-server/go-server/graph/schema/model.gql @@ -15,7 +15,7 @@ query listModels($input: ListModelInput!){ displayName description field - modeltype + modeltypes updateTimestamp } } @@ -35,7 +35,7 @@ query getModel($name: String!, $namespace: String!) { displayName description field - modeltype + modeltypes updateTimestamp } } @@ -53,7 +53,7 @@ mutation createModel($input: CreateModelInput!) { displayName description field - modeltype + modeltypes updateTimestamp } } @@ -71,7 +71,7 @@ mutation updateModel($input: UpdateModelInput) { displayName description field - modeltype + modeltypes updateTimestamp } } diff --git a/graphql-server/go-server/graph/schema/versioned_dataset.gql b/graphql-server/go-server/graph/schema/versioned_dataset.gql new file mode 100644 index 000000000..fcbcf8554 --- /dev/null +++ b/graphql-server/go-server/graph/schema/versioned_dataset.gql @@ -0,0 +1,78 @@ +mutation createVersionedDataset($input:CreateVersionedDatasetInput!){ + VersionedDataset{ + createVersionedDataset(input: $input) { + name + displayName + creator + namespace + version + updateTimestamp + creationTimestamp + fileCount + released + syncStatus + dataProcessStatus + } + } +} + +mutation updateVersionedDataset($input: UpdateVersionedDatasetInput!){ + VersionedDataset{ + updateVersionedDataset(input: $input) { + name + displayName + } + } +} + +mutation deleteVersionedDatasets($input: DeleteVersionedDatasetInput!){ + VersionedDataset{ + deleteVersionedDatasets(input: $input) + } +} + +query getVersionedDataset($name: String!, $namespace: String!, $fileInput: FileFilter){ + VersionedDataset{ + getVersionedDataset(name: $name, namespace: $namespace) { + name + displayName + namespace + creator + files(input: $fileInput){ + nodes { + ... on F { + path + time + fileType + count + } + } + } + } + } +} + +query listVersionedDatasets($input: ListVersionedDatasetInput!, $fileInput: FileFilter) { + VersionedDataset{ + listVersionedDatasets(input: $input) { + nodes { + ... on VersionedDataset { + name + displayName + namespace + creator + files(input: $fileInput){ + nodes { + ... on F { + path + time + fileType + count + } + } + } + } + } + } + } +}