feat: manually mirror opencoze's code from bytedance

Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
fanlv
2025-07-20 17:36:12 +08:00
commit 890153324f
14811 changed files with 1923430 additions and 0 deletions

View File

@@ -0,0 +1,546 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './namespaces/base';
import * as flow_devops_nclc_custom_component from './namespaces/flow_devops_nclc_custom_component';
import * as flow_devops_nclc_eino_plugin from './namespaces/flow_devops_nclc_eino_plugin';
import * as flow_devops_nclc_entity from './namespaces/flow_devops_nclc_entity';
import * as flow_devops_nclc_schema_frontend from './namespaces/flow_devops_nclc_schema_frontend';
import * as flow_devops_nclc_schema_registry from './namespaces/flow_devops_nclc_schema_registry';
import * as flow_devops_nclc_workflow from './namespaces/flow_devops_nclc_workflow';
export {
base,
flow_devops_nclc_custom_component,
flow_devops_nclc_eino_plugin,
flow_devops_nclc_entity,
flow_devops_nclc_schema_frontend,
flow_devops_nclc_schema_registry,
flow_devops_nclc_workflow,
};
export * from './namespaces/base';
export * from './namespaces/flow_devops_nclc_custom_component';
export * from './namespaces/flow_devops_nclc_eino_plugin';
export * from './namespaces/flow_devops_nclc_entity';
export * from './namespaces/flow_devops_nclc_schema_frontend';
export * from './namespaces/flow_devops_nclc_schema_registry';
export * from './namespaces/flow_devops_nclc_workflow';
export type Int64 = string | number;
export default class FornaxNclcService<T> {
private request: any = () => {
throw new Error('FornaxNclcService.request is undefined');
};
private baseURL: string | ((path: string) => string) = '';
constructor(options?: {
baseURL?: string | ((path: string) => string);
request?<R>(
params: {
url: string;
method: 'GET' | 'DELETE' | 'POST' | 'PUT' | 'PATCH';
data?: any;
params?: any;
headers?: any;
},
options?: T,
): Promise<R>;
}) {
this.request = options?.request || this.request;
this.baseURL = options?.baseURL || '';
}
private genBaseURL(path: string) {
return typeof this.baseURL === 'string'
? this.baseURL + path
: this.baseURL(path);
}
/**
* POST /api/nclc/v1/test_run/:space_id/:flow_id
*
* TestRun 测试运行工作流.
*/
TestRun(
req: flow_devops_nclc_workflow.TestRunRequest,
options?: T,
): Promise<flow_devops_nclc_workflow.TestRunResponse> {
const _req = req;
const url = this.genBaseURL(
`/api/nclc/v1/test_run/${_req['space_id']}/${_req['flow_id']}`,
);
const method = 'POST';
const data = {
data: _req['data'],
inputs: _req['inputs'],
base: _req['base'],
};
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, data, headers }, options);
}
/**
* POST /api/nclc/v1/create_flow
*
* CreateFlow 创建工作流.
*/
CreateFlow(
req: flow_devops_nclc_workflow.CreateFlowRequest,
options?: T,
): Promise<flow_devops_nclc_workflow.CreateFlowResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/create_flow');
const method = 'POST';
const data = { flow: _req['flow'], base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, data, headers }, options);
}
/**
* POST /api/nclc/v1/export/:space_id/:flow_id
*
* Export 导出工作流.
*/
Export(
req: flow_devops_nclc_workflow.ExportRequest,
options?: T,
): Promise<flow_devops_nclc_workflow.ExportResponse> {
const _req = req;
const url = this.genBaseURL(
`/api/nclc/v1/export/${_req['space_id']}/${_req['flow_id']}`,
);
const method = 'POST';
const data = { data: _req['data'], base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, data, headers }, options);
}
/**
* GET /api/nclc/v1/query_flow/:space_id/:flow_id
*
* QueryFlow 查询工作流.
*/
QueryFlow(
req: flow_devops_nclc_workflow.QueryFlowRequest,
options?: T,
): Promise<flow_devops_nclc_workflow.QueryFlowResponse> {
const _req = req;
const url = this.genBaseURL(
`/api/nclc/v1/query_flow/${_req['space_id']}/${_req['flow_id']}`,
);
const method = 'GET';
const params = { base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/**
* POST /api/nclc/v1/delete_flow/:space_id/:flow_id
*
* DeleteFlow 删除工作流.
*/
DeleteFlow(
req: flow_devops_nclc_workflow.DeleteFlowRequest,
options?: T,
): Promise<flow_devops_nclc_workflow.DeleteFlowResponse> {
const _req = req;
const url = this.genBaseURL(
`/api/nclc/v1/delete_flow/${_req['space_id']}/${_req['flow_id']}`,
);
const method = 'POST';
const data = { base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, data, headers }, options);
}
/**
* PUT /api/nclc/v1/update_flow_meta/:space_id/:flow_id
*
* UpdateFlowMeta 更新工作流元信息.
*/
UpdateFlowMeta(
req: flow_devops_nclc_workflow.UpdateFlowMetaRequest,
options?: T,
): Promise<flow_devops_nclc_workflow.UpdateFlowMetaResponse> {
const _req = req;
const url = this.genBaseURL(
`/api/nclc/v1/update_flow_meta/${_req['space_id']}/${_req['flow_id']}`,
);
const method = 'PUT';
const data = { meta: _req['meta'], base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, data, headers }, options);
}
/**
* GET /api/nclc/v1/list_flows/:space_id
*
* ListFlows 按 spaceID 查询工作流.
*/
ListFlows(
req: flow_devops_nclc_workflow.ListFlowsRequest,
options?: T,
): Promise<flow_devops_nclc_workflow.ListFlowsResponse> {
const _req = req;
const url = this.genBaseURL(`/api/nclc/v1/list_flows/${_req['space_id']}`);
const method = 'GET';
const params = { base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/**
* GET /api/nclc/v1/list_components/:space_id
*
* ListComponents 按 space 拉取组件元信息.
*/
ListComponents(
req: flow_devops_nclc_schema_frontend.ListComponentsRequest,
options?: T,
): Promise<flow_devops_nclc_schema_frontend.ListComponentsResponse> {
const _req = req;
const url = this.genBaseURL(
`/api/nclc/v1/list_components/${_req['space_id']}`,
);
const method = 'GET';
const params = { base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/**
* PUT /api/nclc/v1/update_flow/:space_id/:flow_id
*
* UpdateFlow 更新工作流.
*/
UpdateFlow(
req: flow_devops_nclc_workflow.UpdateFlowRequest,
options?: T,
): Promise<flow_devops_nclc_workflow.UpdateFlowResponse> {
const _req = req;
const url = this.genBaseURL(
`/api/nclc/v1/update_flow/${_req['space_id']}/${_req['flow_id']}`,
);
const method = 'PUT';
const data = { data: _req['data'], base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, data, headers }, options);
}
/**
* PUT /api/nclc/v1/component/update
*
* 更新组件
*/
UpdateCustomComponent(
req: flow_devops_nclc_custom_component.UpdateCustomComponentRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.UpdateCustomComponentResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/update');
const method = 'PUT';
const data = { component: _req['component'], base: _req['base'] };
const params = {
space_id: _req['space_id'],
component_id: _req['component_id'],
};
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, data, params, headers }, options);
}
/**
* GET /api/nclc/v1/component/list
*
* 获取组件列表
*/
ListCustomComponent(
req: flow_devops_nclc_custom_component.ListCustomComponentRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.ListCustomComponentResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/list');
const method = 'GET';
const params = {
space_id: _req['space_id'],
page: _req['page'],
page_size: _req['page_size'],
key_word: _req['key_word'],
creator_i_d: _req['creator_i_d'],
base: _req['base'],
};
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/**
* GET /api/nclc/v1/component/get
*
* 获取组件详情
*/
GetCustomComponent(
req: flow_devops_nclc_custom_component.GetCustomComponentRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.GetCustomComponentResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/get');
const method = 'GET';
const params = {
space_id: _req['space_id'],
component_id: _req['component_id'],
base: _req['base'],
};
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/**
* DELETE /api/nclc/v1/component/delete
*
* 删除组件
*/
DeleteCustomComponent(
req: flow_devops_nclc_custom_component.DeleteCustomComponentRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.DeleteCustomComponentResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/delete');
const method = 'DELETE';
const params = {
space_id: _req['space_id'],
component_id: _req['component_id'],
base: _req['base'],
};
const headers = {
'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'],
'X-Jwt-Token': _req['X-Jwt-Token'],
};
return this.request({ url, method, params, headers }, options);
}
/**
* POST /api/nclc/v1/component/release
*
* 发布组件
*/
ReleaseCustomComponent(
req: flow_devops_nclc_custom_component.ReleaseCustomComponentRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.ReleaseCustomComponentResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/release');
const method = 'POST';
const data = {
component_release: _req['component_release'],
base: _req['base'],
};
const params = {
component_id: _req['component_id'],
space_id: _req['space_id'],
};
const headers = {
'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'],
'X-Jwt-Token': _req['X-Jwt-Token'],
};
return this.request({ url, method, data, params, headers }, options);
}
/**
* GET /api/nclc/v1/component/type/list
*
* 获取组件类型列表
*/
ListSupportComponentType(
req: flow_devops_nclc_custom_component.ListSupportComponentTypeRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.ListSupportComponentTypeResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/type/list');
const method = 'GET';
const params = {
space_id: _req['space_id'],
page: _req['page'],
page_size: _req['page_size'],
base: _req['base'],
};
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/** POST /api/nclc/v1/component/ide_launch */
IDELaunch(
req: flow_devops_nclc_custom_component.IDELaunchRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.IDELaunchResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/ide_launch');
const method = 'POST';
const data = { base: _req['base'] };
const params = { space_id: _req['space_id'] };
const headers = {
'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'],
'X-Jwt-Token': _req['X-Jwt-Token'],
};
return this.request({ url, method, data, params, headers }, options);
}
/**
* POST /api/nclc/v1/component/create
*
* 自定义组件
*
* 创建组件
*/
CreateCustomComponent(
req: flow_devops_nclc_custom_component.CreateCustomComponentRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.CreateCustomComponentResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/create');
const method = 'POST';
const data = { component: _req['component'], base: _req['base'] };
const params = { space_id: _req['space_id'] };
const headers = {
'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'],
'X-Jwt-Token': _req['X-Jwt-Token'],
};
return this.request({ url, method, data, params, headers }, options);
}
/**
* GET /api/nclc/v1/component/release/list
*
* 获取组件版本发布列表
*/
ListCustomComponentReleaseRecord(
req: flow_devops_nclc_custom_component.ListCustomComponentReleaseRecordRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.ListCustomComponentReleaseRecordResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/release/list');
const method = 'GET';
const params = {
space_id: _req['space_id'],
component_id: _req['component_id'],
page: _req['page'],
page_size: _req['page_size'],
base: _req['base'],
};
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/**
* GET /api/nclc/v1/component/release/get
*
* 获取组件版本发布详情, 用于轮询发布状态
*/
GetCustomComponentReleaseRecord(
req: flow_devops_nclc_custom_component.GetCustomComponentReleaseRecordRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.GetCustomComponentReleaseRecordResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/release/get');
const method = 'GET';
const params = {
space_id: _req['space_id'],
component_id: _req['component_id'],
release_id: _req['release_id'],
base: _req['base'],
};
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/**
* GET /api/nclc/v2/component/template_info/list
*
* 获取组件模板信息列表
*/
ListComponentTemplateInfo(
req: flow_devops_nclc_custom_component.ListComponentTemplateInfoRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.ListComponentTemplateInfoResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v2/component/template_info/list');
const method = 'GET';
const params = { space_id: _req['space_id'], base: _req['base'] };
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/**
* GET /api/nclc/v1/component/component_key_valid
*
* 用于创建前校验ComponentKey冲突
*/
IsComponentKeyValid(
req: flow_devops_nclc_custom_component.IsComponentKeyValidRequest,
options?: T,
): Promise<flow_devops_nclc_custom_component.IsComponentKeyValidResponse> {
const _req = req;
const url = this.genBaseURL('/api/nclc/v1/component/component_key_valid');
const method = 'GET';
const params = {
space_id: _req['space_id'],
component_key: _req['component_key'],
base: _req['base'],
};
const headers = { 'FlowDevops-Agw-UserId': _req['FlowDevops-Agw-UserId'] };
return this.request({ url, method, params, headers }, options);
}
/** GET /api/nclc/v1/plugin/eino_tool/source */
GetEinoToolSource(
req?: flow_devops_nclc_eino_plugin.EinoToolSourceRequest,
options?: T,
): Promise<flow_devops_nclc_eino_plugin.EinoToolSourceResponse> {
const _req = req || {};
const url = this.genBaseURL('/api/nclc/v1/plugin/eino_tool/source');
const method = 'GET';
const params = {
arch: _req['arch'],
system: _req['system'],
plugin_version: _req['plugin_version'],
platform: _req['platform'],
base: _req['base'],
};
const headers = { Host: _req['Host'] };
return this.request({ url, method, params, headers }, options);
}
/** GET /api/nclc/v1/plugin/tools/version */
GetEinoToolsVersion(
req?: flow_devops_nclc_eino_plugin.EinoToolsVersionRequest,
options?: T,
): Promise<flow_devops_nclc_eino_plugin.EinoToolsVersionResponse> {
const _req = req || {};
const url = this.genBaseURL('/api/nclc/v1/plugin/tools/version');
const method = 'GET';
const params = {
platform: _req['platform'],
plugin_version: _req['plugin_version'],
base: _req['base'],
};
return this.request({ url, method, params }, options);
}
}
/* eslint-enable */

View File

@@ -0,0 +1,43 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export interface Base {
log_i_d?: string;
caller?: string;
addr?: string;
client?: string;
traffic_env?: TrafficEnv;
extra?: Record<string, string>;
}
export interface BaseResp {
status_message?: string;
status_code?: number;
extra?: Record<string, string>;
}
export interface TrafficEnv {
open?: boolean;
env?: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,333 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
export type Int64 = string | number;
export enum ComponentCreateStatus {
Undefined = 0,
/** 创建中 */
Creating = 1,
/** 创建成功 */
CreateSuccess = 2,
/** 创建失败 */
CreateFailed = 3,
}
export enum ComponentLanguage {
Undefined = 0,
Go = 1,
}
export enum ComponentReleaseStatus {
Undefined = 0,
/** 发布中 */
InRelease = 1,
/** 发布成功 */
ReleaseSuccess = 2,
/** 发布失败 */
ReleaseFailed = 3,
}
/** 组件类型枚举 */
export enum ComponentType {
Undefined = 0,
ChatModel = 1,
ToolAgent = 2,
}
export interface ComponentTemplateInfo {
/** 模板名称 */
name?: string;
/** 模板描述 */
description?: string;
/** 组件类型 */
type?: ComponentType;
/** 模板语言 */
language?: ComponentLanguage;
}
export interface CreateCustomComponentRequest {
'FlowDevops-Agw-UserId'?: string;
space_id: Int64;
/** 组件信息 */
component?: CustomComponent;
'X-Jwt-Token'?: string;
base?: base.Base;
}
export interface CreateCustomComponentResponse {
component_id: Int64;
base_resp?: base.BaseResp;
}
export interface CustomComponent {
/** Component ID */
id?: Int64;
/** 唯一标识 */
component_key?: string;
/** Component名称 */
display_name?: string;
/** Component描述 */
description?: string;
/** Component类型 */
component_type?: ComponentType;
/** 创建者ID */
creator_id?: Int64;
/** 创建时间 */
create_tsms?: Int64;
/** 更新时间 */
update_tsms?: Int64;
/** 状态 */
status?: ComponentCreateStatus;
/** 版本 */
version?: string;
/** 组件实现语言 */
language?: ComponentLanguage;
/** 组件图标 */
icon?: Icon;
/** 组件仓库地址 */
repo?: string;
/** 组件Cloud IDE Workspace信息 */
workspace_info?: WorkspaceInfo;
}
export interface CustomComponentReleaseRecord {
/** Component Release ID */
release_id?: Int64;
/** Component ID */
component_id?: Int64;
/** 组件版本 */
component_version?: string;
/** 组件版本对应的codebase Tag */
tag?: string;
/** 版本描述 */
description?: string;
/** 发布人 */
creator_id?: Int64;
/** 创建时间 */
create_tsms?: Int64;
/** 更新时间 */
update_tsms?: Int64;
/** 版本发布状态 */
status?: ComponentReleaseStatus;
/** 错误信息 */
err_info?: ErrInfo;
}
export interface DeleteCustomComponentRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
/** Component ID */
component_id: Int64;
'X-Jwt-Token'?: string;
base?: base.Base;
}
export interface DeleteCustomComponentResponse {
base_resp?: base.BaseResp;
}
export interface ErrInfo {
/** 错误码 */
code?: number;
/** 错误信息 */
message?: string;
log_id?: string;
}
export interface GetCustomComponentReleaseRecordRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
/** Component ID */
component_id: Int64;
release_id: Int64;
base?: base.Base;
}
export interface GetCustomComponentReleaseRecordResponse {
/** 组件版本发布信息 */
release_record?: CustomComponentReleaseRecord;
base_resp?: base.BaseResp;
}
export interface GetCustomComponentRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
/** Component ID */
component_id: Int64;
base?: base.Base;
}
export interface GetCustomComponentResponse {
/** 组件信息 */
component?: CustomComponent;
base_resp?: base.BaseResp;
}
export interface Icon {
/** frontend -> backend */
uri?: string;
/** backend -> frontend */
url?: string;
}
export interface IDELaunchRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
'X-Jwt-Token': string;
base?: base.Base;
}
export interface IDELaunchResponse {
/** 组件Cloud IDE Workspace信息 */
workspace_info?: WorkspaceInfo;
/** 是否有cloud ide权限 */
has_auth?: boolean;
base_resp?: base.BaseResp;
}
export interface IsComponentKeyValidRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
/** 组件标识 */
component_key: string;
base?: base.Base;
}
export interface IsComponentKeyValidResponse {
/** component_key是否有效 */
is_valid?: boolean;
base_resp?: base.BaseResp;
}
export interface ListComponentTemplateInfoRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
base?: base.Base;
}
export interface ListComponentTemplateInfoResponse {
/** 组件模板信息 */
component_templates?: Array<ComponentTemplateInfo>;
base_resp?: base.BaseResp;
}
export interface ListCustomComponentReleaseRecordRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
/** Component ID */
component_id: Int64;
page?: Int64;
page_size?: Int64;
base?: base.Base;
}
export interface ListCustomComponentReleaseRecordResponse {
component_release_records?: Array<CustomComponentReleaseRecord>;
total?: Int64;
base_resp?: base.BaseResp;
}
export interface ListCustomComponentRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
page?: Int64;
page_size?: Int64;
/** 模糊搜索
name/key模糊匹配 */
key_word?: string;
/** 创建者ID */
creator_i_d?: Int64;
base?: base.Base;
}
export interface ListCustomComponentResponse {
/** 组件信息 */
components?: Array<CustomComponent>;
total?: Int64;
base_resp?: base.BaseResp;
}
export interface ListSupportComponentTypeRequest {
'FlowDevops-Agw-UserId'?: string;
space_id: Int64;
page?: Int64;
page_size?: Int64;
base?: base.Base;
}
export interface ListSupportComponentTypeResponse {
/** 组件类型 */
component_types?: Array<ComponentType>;
total?: Int64;
base_resp?: base.BaseResp;
}
export interface ReleaseCustomComponentRequest {
/** Component ID */
component_id: Int64;
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
/** 组件版本发布信息 */
component_release?: CustomComponentReleaseRecord;
'X-Jwt-Token'?: string;
base?: base.Base;
}
export interface ReleaseCustomComponentResponse {
release_id: Int64;
base_resp?: base.BaseResp;
}
export interface UpdateCustomComponentRequest {
'FlowDevops-Agw-UserId'?: string;
/** 空间ID */
space_id: Int64;
/** Component ID */
component_id: Int64;
component?: CustomComponent;
base?: base.Base;
}
export interface UpdateCustomComponentResponse {
base_resp?: base.BaseResp;
}
export interface WorkspaceInfo {
/** cloudide workspace id */
workspace_id?: string;
/** cloudide workspace url */
workspace_url?: string;
/** workspace 登陆状态 */
workspace_launched?: boolean;
}
/* eslint-enable */

View File

@@ -0,0 +1,64 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
export type Int64 = string | number;
export enum Platform {
UnKnown = 0,
Goland = 1,
VsCode = 2,
}
export interface EinoDevopsVersion {
min?: string;
max?: string;
exclude?: Array<string>;
}
export interface EinoToolSourceRequest {
arch?: string;
system?: string;
plugin_version?: string;
platform?: Platform;
Host?: string;
base?: base.Base;
}
export interface EinoToolSourceResponse {
download_url?: string;
base_resp?: base.BaseResp;
}
export interface EinoToolsVersionRequest {
platform?: Platform;
plugin_version?: string;
base?: base.Base;
}
export interface EinoToolsVersionResponse {
platform?: Platform;
eino_tool_version?: string;
eino_devops_version?: EinoDevopsVersion;
base_resp?: base.BaseResp;
}
/* eslint-enable */

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export interface Session {
'FlowDevops-Agw-UserId'?: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,130 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
export type Int64 = string | number;
export interface ComponentMeta {
/** component 跨空间的唯一标识。自定义组件可能是组件作者自己确定的。可读。 */
type: string;
/** 组件所属的分组,如 ChatModel, Prompt, Retriever 等。可读。 */
group: string;
/** 一个 Group 对应一个 interface name决定是否可以进入特定的 slot。可读。 */
interface_name: string;
/** Group 决定了这个组件能否进入编排,还是只能作为 slot 配置。true 则可以进入编排,可以作为 passthrough 节点的上游 */
is_composable: boolean;
definition: Definition;
/** 除了上面的 interface name 之外,这个组件还可以用作哪些 interface从而可以进入对应的 Slot */
assignable_to?: Array<string>;
}
export interface Definition {
info: Info;
/** 前端框架用的,服务端不感知内容 */
meta?: string;
slots?: Array<Slot>;
/** 如果一个组件,只能作为配置进入 slot此字段为空 */
input?: TypeMeta;
/** 如果一个组件,只能作为配置进入 slot此字段为空 */
output?: TypeMeta;
/** 里面的字段都展开为基本类型,直接在页面上写。如果 Config 中某个字段是嵌套的 Object那个 Object 也不应该是 Component否则应该进入 slot而不是 config */
config?: TypeSchema;
}
export interface Doc {
name: string;
link: string;
}
export interface Info {
name: string;
icon?: string;
description?: string;
docs?: Array<Doc>;
}
export interface ListComponentsRequest {
'FlowDevops-Agw-UserId'?: string;
space_id: string;
base?: base.Base;
}
export interface ListComponentsResponse {
/** key 是 group */
official_components?: Record<string, Array<ComponentMeta>>;
/** key 是 group */
custom_components?: Record<string, Array<ComponentMeta>>;
base_resp?: base.BaseResp;
}
export interface Option {
label: string;
/** JSON 序列化的结果 */
value: string;
}
export interface OptionEnum {
ode?: string;
options?: Array<Option>;
}
export interface Slot {
/** 可读 */
slot_name: string;
/** 这个 slot 接受的类型,一般是个接口定义,可读 */
interface_name: string;
required?: boolean;
/** 数组类型的 slot */
multiple?: boolean;
}
export interface TypeMeta {
/** input 或 output 的类型枚举,数字 */
type_id: string;
/** 对一个结构体的 schema 描述,可以是 input、output、config或者里面的某个字段 */
schema: TypeSchema;
/** 可读 */
type_name?: string;
}
export interface TypeSchema {
/** 可读 */
type: string;
/** 当类型为数组时,有值,代表数组中元素的 schema */
items?: TypeSchema;
/** 当类型为 object 时有值key 为字段名称value 为字段的 schema */
properties?: Record<string, TypeSchema>;
/** 当类型为 object 时,有值,数组元素为字段的 schema */
property_list?: Array<TypeSchema>;
name?: string;
title?: string;
description?: string;
/** JSON 序列化的结果 */
default_value?: string;
hidden?: boolean;
read_only?: boolean;
required?: boolean;
option_enum?: OptionEnum;
/** 前端需要的定制信息,服务端不感知 */
style_meta?: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export enum FactoryType {
/** func(config) impl */
Simple = 0,
/** func(ctx, config) (impl, err) */
Common = 1,
}
export enum Kind {
/** 与 golang 的 reflect.Kind 并不是完全对应的,不能依赖 value 直接转换 */
Invalid = 0,
String = 1,
Bool = 2,
Array = 3,
Struct = 4,
Map = 5,
Interface = 6,
Int = 7,
Int64 = 8,
Int32 = 9,
Int16 = 10,
Int8 = 11,
UInt = 12,
Uint64 = 13,
Uint32 = 14,
Uint16 = 15,
Uint8 = 16,
Float64 = 17,
Float32 = 18,
Ptr = 19,
}
export enum Source {
FirstParty = 0,
Custom = 1,
}
/* eslint-enable */

View File

@@ -0,0 +1,156 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
export type Int64 = string | number;
export enum NodeExecutionStatus {
NotStarted = 0,
Executing = 1,
Completed = 2,
Error = 3,
}
export enum WorkflowExecutionStatus {
NotStarted = 0,
Executing = 1,
Completed = 2,
Error = 3,
}
export interface CreateFlowRequest {
flow: Workflow;
'FlowDevops-Agw-UserId'?: string;
base?: base.Base;
}
export interface CreateFlowResponse {
/** 如果生成成功,会返回服务端生成的 flow ID */
flow_id?: string;
base_resp?: base.BaseResp;
}
export interface DeleteFlowRequest {
flow_id: string;
'FlowDevops-Agw-UserId'?: string;
space_id: string;
base?: base.Base;
}
export interface DeleteFlowResponse {
base_resp?: base.BaseResp;
}
export interface ExportRequest {
flow_id: string;
'FlowDevops-Agw-UserId'?: string;
space_id: string;
data: string;
base?: base.Base;
}
export interface ExportResponse {
compressed_file?: string;
base_resp?: base.BaseResp;
}
export interface ListFlowsRequest {
'FlowDevops-Agw-UserId'?: string;
space_id: string;
base?: base.Base;
}
export interface ListFlowsResponse {
flows?: Array<Workflow>;
base_resp?: base.BaseResp;
}
export interface QueryFlowRequest {
flow_id: string;
'FlowDevops-Agw-UserId'?: string;
space_id: string;
base?: base.Base;
}
export interface QueryFlowResponse {
flow?: Workflow;
base_resp?: base.BaseResp;
}
export interface TestRunRequest {
flow_id: string;
'FlowDevops-Agw-UserId'?: string;
space_id: string;
data: string;
/** key 是 node IDvalue 是该 node 的 input 的 json 序列化结果 */
inputs: Record<string, string>;
base?: base.Base;
}
export interface TestRunResponse {
/** test run 的 ID */
id?: string;
log_id?: string;
/** 如执行成功,这里是最终 output 的 json 序列化结果 */
result?: string;
base_resp?: base.BaseResp;
}
export interface UpdateFlowMetaRequest {
flow_id: string;
'FlowDevops-Agw-UserId'?: string;
space_id: string;
meta: WorkflowMeta;
base?: base.Base;
}
export interface UpdateFlowMetaResponse {
base_resp?: base.BaseResp;
}
export interface UpdateFlowRequest {
flow_id: string;
'FlowDevops-Agw-UserId'?: string;
space_id: string;
data: string;
base?: base.Base;
}
export interface UpdateFlowResponse {
base_resp?: base.BaseResp;
}
export interface Workflow {
id?: string;
space_id?: string;
creator?: string;
meta?: WorkflowMeta;
/** 包含配置数据的一个 workflow 的描述,前端决定格式,服务端理解 */
data?: string;
}
export interface WorkflowMeta {
name?: string;
description?: string;
icon?: string;
}
/* eslint-enable */