feat: manually mirror opencoze's code from bytedance
Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
1
frontend/packages/arch/idl/src/auto-generated/.bam-mark
Normal file
1
frontend/packages/arch/idl/src/auto-generated/.bam-mark
Normal file
@@ -0,0 +1 @@
|
||||
0ffc9936aeed1a26a88156ee2802d306
|
||||
1061
frontend/packages/arch/idl/src/auto-generated/app_builder/index.ts
Normal file
1061
frontend/packages/arch/idl/src/auto-generated/app_builder/index.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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 {
|
||||
LogID?: string;
|
||||
Caller?: string;
|
||||
Addr?: string;
|
||||
Client?: string;
|
||||
TrafficEnv?: TrafficEnv;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface BaseResp {
|
||||
StatusMessage?: string;
|
||||
StatusCode?: number;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface TrafficEnv {
|
||||
Open?: boolean;
|
||||
Env?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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 MDType {
|
||||
Default = 0,
|
||||
Image = 1,
|
||||
Audio = 2,
|
||||
Video = 3,
|
||||
Document = 4,
|
||||
Font = 5,
|
||||
Archive = 6,
|
||||
Other = 255,
|
||||
}
|
||||
|
||||
export interface FileChunk {
|
||||
seq_id?: number;
|
||||
content?: string;
|
||||
}
|
||||
|
||||
export interface FileListRPCMeta {
|
||||
Uri?: string;
|
||||
Name?: string;
|
||||
CreateTime?: Int64;
|
||||
Format?: string;
|
||||
/** 文件大小 */
|
||||
Size?: Int64;
|
||||
/** 文件大类, 精确匹配 */
|
||||
MdType?: number;
|
||||
/** 可访问url, 不保证持久化 */
|
||||
Url?: string;
|
||||
}
|
||||
|
||||
export interface FileMetaInfo {
|
||||
id: string;
|
||||
file_id: string;
|
||||
file_name: string;
|
||||
md_type: MDType;
|
||||
format: string;
|
||||
uri: string;
|
||||
position: string;
|
||||
device: string;
|
||||
size: number;
|
||||
tags: string;
|
||||
created_at_ms: Int64;
|
||||
updated_at_ms: Int64;
|
||||
user_id: Int64;
|
||||
conversation_id: Int64;
|
||||
biz_type: string;
|
||||
biz_id: string;
|
||||
/** 注意:该字段返回给前端可能因精度丢失而不一致 */
|
||||
bot_id: Int64;
|
||||
message_id: Int64;
|
||||
/** 原图地址 */
|
||||
normal_file_url?: FileURL;
|
||||
/** 缩略图地址 */
|
||||
thumbnail_file_url?: FileURL;
|
||||
/** 图片 meta 信息,当文件类型为图片时有效 */
|
||||
image_meta?: ImageMeta;
|
||||
/** 255:文件未构建索引; 254:没有启用byterag; 0:rag索引构建成功; 1:rag索引构建中; 2:rag索引构建失败; 3:rag索引已删除 */
|
||||
rag_document_status?: Int64;
|
||||
/** rag内容的切片数 */
|
||||
rag_content_chunk_num?: number;
|
||||
}
|
||||
|
||||
export interface FileSearchItem {
|
||||
file_name?: string;
|
||||
file_url?: string;
|
||||
content?: string;
|
||||
}
|
||||
|
||||
export interface FileURL {
|
||||
main_url: string;
|
||||
backup_url: string;
|
||||
}
|
||||
|
||||
export interface FileURLData {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface ImageMeta {
|
||||
/** 图片宽度,单位:px */
|
||||
width: number;
|
||||
/** 图片高度,单位:px */
|
||||
height: number;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,268 @@
|
||||
/*
|
||||
* 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 Auth {
|
||||
NO = 0,
|
||||
SERVICE = 1,
|
||||
USER = 2,
|
||||
OAUTH = 3,
|
||||
}
|
||||
|
||||
export enum ConditionType {
|
||||
Equal = 1,
|
||||
NotEqual = 2,
|
||||
LengthGt = 3,
|
||||
LengthGtEqual = 4,
|
||||
LengthLt = 5,
|
||||
LengthLtEqual = 6,
|
||||
Contains = 7,
|
||||
NotContains = 8,
|
||||
Null = 9,
|
||||
NotNull = 10,
|
||||
True = 11,
|
||||
False = 12,
|
||||
Gt = 13,
|
||||
GtEqual = 14,
|
||||
Lt = 15,
|
||||
LtEqual = 16,
|
||||
}
|
||||
|
||||
export enum IfConditionRelation {
|
||||
And = 1,
|
||||
Or = 2,
|
||||
}
|
||||
|
||||
export enum InputType {
|
||||
String = 1,
|
||||
Integer = 2,
|
||||
Boolean = 3,
|
||||
Number = 4,
|
||||
Array = 5,
|
||||
Object = 6,
|
||||
}
|
||||
|
||||
export enum InstallStatus {
|
||||
USING = 1,
|
||||
REMOVE = 2,
|
||||
OFFLINE = 3,
|
||||
/** 查询不传,展示用 */
|
||||
NOTINSTALL = 4,
|
||||
}
|
||||
|
||||
export enum ModelType {
|
||||
GPT3dot5Turbo = 1,
|
||||
GPT4 = 2,
|
||||
Seed = 3,
|
||||
SeedMultiturn = 4,
|
||||
StableDiffusion = 5,
|
||||
ByteArtist = 6,
|
||||
Claude = 7,
|
||||
BingChat = 8,
|
||||
Bard = 9,
|
||||
Assistant = 10,
|
||||
DallE = 11,
|
||||
Midjourney = 12,
|
||||
TTSearch = 13,
|
||||
GPTTask = 14,
|
||||
GPT4Browsing = 15,
|
||||
GPT4WithPlugins = 16,
|
||||
GPT3dot5WithPlugins = 17,
|
||||
SeedSystem = 18,
|
||||
Plugin = 20,
|
||||
GPT4Plugin = 21,
|
||||
WebGPT = 22,
|
||||
GPT3dot5WithFunction = 23,
|
||||
AutoPlugin = 24,
|
||||
MiniMax = 25,
|
||||
GPT3dot5WithTako = 26,
|
||||
GPT4WithTako = 27,
|
||||
GPT4WithTakoTikTok = 28,
|
||||
GPT4WithTakoGoogle = 29,
|
||||
SeedBeta = 30,
|
||||
ByteArtistAnime = 31,
|
||||
GenMusic = 32,
|
||||
GPT48k = 33,
|
||||
SeedStrongCharacterForTest = 34,
|
||||
SeedForTest = 35,
|
||||
SeedOmniFake = 36,
|
||||
SeedOmniBrowse = 37,
|
||||
SeedOmniSota = 38,
|
||||
SeedOmniSotaBrowse = 39,
|
||||
SeedOmniBrowseWithCard = 40,
|
||||
CiciSearchMore = 41,
|
||||
CiciSearchLess = 42,
|
||||
CiciSearchBing = 43,
|
||||
SeedOmniPlugin = 44,
|
||||
CiciSearchBing_GPT35 = 45,
|
||||
GPT40613 = 46,
|
||||
SeedForMap = 47,
|
||||
SeedForMusic = 48,
|
||||
XiaoningWithMem = 49,
|
||||
/** 功能性bot的模型从100开始,旧版bot的模型在100以下 pangzhiqiang@bytedance.com */
|
||||
GPT_35Turbo = 100,
|
||||
GPT_35Turbo0301 = 101,
|
||||
GPT_4 = 102,
|
||||
GPT_40314 = 103,
|
||||
GPT_432k = 104,
|
||||
GPT_432k0314 = 105,
|
||||
/** seed 主模型 */
|
||||
Seed_Beta = 106,
|
||||
Seed_Music = 107,
|
||||
GPT4_32k0613 = 108,
|
||||
Seed_Img2Text = 109,
|
||||
/** seed主模型 + browsing */
|
||||
Seed_WebGPT = 110,
|
||||
/** seed主模型 + browsing + (plugin暂为开放) */
|
||||
Seed_WithPlugins = 111,
|
||||
GPT_35Turbo0613 = 112,
|
||||
GPT_35Turbo16K = 113,
|
||||
/** sota */
|
||||
Seed_Sota = 114,
|
||||
/** sota + browsing */
|
||||
Seed_Sota_Browsing = 115,
|
||||
/** strong character */
|
||||
Seed_WithSystem = 116,
|
||||
/** 三合一, 主模型 + plugin + browsing, 但plugin是固定的 */
|
||||
Seed_Omni = 118,
|
||||
/** seed function calling */
|
||||
SeedFunctionCall = 119,
|
||||
/** seed 主模型, 带"是的你说的对" */
|
||||
Seed_Main = 120,
|
||||
/** 联网策略实验 */
|
||||
SeedBrowsingExperiment = 121,
|
||||
/** browsing单模型 */
|
||||
SeedBrowsingOnly = 122,
|
||||
/** 虚假的 llm,function call 协议,一直调用第一个 function */
|
||||
Echo = 123,
|
||||
GPT_40613 = 124,
|
||||
/** for seed test */
|
||||
Seed_WithSystemForTest = 125,
|
||||
/** 地图 */
|
||||
Seed_Map = 126,
|
||||
SeedSuggest = 127,
|
||||
Seed_ComplexInstructionTest = 128,
|
||||
Seed_ComplexInstruction = 129,
|
||||
Edu = 130,
|
||||
Tako_Intent = 131,
|
||||
Seed_Text2Img = 132,
|
||||
GPT_4Preview_128k1106 = 133,
|
||||
SeedForDouyin = 134,
|
||||
SeedFunctionCallSp = 135,
|
||||
SeedSuggestOffline = 136,
|
||||
SkylarkChat = 137,
|
||||
SeedStrongCharacterNearlinePortrait = 138,
|
||||
}
|
||||
|
||||
export enum NodeType {
|
||||
Start = 1,
|
||||
End = 2,
|
||||
LLM = 3,
|
||||
Api = 4,
|
||||
Code = 5,
|
||||
Dataset = 6,
|
||||
Input = 7,
|
||||
If = 8,
|
||||
}
|
||||
|
||||
export enum OrderBy {
|
||||
CreateTime = 0,
|
||||
UpdateTime = 1,
|
||||
Hot = 3,
|
||||
}
|
||||
|
||||
export enum ParameterLocation {
|
||||
Path = 1,
|
||||
Query = 2,
|
||||
Body = 3,
|
||||
Header = 4,
|
||||
}
|
||||
|
||||
export enum ParamRequirementType {
|
||||
CanNotDelete = 1,
|
||||
CanNotChangeName = 2,
|
||||
CanChange = 3,
|
||||
CanNotChangeAnything = 4,
|
||||
}
|
||||
|
||||
export enum PluginStatus {
|
||||
SUBMITTED = 1,
|
||||
REVIEWING = 2,
|
||||
PREPARED = 3,
|
||||
PUBLISHED = 4,
|
||||
OFFLINE = 5,
|
||||
}
|
||||
|
||||
export enum PluginType {
|
||||
PLUGIN = 1,
|
||||
APP = 2,
|
||||
FUNC = 3,
|
||||
WORKFLOW = 4,
|
||||
}
|
||||
|
||||
export enum SchemaType {
|
||||
DAG = 0,
|
||||
FDL = 1,
|
||||
}
|
||||
|
||||
export enum ScopeType {
|
||||
/** 所有 */
|
||||
All = 0,
|
||||
/** 自己 */
|
||||
Self = 1,
|
||||
}
|
||||
|
||||
export enum Tag {
|
||||
All = 1,
|
||||
Hot = 2,
|
||||
Information = 3,
|
||||
Music = 4,
|
||||
Picture = 5,
|
||||
UtilityTool = 6,
|
||||
Life = 7,
|
||||
Traval = 8,
|
||||
Network = 9,
|
||||
System = 10,
|
||||
Movie = 11,
|
||||
Office = 12,
|
||||
Shopping = 13,
|
||||
Education = 14,
|
||||
Health = 15,
|
||||
Social = 16,
|
||||
Entertainment = 17,
|
||||
Finance = 18,
|
||||
Hidden = 100,
|
||||
}
|
||||
|
||||
export enum TerminatePlanType {
|
||||
USELLM = 1,
|
||||
USESETTING = 2,
|
||||
}
|
||||
|
||||
/** 状态,1不可发布 2可发布 3已发布 4删除 */
|
||||
export enum WorkFlowStatus {
|
||||
CanNotPublish = 1,
|
||||
CanPublish = 2,
|
||||
HadPublished = 3,
|
||||
Deleted = 4,
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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 AuthorizationServiceLocation {
|
||||
Header = 1,
|
||||
Query = 2,
|
||||
}
|
||||
|
||||
export enum AuthorizationType {
|
||||
None = 0,
|
||||
Service = 1,
|
||||
OAuth = 3,
|
||||
}
|
||||
|
||||
export enum CreationMethod {
|
||||
COZE = 0,
|
||||
IDE = 1,
|
||||
}
|
||||
|
||||
export enum ParameterLocation {
|
||||
Path = 1,
|
||||
Query = 2,
|
||||
Body = 3,
|
||||
Header = 4,
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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 IApp {
|
||||
appId?: string;
|
||||
typeId?: string;
|
||||
name?: string;
|
||||
devSandbox?: string;
|
||||
projectId?: string;
|
||||
spaceId?: string;
|
||||
iconUrl?: string;
|
||||
globalSettings?: string;
|
||||
exts?: string;
|
||||
updater?: string;
|
||||
creator?: string;
|
||||
updatedAt?: string;
|
||||
createdAt?: string;
|
||||
_id?: string;
|
||||
}
|
||||
|
||||
export interface IBlockInfo {
|
||||
exportName: string;
|
||||
pkgName: string;
|
||||
}
|
||||
|
||||
export interface IPackageVersionInfo {
|
||||
version: string;
|
||||
pkgName: string;
|
||||
}
|
||||
|
||||
export interface IPage {
|
||||
pageId?: string;
|
||||
sandboxId?: string;
|
||||
appId?: string;
|
||||
data?: string;
|
||||
crdtHistory?: string;
|
||||
exts?: string;
|
||||
__meta__?: string;
|
||||
updater?: string;
|
||||
creator?: string;
|
||||
updatedAt?: string;
|
||||
createdAt?: string;
|
||||
_id?: string;
|
||||
}
|
||||
|
||||
export interface ISandbox {
|
||||
sandboxId?: string;
|
||||
appId?: string;
|
||||
name?: string;
|
||||
pages?: Array<string>;
|
||||
routes?: string;
|
||||
crdtHistory?: string;
|
||||
exts?: string;
|
||||
__meta__?: string;
|
||||
blocksMap?: Record<string, IBlockInfo>;
|
||||
versionsMap?: Record<string, Record<string, IPackageVersionInfo>>;
|
||||
branchInfo?: Record<string, string>;
|
||||
updater?: string;
|
||||
creator?: string;
|
||||
updatedAt?: string;
|
||||
createdAt?: string;
|
||||
_id?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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 UserBasicInfo {
|
||||
user_id?: Int64;
|
||||
user_type?: Int64;
|
||||
user_name?: string;
|
||||
user_avatar?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
214
frontend/packages/arch/idl/src/auto-generated/basic_api/index.ts
Normal file
214
frontend/packages/arch/idl/src/auto-generated/basic_api/index.ts
Normal file
@@ -0,0 +1,214 @@
|
||||
/*
|
||||
* 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 audit from './namespaces/audit';
|
||||
import * as counter from './namespaces/counter';
|
||||
import * as flow_platform_audit_common from './namespaces/flow_platform_audit_common';
|
||||
import * as marketplace_common from './namespaces/marketplace_common';
|
||||
import * as report_admin_api from './namespaces/report_admin_api';
|
||||
import * as report_common from './namespaces/report_common';
|
||||
import * as report_public_api from './namespaces/report_public_api';
|
||||
import * as user_common from './namespaces/user_common';
|
||||
import * as user_public_api from './namespaces/user_public_api';
|
||||
import * as user_rpc from './namespaces/user_rpc';
|
||||
|
||||
export {
|
||||
audit,
|
||||
counter,
|
||||
flow_platform_audit_common,
|
||||
marketplace_common,
|
||||
report_admin_api,
|
||||
report_common,
|
||||
report_public_api,
|
||||
user_common,
|
||||
user_public_api,
|
||||
user_rpc,
|
||||
};
|
||||
export * from './namespaces/audit';
|
||||
export * from './namespaces/counter';
|
||||
export * from './namespaces/flow_platform_audit_common';
|
||||
export * from './namespaces/marketplace_common';
|
||||
export * from './namespaces/report_admin_api';
|
||||
export * from './namespaces/report_common';
|
||||
export * from './namespaces/report_public_api';
|
||||
export * from './namespaces/user_common';
|
||||
export * from './namespaces/user_public_api';
|
||||
export * from './namespaces/user_rpc';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export default class BasicApiService<T> {
|
||||
private request: any = () => {
|
||||
throw new Error('BasicApiService.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/user/v2/update_profile_check
|
||||
*
|
||||
* == 用户信息 ==
|
||||
*
|
||||
* -- http --
|
||||
*/
|
||||
PublicUpdateUserProfileCheck(
|
||||
req?: user_public_api.UpdateUserProfileCheckRequest,
|
||||
options?: T,
|
||||
): Promise<user_public_api.UpdateUserProfileCheckResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/user/v2/update_profile_check');
|
||||
const method = 'POST';
|
||||
const data = { user_unique_name: _req['user_unique_name'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** GET /api/user/v2/get_profile */
|
||||
PublicGetUserProfile(
|
||||
req?: user_public_api.GetUserProfileRequest,
|
||||
options?: T,
|
||||
): Promise<user_public_api.GetUserProfileResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/user/v2/get_profile');
|
||||
const method = 'GET';
|
||||
const params = { user_id: _req['user_id'], bid: _req['bid'] };
|
||||
const headers = { Cookie: _req['Cookie'] };
|
||||
return this.request({ url, method, params, headers }, options);
|
||||
}
|
||||
|
||||
/** POST /api/user/v2/update_profile */
|
||||
PublicUpdateUserProfile(
|
||||
req?: user_public_api.UpdateUserProfileRequest,
|
||||
options?: T,
|
||||
): Promise<user_public_api.UpdateUserProfileResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/user/v2/update_profile');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
user_unique_name: _req['user_unique_name'],
|
||||
name: _req['name'],
|
||||
avatar: _req['avatar'],
|
||||
signature: _req['signature'],
|
||||
};
|
||||
const headers = { Cookie: _req['Cookie'] };
|
||||
return this.request({ url, method, data, headers }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/report/get_meta
|
||||
*
|
||||
* 查询举报元数据
|
||||
*/
|
||||
GetReportMeta(
|
||||
req?: report_public_api.GetReportMetaRequest,
|
||||
options?: T,
|
||||
): Promise<report_public_api.GetReportMetaResponse> {
|
||||
const url = this.genBaseURL('/api/report/get_meta');
|
||||
const method = 'GET';
|
||||
return this.request({ url, method }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/report/query
|
||||
*
|
||||
* 查询举报信息
|
||||
*/
|
||||
ReportQuery(
|
||||
req?: report_admin_api.ReportQueryRequest,
|
||||
options?: T,
|
||||
): Promise<report_admin_api.ReportQueryResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/report/query');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
object_id_list: _req['object_id_list'],
|
||||
object_type: _req['object_type'],
|
||||
report_time_begin: _req['report_time_begin'],
|
||||
report_time_end: _req['report_time_end'],
|
||||
report_uid: _req['report_uid'],
|
||||
page_num: _req['page_num'],
|
||||
page_size: _req['page_size'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/report/submit
|
||||
*
|
||||
* == 举报 ==
|
||||
*
|
||||
* -- http --
|
||||
*
|
||||
* 举报
|
||||
*/
|
||||
ReportSubmit(
|
||||
req?: report_public_api.ReportSubmitRequest,
|
||||
options?: T,
|
||||
): Promise<report_public_api.ReportSubmitResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/report/submit');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
object_type: _req['object_type'],
|
||||
object_id: _req['object_id'],
|
||||
detail: _req['detail'],
|
||||
};
|
||||
const headers = { Cookie: _req['Cookie'] };
|
||||
return this.request({ url, method, data, headers }, options);
|
||||
}
|
||||
|
||||
/** GET /api/report/get_report_times */
|
||||
GetReportTimes(
|
||||
req?: report_admin_api.GetReportTimesRequest,
|
||||
options?: T,
|
||||
): Promise<report_admin_api.GetReportTimesResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/report/get_report_times');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
object_id_list: _req['object_id_list'],
|
||||
object_type: _req['object_type'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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 AuditMode {
|
||||
/** 默认 */
|
||||
Unknown = 0,
|
||||
/** 人审 */
|
||||
Manual = 1,
|
||||
/** 机审 */
|
||||
Machine = 2,
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 CountOpType {
|
||||
/** count key 存在就会将原有的值加上新值 */
|
||||
Incr = 1,
|
||||
/** count key 不存在就会设置新值, 存在也会被替换为新值 */
|
||||
Set = 2,
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,260 @@
|
||||
/*
|
||||
* 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 AuditStatus {
|
||||
/** 默认 */
|
||||
Default = 0,
|
||||
/** 审核中 */
|
||||
Pending = 1,
|
||||
/** 审核通过 */
|
||||
Approved = 2,
|
||||
/** 审核不通过 */
|
||||
Rejected = 3,
|
||||
/** 已废弃 */
|
||||
Abandoned = 4,
|
||||
/** 异常 */
|
||||
Failed = 99,
|
||||
}
|
||||
|
||||
export enum AuditType {
|
||||
ProductDraft = 10,
|
||||
/** 用户 */
|
||||
UserProfile = 18,
|
||||
/** 分享对话 */
|
||||
ConversationShared = 19,
|
||||
/** 推荐对话 */
|
||||
Conversation = 20,
|
||||
InterationPost = 21,
|
||||
InterationComment = 22,
|
||||
ProductWorkFlow = 23,
|
||||
ProductBot = 24,
|
||||
ProductPlugin = 25,
|
||||
ImageFlowUploadImages = 26,
|
||||
ImageFlowTestRun = 27,
|
||||
ImageFlowPluginOutput = 28,
|
||||
DataEngineKnowledge = 29,
|
||||
BotAvatar = 30,
|
||||
BotPublishSingleBot = 31,
|
||||
BotPublishMultiAgent = 32,
|
||||
BotPublishPlugin = 33,
|
||||
BotPublishWorkflow = 34,
|
||||
BotModify = 35,
|
||||
BotCreate = 36,
|
||||
BotWorkflowAsAgentPublish = 37,
|
||||
BotWorkflowAsAgentModify = 38,
|
||||
BotSingleAgentModify = 39,
|
||||
SocietyCreate = 40,
|
||||
SocietyPublish = 41,
|
||||
SocietyRoleCreate = 42,
|
||||
SocietyPrePublish = 43,
|
||||
ProductSociety = 44,
|
||||
ProductImageFlow = 46,
|
||||
PluginImageGenerateInput = 48,
|
||||
PluginImageGenerateOutputImage = 49,
|
||||
PluginImageGenerateOutputVideo = 50,
|
||||
PluginCreate = 51,
|
||||
PluginModify = 52,
|
||||
VariableModify = 53,
|
||||
CardInfo = 60,
|
||||
AgentAppWriter = 80,
|
||||
/** 模型广场对战Query */
|
||||
ModelArenaQuery = 81,
|
||||
/** 消息链路追踪 */
|
||||
MessageTrace = 82,
|
||||
/** 资源库Prompt */
|
||||
ResourcePrompt = 83,
|
||||
/** ProjectIDE修改 */
|
||||
ProjectIDEModify = 84,
|
||||
/** Bot 模板 */
|
||||
TemplateBot = 85,
|
||||
/** 工作流模板 */
|
||||
TemplateWorkflow = 86,
|
||||
/** Project 模板 */
|
||||
TemplateProject = 87,
|
||||
/** Project 商品 */
|
||||
ProductProject = 88,
|
||||
/** Project 发布 */
|
||||
ProjectPublish = 89,
|
||||
/** Project UI Builder */
|
||||
ProjectUIBuilder = 90,
|
||||
/** 工作流运行时输入 */
|
||||
WorkflowRuntimeInput = 100,
|
||||
/** 语音运行时输入 */
|
||||
AudioRuntimeInput = 101,
|
||||
/** 语音资源 */
|
||||
AudioVoiceResource = 102,
|
||||
/** 模型微调输入 */
|
||||
ModelFinetuneInput = 103,
|
||||
/** OpenAPI图片上传 */
|
||||
OpenAPIImageUpload = 104,
|
||||
/** App (Project) 音频 */
|
||||
AppAudio = 105,
|
||||
/** 企业创建/修改 */
|
||||
EnterpriseModify = 106,
|
||||
CozeLoopPEModify = 107,
|
||||
CozeLoopExptModify = 108,
|
||||
CozeLoopDatasetModify = 109,
|
||||
CozeLoopEvaluatorModify = 110,
|
||||
/** CozeSpace */
|
||||
CozeSpaceQuery = 111,
|
||||
/** CozeSpace 回答 */
|
||||
CozeSpaceAnswer = 112,
|
||||
/** CozeSpace TraeBuilder Query */
|
||||
CozeSpaceTraeBuilderQuery = 113,
|
||||
/** CozeSpace TraeBuilder 回答 */
|
||||
CozeSpaceTraeBuilderAnswer = 114,
|
||||
/** CozeSpace web搜索 Query */
|
||||
CozeSpaceSearchWebQuery = 115,
|
||||
/** CozeSpace web搜索 Answer */
|
||||
CozeSpaceSearchWebAnswer = 116,
|
||||
/** CozeSpace Img搜索 Query */
|
||||
CozeSpaceSearchImgQuery = 117,
|
||||
/** CozeSpace Img搜索 Answer */
|
||||
CozeSpaceSearchImgAnswer = 118,
|
||||
/** CozeSpace 定时任务 Query */
|
||||
CozeSpaceScheduleTaskQuery = 119,
|
||||
/** 声纹创建/修改 */
|
||||
VoicePrintGroup = 120,
|
||||
/** 声纹特征创建/修改 */
|
||||
VoicePrintGroupFeature = 121,
|
||||
/** 视频生成输入 */
|
||||
VideoGenerateInput = 122,
|
||||
/** CozeSpace PPT Agent 修改 */
|
||||
CozeSpacePPTAgentModify = 123,
|
||||
}
|
||||
|
||||
export enum QueueType {
|
||||
/** 默认队列 */
|
||||
Default = 0,
|
||||
/** 召回队列 */
|
||||
Recall = 1,
|
||||
/** 举报队列 */
|
||||
Report = 2,
|
||||
/** 离线召回 */
|
||||
Review = 3,
|
||||
}
|
||||
|
||||
export enum RefuseReason {
|
||||
/** 其他 */
|
||||
Other = 0,
|
||||
/** 引流广告 */
|
||||
Ad = 1,
|
||||
/** 引人不适 */
|
||||
Uncomfortable = 2,
|
||||
/** 违法违规 */
|
||||
Illegal = 3,
|
||||
/** 宗教邪教 */
|
||||
Cult = 4,
|
||||
/** 公序良俗 */
|
||||
Morals = 5,
|
||||
/** 色情低俗 */
|
||||
Porn = 6,
|
||||
/** 涉领导人 */
|
||||
Leaders = 7,
|
||||
/** 党政敏感 */
|
||||
SensitiveParty = 8,
|
||||
/** 隐私政策包含无效内容(如链接失效、打不开,联系方式无效) */
|
||||
InvalidContent = 9,
|
||||
/** 违规链接 */
|
||||
LinksIllegal = 10,
|
||||
}
|
||||
|
||||
export enum ReviewRefuseModule {
|
||||
/** Bot 1XXX */
|
||||
BotPublish = 1000,
|
||||
BotPublishBotIcon = 1001,
|
||||
BotPublishBotName = 1002,
|
||||
BotPublishBotDesc = 1003,
|
||||
BotPublishBotPrompt = 1004,
|
||||
BotPublishBotDatabase = 1005,
|
||||
BotPublishBotTask = 1006,
|
||||
BotPublishBotOnboardingPrologue = 1007,
|
||||
BotPublishBotOnboardingSuggestedQuestions = 1008,
|
||||
BotPublishBotSuggestReply = 1009,
|
||||
BotPublishBotBackgroundImage = 1010,
|
||||
BotPublishBotShortcutCommandList = 1011,
|
||||
BotPublishBotQueryCollectConf = 1012,
|
||||
BotPublishSimpleAgentName = 1013,
|
||||
BotPublishSimpleAgentPrompt = 1014,
|
||||
BotPublishSimpleAgentScene = 1015,
|
||||
BotPublishSimpleAgentSkills = 1016,
|
||||
BotPublishSimpleAgentSuggestReplyInfo = 1017,
|
||||
BotPublishBotAgentBotIcon = 1018,
|
||||
BotPublishBotAgentBotName = 1019,
|
||||
BotPublishBotAgentScene = 1020,
|
||||
BotPublishBotAgentSuggestReplyInfo = 1021,
|
||||
BotPublishGlobalJumpConditions = 1022,
|
||||
BotPublishPlugin = 1200,
|
||||
BotPublishWorkflow = 1300,
|
||||
/** ProductPlugin 22XX */
|
||||
ProductPlugin = 2200,
|
||||
ProductPluginProductInfo = 2201,
|
||||
ProductPluginPluginInfo = 2202,
|
||||
ProductPluginAPIs = 2203,
|
||||
/** ProductWorkflow 23XX */
|
||||
ProductWorkflow = 2300,
|
||||
/** ProductImageFlow 24XX */
|
||||
ProductImageFlow = 2400,
|
||||
/** InteractionPost 31XX */
|
||||
InteractionPost = 3100,
|
||||
/** InteractionComment 32XX */
|
||||
InteractionComment = 3200,
|
||||
/** Society 4XXX */
|
||||
Society = 4000,
|
||||
SocietyBasicInfoIcon = 4001,
|
||||
SocietyBasicInfoName = 4002,
|
||||
SocietyBasicInfoDesc = 4003,
|
||||
SocietyBasicInfoPrompt = 4004,
|
||||
SocietyHostInfoIcon = 4005,
|
||||
SocietyHostInfoName = 4006,
|
||||
SocietyHostInfoDesc = 4007,
|
||||
SocietyRoleInfoIcon = 4008,
|
||||
SocietyRoleInfoName = 4009,
|
||||
SocietyRoleInfoDesc = 4010,
|
||||
SocietyRoleInfoNickName = 4011,
|
||||
/** Project 5XXX */
|
||||
Project = 5000,
|
||||
ProjectBasicInfoName = 5001,
|
||||
ProjectBasicInfoDesc = 5002,
|
||||
ProjectBasicInfoIcon = 5003,
|
||||
ProjectPlugin = 5100,
|
||||
ProjectWorkflow = 5200,
|
||||
ProjectUI = 5300,
|
||||
ProjectData = 5400,
|
||||
}
|
||||
|
||||
export interface AuditExtra {
|
||||
AuditContext?: string;
|
||||
OperationMap?: Record<string, Array<string>>;
|
||||
QueueType?: QueueType;
|
||||
}
|
||||
|
||||
export interface AuditRecord {
|
||||
ObjectID: Int64;
|
||||
AuditType: AuditType;
|
||||
AuditStatus: AuditStatus;
|
||||
Extra?: AuditExtra;
|
||||
FailedReason?: string;
|
||||
ReqID?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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 AuditStatus {
|
||||
/** 默认 */
|
||||
Default = 0,
|
||||
/** 审核中 */
|
||||
Pending = 1,
|
||||
/** 审核通过 */
|
||||
Approved = 2,
|
||||
/** 审核不通过 */
|
||||
Rejected = 3,
|
||||
/** 已废弃 */
|
||||
Abandoned = 4,
|
||||
}
|
||||
|
||||
export enum AuditType {
|
||||
ProductDraft = 10,
|
||||
Conversation = 20,
|
||||
}
|
||||
|
||||
export enum AuditVisibility {
|
||||
Invisible = 10,
|
||||
Self = 15,
|
||||
AllWithoutRecommend = 20,
|
||||
All = 25,
|
||||
}
|
||||
|
||||
export enum EntityType {
|
||||
Bot = 1,
|
||||
Plugin = 2,
|
||||
CozeToken = 50,
|
||||
Common = 99,
|
||||
}
|
||||
|
||||
export interface AuditExtra {
|
||||
AuditVisibility?: AuditVisibility;
|
||||
}
|
||||
|
||||
export interface AuditRecord {
|
||||
ObjectID: Int64;
|
||||
AuditType: AuditType;
|
||||
Version?: string;
|
||||
AuditStatus: AuditStatus;
|
||||
Extra?: AuditExtra;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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 report_common from './report_common';
|
||||
import * as flow_platform_audit_common from './flow_platform_audit_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface GetReportTimesData {
|
||||
report_times_datas?: Record<Int64, ReportTimesData>;
|
||||
}
|
||||
|
||||
export interface GetReportTimesRequest {
|
||||
object_id_list?: Array<string>;
|
||||
object_type?: report_common.ReportObjectType;
|
||||
}
|
||||
|
||||
export interface GetReportTimesResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data?: GetReportTimesData;
|
||||
}
|
||||
|
||||
export interface ReportData {
|
||||
object_id: string;
|
||||
object_type: report_common.ReportObjectType;
|
||||
reason_codes_str: Array<string>;
|
||||
report_uid?: string;
|
||||
report_id?: string;
|
||||
report_user_name?: string;
|
||||
report_time?: string;
|
||||
report_object_name?: string;
|
||||
report_task_id?: string;
|
||||
report_status?: report_common.ReportEventStatus;
|
||||
audit_status?: flow_platform_audit_common.AuditStatus;
|
||||
}
|
||||
|
||||
export interface ReportQueryData {
|
||||
report_datas?: Array<ReportData>;
|
||||
total_count?: number;
|
||||
}
|
||||
|
||||
export interface ReportQueryRequest {
|
||||
object_id_list?: Array<string>;
|
||||
object_type?: report_common.ReportObjectType;
|
||||
report_time_begin?: Int64;
|
||||
report_time_end?: Int64;
|
||||
report_uid?: Int64;
|
||||
page_num?: number;
|
||||
page_size?: number;
|
||||
}
|
||||
|
||||
export interface ReportQueryResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data?: ReportQueryData;
|
||||
}
|
||||
|
||||
export interface ReportTimesData {
|
||||
total_report_times?: number;
|
||||
current_report_times?: number;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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 ReportEventStatus {
|
||||
NotProcessed = 1,
|
||||
Processing = 2,
|
||||
Processed = 3,
|
||||
}
|
||||
|
||||
export enum ReportObjectType {
|
||||
ProductBot = 1,
|
||||
ProductPlugin = 2,
|
||||
ProductWorkflow = 3,
|
||||
ProductImageFlow = 4,
|
||||
ProductSociety = 5,
|
||||
InteractionPost = 6,
|
||||
InteractionComment = 7,
|
||||
/** 模板举报 */
|
||||
TemplateBot = 8,
|
||||
TemplateWorkflow = 9,
|
||||
TemplateImageFlow = 10,
|
||||
TemplateProject = 11,
|
||||
/** Project 商品 */
|
||||
ProductProject = 12,
|
||||
/** 模板通用标识,由于前端不需要区分是哪一种模板,所以统一用这个进行筛选和展示
|
||||
该配型不会触发任何举报的业务逻辑,仅用于前端展示使用 */
|
||||
TemplateCommon = 99,
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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 report_common from './report_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface GetReportMetaRequest {}
|
||||
|
||||
export interface GetReportMetaResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data?: ReportMetaData;
|
||||
}
|
||||
|
||||
export interface ReportDetail {
|
||||
description?: string;
|
||||
/** uri */
|
||||
images?: Array<string>;
|
||||
reason_codes?: Array<number>;
|
||||
}
|
||||
|
||||
export interface ReportMetaData {
|
||||
report_reasons?: Array<ReportReason>;
|
||||
}
|
||||
|
||||
export interface ReportReason {
|
||||
reason_code: number;
|
||||
starling_key: string;
|
||||
}
|
||||
|
||||
export interface ReportSubmitRequest {
|
||||
object_type?: report_common.ReportObjectType;
|
||||
object_id?: string;
|
||||
detail?: ReportDetail;
|
||||
Cookie?: string;
|
||||
}
|
||||
|
||||
export interface ReportSubmitResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** DEFAULT是默认状态,若ReviewResult.Result=CheckType.DEFAULT可以跳过,
|
||||
表示业务方未传入该字段
|
||||
copy from: */
|
||||
export enum CheckType {
|
||||
DEFAULT = 0,
|
||||
PASS = 1,
|
||||
REVIEW = 2,
|
||||
UNPASS = 3,
|
||||
/** 慢审机器不通过,目前只有在抖音用户资料使用 */
|
||||
ROBOT_UP = 4,
|
||||
/** 回滚 */
|
||||
ROLLBACK = 5,
|
||||
/** 重置 */
|
||||
RESET = 6,
|
||||
}
|
||||
|
||||
export enum PassportAuditStatus {
|
||||
Reviewing = 1,
|
||||
/** 审核通过 */
|
||||
Approved = 2,
|
||||
/** 审核不通过 */
|
||||
Rejected = 3,
|
||||
}
|
||||
|
||||
export interface AuditDetail {
|
||||
user_unique_name?: AuditInfo;
|
||||
nickname?: AuditInfo;
|
||||
avatar?: AuditInfo;
|
||||
signature?: AuditInfo;
|
||||
}
|
||||
|
||||
export interface AuditInfo {
|
||||
result?: CheckType;
|
||||
}
|
||||
|
||||
export interface UserInfo {
|
||||
UserID?: Int64;
|
||||
UserUniqueName?: string;
|
||||
Nickname?: string;
|
||||
Avatar?: string;
|
||||
Signature?: string;
|
||||
UserLabel?: UserLabel;
|
||||
}
|
||||
|
||||
export interface UserLabel {
|
||||
label_id?: string;
|
||||
label_name?: string;
|
||||
icon_uri?: string;
|
||||
icon_url?: string;
|
||||
jump_link?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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 user_common from './user_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface GetUserProfileData {
|
||||
/** 名字(唯一) */
|
||||
user_name?: string;
|
||||
/** 昵称 */
|
||||
name?: string;
|
||||
avatar?: string;
|
||||
user_id?: string;
|
||||
/** 签名 */
|
||||
signature?: string;
|
||||
/** 是否有正在审核的字段 */
|
||||
audit_status?: user_common.PassportAuditStatus;
|
||||
share_id?: string;
|
||||
/** 审核的细节 */
|
||||
audit_detail?: user_common.AuditDetail;
|
||||
/** 用户标签 */
|
||||
user_label?: user_common.UserLabel;
|
||||
}
|
||||
|
||||
export interface GetUserProfileRequest {
|
||||
user_id?: string;
|
||||
bid?: string;
|
||||
Cookie?: string;
|
||||
}
|
||||
|
||||
export interface GetUserProfileResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data?: GetUserProfileData;
|
||||
}
|
||||
|
||||
export interface UpdateUserProfileCheckRequest {
|
||||
user_unique_name?: string;
|
||||
}
|
||||
|
||||
export interface UpdateUserProfileCheckResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface UpdateUserProfileRequest {
|
||||
user_unique_name?: string;
|
||||
name?: string;
|
||||
avatar?: string;
|
||||
signature?: string;
|
||||
Cookie?: string;
|
||||
}
|
||||
|
||||
export interface UpdateUserProfileResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 user_common from './user_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface BuiAuditInfo {
|
||||
AuditStatus?: user_common.PassportAuditStatus;
|
||||
UnPassReason?: string;
|
||||
LastModifyTime?: Int64;
|
||||
/** map[string]AuditInfo 的序列化字段,下面的注释是具体的struct结构 */
|
||||
AuditInfoJson?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
435
frontend/packages/arch/idl/src/auto-generated/benefit/index.ts
Normal file
435
frontend/packages/arch/idl/src/auto-generated/benefit/index.ts
Normal file
@@ -0,0 +1,435 @@
|
||||
/*
|
||||
* 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 benefit from './namespaces/benefit';
|
||||
import * as benefit_common from './namespaces/benefit_common';
|
||||
import * as bot from './namespaces/bot';
|
||||
import * as copilot_common from './namespaces/copilot_common';
|
||||
import * as marketplace_common from './namespaces/marketplace_common';
|
||||
import * as oapi from './namespaces/oapi';
|
||||
import * as service from './namespaces/service';
|
||||
import * as wallet from './namespaces/wallet';
|
||||
|
||||
export {
|
||||
benefit,
|
||||
benefit_common,
|
||||
bot,
|
||||
copilot_common,
|
||||
marketplace_common,
|
||||
oapi,
|
||||
service,
|
||||
wallet,
|
||||
};
|
||||
export * from './namespaces/benefit';
|
||||
export * from './namespaces/benefit_common';
|
||||
export * from './namespaces/bot';
|
||||
export * from './namespaces/copilot_common';
|
||||
export * from './namespaces/marketplace_common';
|
||||
export * from './namespaces/oapi';
|
||||
export * from './namespaces/service';
|
||||
export * from './namespaces/wallet';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export default class BenefitService<T> {
|
||||
private request: any = () => {
|
||||
throw new Error('BenefitService.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);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/marketplace/commerce/bot_monetization/get
|
||||
*
|
||||
* http
|
||||
*
|
||||
* 获取 bot 收费配置,bot 所有者和协作者可见
|
||||
*/
|
||||
PublicGetBotMonetizationConfig(
|
||||
req?: bot.PublicGetBotMonetizationConfigRequest,
|
||||
options?: T,
|
||||
): Promise<bot.PublicGetBotMonetizationConfigResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/marketplace/commerce/bot_monetization/get',
|
||||
);
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
bot_id: _req['bot_id'],
|
||||
bot_monetization_mode: _req['bot_monetization_mode'],
|
||||
is_fallback: _req['is_fallback'],
|
||||
entity_id: _req['entity_id'],
|
||||
entity_type: _req['entity_type'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/marketplace/commerce/bot_monetization/save
|
||||
*
|
||||
* 保存 bot 收费配置草稿,bot 所有者可调用
|
||||
*/
|
||||
PublicSaveBotDraftMonetizationConfig(
|
||||
req?: bot.PublicSaveBotDraftMonetizationConfigRequest,
|
||||
options?: T,
|
||||
): Promise<bot.PublicSaveBotDraftMonetizationConfigResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/marketplace/commerce/bot_monetization/save',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bot_id: _req['bot_id'],
|
||||
is_enable: _req['is_enable'],
|
||||
free_chat_allowance_count: _req['free_chat_allowance_count'],
|
||||
refresh_period: _req['refresh_period'],
|
||||
entity_id: _req['entity_id'],
|
||||
entity_type: _req['entity_type'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/marketplace/wallet/get
|
||||
*
|
||||
* http
|
||||
*/
|
||||
PublicGetUserBalance(
|
||||
req?: wallet.PublicGetUserBalanceRequest,
|
||||
options?: T,
|
||||
): Promise<wallet.PublicGetUserBalanceResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/marketplace/wallet/get');
|
||||
const method = 'GET';
|
||||
const params = { balance_type_list: _req['balance_type_list'] };
|
||||
const headers = { 'Tt-Agw-Client-Ip': _req['Tt-Agw-Client-Ip'] };
|
||||
return this.request({ url, method, params, headers }, options);
|
||||
}
|
||||
|
||||
/** GET /api/marketplace/wallet/get_profit */
|
||||
PublicGetUserProfitDetail(
|
||||
req?: wallet.PublicGetUserProfitDetailRequest,
|
||||
options?: T,
|
||||
): Promise<wallet.PublicGetUserProfitDetailResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/marketplace/wallet/get_profit');
|
||||
const method = 'GET';
|
||||
const headers = { 'Tt-Agw-Client-Ip': _req['Tt-Agw-Client-Ip'] };
|
||||
return this.request({ url, method, headers }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/marketplace/commerce/bot_monetization/get_open
|
||||
*
|
||||
* 获取 bot 商业化公开配置,无权限控制
|
||||
*/
|
||||
PublicGetBotOpenMonetizationConf(
|
||||
req?: bot.PublicGetBotOpenMonetizationConfRequest,
|
||||
options?: T,
|
||||
): Promise<bot.PublicGetBotOpenMonetizationConfResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/marketplace/commerce/bot_monetization/get_open',
|
||||
);
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
bot_id: _req['bot_id'],
|
||||
entity_id: _req['entity_id'],
|
||||
entity_type: _req['entity_type'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/** GET /api/marketplace/wallet/history */
|
||||
PublicGetUserWalletHistory(
|
||||
req?: wallet.PublicGetUserWalletHistoryRequest,
|
||||
options?: T,
|
||||
): Promise<wallet.PublicGetUserWalletHistoryResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/marketplace/wallet/history');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
index: _req['index'],
|
||||
count: _req['count'],
|
||||
type_list: _req['type_list'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/** GET /api/marketplace/wallet/detail */
|
||||
PublicGetUserWalletDetail(
|
||||
req?: wallet.PublicGetUserWalletDetailRequest,
|
||||
options?: T,
|
||||
): Promise<wallet.PublicGetUserWalletDetailResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/marketplace/wallet/detail');
|
||||
const method = 'GET';
|
||||
const params = { balance_type: _req['balance_type'] };
|
||||
const headers = { 'Tt-Agw-Client-Ip': _req['Tt-Agw-Client-Ip'] };
|
||||
return this.request({ url, method, params, headers }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/marketplace/commerce/get_user_benefit
|
||||
*
|
||||
* 获取用户权益通用详情
|
||||
*/
|
||||
PublicGetUserBenefit(
|
||||
req?: benefit.PublicGetUserBenefitRequest,
|
||||
options?: T,
|
||||
): Promise<benefit.PublicGetUserBenefitResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/marketplace/commerce/get_user_benefit');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
benefit_types: _req['benefit_types'],
|
||||
coze_account_id: _req['coze_account_id'],
|
||||
coze_account_type: _req['coze_account_type'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /v1/commerce/benefit/bill_tasks
|
||||
*
|
||||
* --------------------------- OpenAPI ---------------------------
|
||||
*
|
||||
* 创建流水导出任务
|
||||
*/
|
||||
OapiCreateBillDownloadTask(
|
||||
req?: oapi.CreateBillDownloadTaskRequest,
|
||||
options?: T,
|
||||
): Promise<oapi.CreateBillDownloadTaskResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/v1/commerce/benefit/bill_tasks');
|
||||
const method = 'POST';
|
||||
const data = { started_at: _req['started_at'], ended_at: _req['ended_at'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /v1/commerce/benefit/bill_tasks
|
||||
*
|
||||
* 查询流水结果
|
||||
*/
|
||||
OapiListBillDownloadTask(
|
||||
req?: oapi.ListBillDownloadTaskRequest,
|
||||
options?: T,
|
||||
): Promise<oapi.ListBillDownloadTaskResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/v1/commerce/benefit/bill_tasks');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
task_ids: _req['task_ids'],
|
||||
page_num: _req['page_num'],
|
||||
page_size: _req['page_size'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /v1/commerce/benefit/limitations/:benefit_id
|
||||
*
|
||||
* 更新限流配置
|
||||
*/
|
||||
UpdateBenefitLimitation(
|
||||
req?: oapi.UpdateBenefitLimitationRequest,
|
||||
options?: T,
|
||||
): Promise<oapi.UpdateBenefitLimitationResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
`/v1/commerce/benefit/limitations/${_req['benefit_id']}`,
|
||||
);
|
||||
const method = 'PUT';
|
||||
const data = {
|
||||
active_mode: _req['active_mode'],
|
||||
started_at: _req['started_at'],
|
||||
ended_at: _req['ended_at'],
|
||||
duration: _req['duration'],
|
||||
limit: _req['limit'],
|
||||
status: _req['status'],
|
||||
trigger_unit: _req['trigger_unit'],
|
||||
trigger_time: _req['trigger_time'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /v1/commerce/benefit/limitations
|
||||
*
|
||||
* 创建限流配置
|
||||
*/
|
||||
CreateBenefitLimitation(
|
||||
req?: oapi.CreateBenefitLimitationRequest,
|
||||
options?: T,
|
||||
): Promise<oapi.CreateBenefitLimitationResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/v1/commerce/benefit/limitations');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
entity_type: _req['entity_type'],
|
||||
entity_id: _req['entity_id'],
|
||||
benefit_info: _req['benefit_info'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /v1/commerce/benefit/limitations
|
||||
*
|
||||
* 查询限流配置
|
||||
*/
|
||||
ListBenefitLimitation(
|
||||
req?: oapi.ListBenefitLimitationRequest,
|
||||
options?: T,
|
||||
): Promise<oapi.ListBenefitLimitationResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/v1/commerce/benefit/limitations');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
entity_type: _req['entity_type'],
|
||||
entity_id: _req['entity_id'],
|
||||
benefit_type: _req['benefit_type'],
|
||||
status: _req['status'],
|
||||
page_token: _req['page_token'],
|
||||
page_size: _req['page_size'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /api/marketplace/commerce/benefit/limitations/:benefit_id
|
||||
*
|
||||
* 更新限流配置
|
||||
*/
|
||||
PublicUpdateBenefitLimitation(
|
||||
req?: benefit.PublicUpdateBenefitLimitationRequest,
|
||||
options?: T,
|
||||
): Promise<benefit.PublicUpdateBenefitLimitationResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
`/api/marketplace/commerce/benefit/limitations/${_req['benefit_id']}`,
|
||||
);
|
||||
const method = 'PUT';
|
||||
const data = {
|
||||
limit: _req['limit'],
|
||||
status: _req['status'],
|
||||
trigger_unit: _req['trigger_unit'],
|
||||
trigger_time: _req['trigger_time'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/marketplace/commerce/benefit/limitations
|
||||
*
|
||||
* 查询限流配置
|
||||
*/
|
||||
PublicListBenefitLimitation(
|
||||
req?: benefit.PublicListBenefitLimitationRequest,
|
||||
options?: T,
|
||||
): Promise<benefit.PublicListBenefitLimitationResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/marketplace/commerce/benefit/limitations',
|
||||
);
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
entity_type: _req['entity_type'],
|
||||
entity_id: _req['entity_id'],
|
||||
benefit_type: _req['benefit_type'],
|
||||
status: _req['status'],
|
||||
page_token: _req['page_token'],
|
||||
page_size: _req['page_size'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/marketplace/commerce/benefit/limitations
|
||||
*
|
||||
* 创建限流配置
|
||||
*/
|
||||
PublicCreateBenefitLimitation(
|
||||
req?: benefit.PublicCreateBenefitLimitationRequest,
|
||||
options?: T,
|
||||
): Promise<benefit.PublicCreateBenefitLimitationResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/marketplace/commerce/benefit/limitations',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
entity_type: _req['entity_type'],
|
||||
entity_id: _req['entity_id'],
|
||||
benefit_info: _req['benefit_info'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/marketplace/commerce/benefit/update_subscription_renewal_info
|
||||
*
|
||||
* 修改续费信息
|
||||
*/
|
||||
PublicUpdateSubscriptionRenewalInfo(
|
||||
req?: benefit.PublicUpdateSubscriptionRenewalInfoRequest,
|
||||
options?: T,
|
||||
): Promise<benefit.PublicUpdateSubscriptionRenewalInfoResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/marketplace/commerce/benefit/update_subscription_renewal_info',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
renewal_type: _req['renewal_type'],
|
||||
renewal_period_times: _req['renewal_period_times'],
|
||||
};
|
||||
const params = {
|
||||
coze_account_id: _req['coze_account_id'],
|
||||
coze_account_type: _req['coze_account_type'],
|
||||
};
|
||||
return this.request({ url, method, data, params }, options);
|
||||
}
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,330 @@
|
||||
/*
|
||||
* 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 benefit_common from './benefit_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export enum SubscriptionRenewalType {
|
||||
Unknown = 0,
|
||||
/** 手动续费 */
|
||||
ManualRenewal = 1,
|
||||
/** 自动续费 */
|
||||
AutoRenewal = 2,
|
||||
/** 到期不续费续费 */
|
||||
DontRenewal = 3,
|
||||
}
|
||||
|
||||
export interface AddBenefitContent {
|
||||
AddMessageCreditsBenefit?: AddMessageCreditsBenefitStruct;
|
||||
AddTopUpCreditsBenefit?: AddTopUpCreditsBenefitStruct;
|
||||
}
|
||||
|
||||
export interface AddMessageCreditsBenefitStruct {
|
||||
AmountPerDay: Int64;
|
||||
ActiveDays: Int64;
|
||||
}
|
||||
|
||||
export interface AddTopUpCreditsBenefitStruct {
|
||||
Amount: Int64;
|
||||
Expired: Int64;
|
||||
}
|
||||
|
||||
export interface BenefitDetail {
|
||||
BenefitType?: benefit_common.BenefitType;
|
||||
MessageCreditDetail?: MessageCreditDetail;
|
||||
BonusMessageCreditDetail?: MessageCreditDetail;
|
||||
TopUpMessageCreditDetail?: MessageCreditDetail;
|
||||
}
|
||||
|
||||
export interface BenefitInfo {
|
||||
benefit_id?: string;
|
||||
/** 2 : optional benefit_common.BenefitType BenefitType (api.body= "benefit_type"),
|
||||
3 : optional string ActiveMode (go.tag="json:\"active_mode\""),
|
||||
4 : optional i64 StartedAt (go.tag="json:\"started_at\""),
|
||||
5 : optional i64 EndedAt(go.tag="json:\"ended_at\""),
|
||||
6 : optional i32 Duration (go.tag="json:\"duration\""), */
|
||||
limit?: Int64;
|
||||
status?: benefit_common.EntityBenefitStatus;
|
||||
entity_type?: benefit_common.BenefitEntityType;
|
||||
entity_id?: string;
|
||||
trigger_unit?: benefit_common.LimitationTriggerUnit;
|
||||
trigger_time?: Int64;
|
||||
}
|
||||
|
||||
export interface BenefitTypeInfo {
|
||||
BasicInfo?: benefit_common.CommonCounter;
|
||||
ItemInfos?: Array<BenefitTypeInfoItem>;
|
||||
ResourceID?: string;
|
||||
BenefitType?: benefit_common.BenefitType;
|
||||
/** 实际生效总量 */
|
||||
Effective?: benefit_common.CommonCounter;
|
||||
}
|
||||
|
||||
export interface BenefitTypeInfoItem {
|
||||
ItemID?: string;
|
||||
ItemInfo?: benefit_common.CommonCounter;
|
||||
Status?: benefit_common.EntityBenefitStatus;
|
||||
BenefitID?: string;
|
||||
}
|
||||
|
||||
export interface ChargeDetail {
|
||||
Cost?: number;
|
||||
Unit?: string;
|
||||
}
|
||||
|
||||
export interface ChargeResourceInfo {
|
||||
ResourceID?: Int64;
|
||||
ResourceType?: benefit_common.ChargeResourceType;
|
||||
IsCharge?: boolean;
|
||||
ChargeInfo?: Partial<Record<benefit_common.ChargeItemType, ChargeDetail>>;
|
||||
}
|
||||
|
||||
export interface CreateBenefitLimitationData {
|
||||
benefit_info?: BenefitInfo;
|
||||
}
|
||||
|
||||
export interface DenyReason {
|
||||
Code: number;
|
||||
Message: string;
|
||||
}
|
||||
|
||||
export interface EntityBenefit {
|
||||
benefit_id?: Int64;
|
||||
BenefitType?: benefit_common.BenefitType;
|
||||
status?: benefit_common.EntityBenefitStatus;
|
||||
entity_type?: benefit_common.BenefitEntityType;
|
||||
entity_id?: string;
|
||||
/** 开始时间,秒级别时间戳 */
|
||||
started_at?: Int64;
|
||||
/** 结束时间,秒级别时间戳 */
|
||||
ended_at?: Int64;
|
||||
/** 取消时间,秒级别时间戳 */
|
||||
canceled_at?: Int64;
|
||||
common_counter?: benefit_common.CommonCounter;
|
||||
volc_account_id?: Int64;
|
||||
}
|
||||
|
||||
export interface HistoryBotInfo {
|
||||
BotID?: Int64;
|
||||
IsDraft?: boolean;
|
||||
IsTried?: boolean;
|
||||
}
|
||||
|
||||
export interface HistoryConsumeItem {
|
||||
EntityID?: Int64;
|
||||
ChangeCredit?: Int64;
|
||||
Type?: benefit_common.BenefitHistoryType;
|
||||
ResourceID?: string;
|
||||
}
|
||||
|
||||
export interface HistoryConsumeItemV2 {
|
||||
ResourceID?: string;
|
||||
ChangeCredit?: number;
|
||||
}
|
||||
|
||||
export interface HistoryEntityInfo {
|
||||
EntityID?: Int64;
|
||||
IsDraft?: boolean;
|
||||
IsTried?: boolean;
|
||||
Name?: string;
|
||||
}
|
||||
|
||||
export interface HistoryEntityInfoV2 {
|
||||
EntityID?: Int64;
|
||||
Name?: string;
|
||||
}
|
||||
|
||||
export interface HistoryWorkflowInfo {
|
||||
WorkflowID?: Int64;
|
||||
}
|
||||
|
||||
export interface ListBenefitLimitationData {
|
||||
benefit_infos?: Array<BenefitInfo>;
|
||||
has_more?: boolean;
|
||||
page_token?: string;
|
||||
}
|
||||
|
||||
export interface MessageCreditDetail {
|
||||
TotalQuota?: number;
|
||||
UsedQuota?: number;
|
||||
MessageCreditItems?: Array<MessageCreditItem>;
|
||||
IsInUse?: boolean;
|
||||
Expired?: Int64;
|
||||
PluginCreditItems?: Array<PluginCreditItem>;
|
||||
}
|
||||
|
||||
export interface MessageCreditItem {
|
||||
ModelID?: Int64;
|
||||
ModelName?: string;
|
||||
UseMode?: benefit_common.BenefitUseMode;
|
||||
Quota?: number;
|
||||
Used?: number;
|
||||
QuataOnceCost?: number;
|
||||
}
|
||||
|
||||
export interface PluginCreditItem {
|
||||
PluginID?: Int64;
|
||||
PluginName?: string;
|
||||
UseMode?: benefit_common.BenefitUseMode;
|
||||
QuataOnceCost?: number;
|
||||
}
|
||||
|
||||
export interface PublicCreateBenefitLimitationRequest {
|
||||
entity_type?: benefit_common.BenefitEntityType;
|
||||
entity_id?: string;
|
||||
benefit_info?: BenefitInfo;
|
||||
}
|
||||
|
||||
export interface PublicCreateBenefitLimitationResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: CreateBenefitLimitationData;
|
||||
}
|
||||
|
||||
export interface PublicGetUserBenefitRequest {
|
||||
/** 不传仅返回用户信息 */
|
||||
benefit_types?: Array<benefit_common.BenefitType>;
|
||||
/** 必填。这里指的是Coze的AccountID */
|
||||
coze_account_id?: string;
|
||||
/** 这里指的是Coze的AccountType */
|
||||
coze_account_type?: benefit_common.CozeAccountType;
|
||||
}
|
||||
|
||||
export interface PublicGetUserBenefitResponse {
|
||||
code?: number;
|
||||
message?: string;
|
||||
data?: UserBenefitData;
|
||||
}
|
||||
|
||||
export interface PublicListBenefitLimitationRequest {
|
||||
entity_type?: benefit_common.BenefitEntityType;
|
||||
entity_id?: string;
|
||||
benefit_type?: benefit_common.BenefitType;
|
||||
status?: benefit_common.EntityBenefitStatus;
|
||||
page_token?: string;
|
||||
page_size?: number;
|
||||
}
|
||||
|
||||
export interface PublicListBenefitLimitationResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: ListBenefitLimitationData;
|
||||
}
|
||||
|
||||
export interface PublicUpdateBenefitLimitationRequest {
|
||||
benefit_id?: string;
|
||||
/** 2 : optional string ActiveMode (api.body = "active_mode"),
|
||||
3 : optional i64 StartedAt (api.body = "started_at"),
|
||||
4 : optional i64 EndedAt (api.body = "ended_at"),
|
||||
5 : optional i32 Duration (api.body = "duration"), */
|
||||
limit?: Int64;
|
||||
status?: benefit_common.EntityBenefitStatus;
|
||||
trigger_unit?: benefit_common.LimitationTriggerUnit;
|
||||
trigger_time?: Int64;
|
||||
}
|
||||
|
||||
export interface PublicUpdateBenefitLimitationResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface PublicUpdateSubscriptionRenewalInfoRequest {
|
||||
/** 这里指的是Coze的AccountID */
|
||||
coze_account_id?: string;
|
||||
coze_account_type?: benefit_common.CozeAccountType;
|
||||
/** 续费类型 */
|
||||
renewal_type?: SubscriptionRenewalType;
|
||||
renewal_period_times?: Int64;
|
||||
}
|
||||
|
||||
export interface PublicUpdateSubscriptionRenewalInfoResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface RefundTopUpCreditInfo {
|
||||
Amount?: number;
|
||||
Used?: number;
|
||||
}
|
||||
|
||||
export interface SubscriptionRenewalInfo {
|
||||
/** 续费类型 */
|
||||
renewal_type?: SubscriptionRenewalType;
|
||||
/** 单次自动续费的周期数量,比如包月,就是每次自动续费几个月 */
|
||||
renewal_period_times?: Int64;
|
||||
}
|
||||
|
||||
export interface UserBasicBenefit {
|
||||
Status?: benefit_common.AccountStatus;
|
||||
AccountID?: Int64;
|
||||
UserBenefitInfo?: Partial<
|
||||
Record<benefit_common.BenefitType, benefit_common.CommonCounter>
|
||||
>;
|
||||
}
|
||||
|
||||
export interface UserBenefitData {
|
||||
/** 用户基本信息 */
|
||||
user_basic_info: benefit_common.PublicUserBasicInfo;
|
||||
benefit_type_infos?: Partial<
|
||||
Record<benefit_common.BenefitType, benefit_common.CommonCounter>
|
||||
>;
|
||||
}
|
||||
|
||||
export interface UserBenefitHistory {
|
||||
ChangeBalance?: number;
|
||||
Date?: Int64;
|
||||
Type?: benefit_common.BenefitRootHistoryType;
|
||||
ConnectorID?: Int64;
|
||||
SpaceID?: Int64;
|
||||
EntityInfo?: HistoryEntityInfoV2;
|
||||
EntityItems?: Partial<
|
||||
Record<benefit_common.ConsumeResourceType, Array<HistoryConsumeItemV2>>
|
||||
>;
|
||||
}
|
||||
|
||||
export interface UserBenefitHistroy {
|
||||
ChangeCredit?: Int64;
|
||||
Date?: Int64;
|
||||
Type?: benefit_common.BenefitHistoryType;
|
||||
ConnectorID?: Int64;
|
||||
/** 已废弃 */
|
||||
HistoryBotInfo?: HistoryBotInfo;
|
||||
IsExpired?: boolean;
|
||||
/** 已废弃 */
|
||||
HistoryWorkflowInfo?: HistoryWorkflowInfo;
|
||||
/** 后续废弃,用EntityItems */
|
||||
ModelHistoryItems?: Array<HistoryConsumeItem>;
|
||||
PluginHistoryItems?: Array<HistoryConsumeItem>;
|
||||
EntityInfo?: HistoryEntityInfo;
|
||||
}
|
||||
|
||||
export interface UserExtraBenefit {
|
||||
benefit_type?: benefit_common.BenefitType;
|
||||
uuid?: string;
|
||||
counter?: benefit_common.CommonCounter;
|
||||
resource_id?: string;
|
||||
/** 对应 entity_config表才有 */
|
||||
benefit_id?: string;
|
||||
/** 对应EntityBenefitStatus,entity_config表才有 */
|
||||
entity_status?: benefit_common.EntityBenefitStatus;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,783 @@
|
||||
/*
|
||||
* 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 copilot_common from './copilot_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export enum AccountStatus {
|
||||
Available = 1,
|
||||
/** 账户付费不可用 */
|
||||
Unavailable = 2,
|
||||
}
|
||||
|
||||
/** 权益流水状态 */
|
||||
export enum BenefitCostStatus {
|
||||
/** 已撤回 */
|
||||
Reverted = 0,
|
||||
/** 已成功 */
|
||||
Succeed = 1,
|
||||
}
|
||||
|
||||
/** Benefit 所作用的实体类型 */
|
||||
export enum BenefitEntityType {
|
||||
/** 企业下的所有设备 */
|
||||
EnterpriseAllDevices = 1,
|
||||
/** 企业下的所有终端 */
|
||||
EnterpriseAllCustomConsumer = 2,
|
||||
/** 单设备 */
|
||||
EnterpriseSingleDevice = 11,
|
||||
/** 单终端主题,由客户自定义 */
|
||||
EnterpriseSingleCustomConsumer = 12,
|
||||
/** API */
|
||||
API = 13,
|
||||
/** Plugin */
|
||||
Plugin = 14,
|
||||
/** Voice */
|
||||
Voice = 15,
|
||||
/** Workflow */
|
||||
Workflow = 16,
|
||||
/** 企业配置类
|
||||
企业安心用配置 */
|
||||
EnterpriseConfConfidenceUsing = 51,
|
||||
}
|
||||
|
||||
/** 权益历史记录类型 */
|
||||
export enum BenefitHistoryType {
|
||||
/** bot 消耗 */
|
||||
ChatWithBot = 1,
|
||||
TopUpCredit = 2,
|
||||
BounsCredit = 3,
|
||||
ChargeBack = 4,
|
||||
ChargeBackReverse = 5,
|
||||
WorkflowConsume = 6,
|
||||
/** 智能语音 */
|
||||
IntelligentVoice = 11,
|
||||
/** 扣子罗盘消耗 */
|
||||
Fornax = 12,
|
||||
EvaluateConsume = 41,
|
||||
EvaluateModelConsume = 42,
|
||||
/** 应用消耗 */
|
||||
ProjectConsume = 61,
|
||||
}
|
||||
|
||||
/** 权益流水根节点类型 */
|
||||
export enum BenefitRootHistoryType {
|
||||
/** bot 消耗 */
|
||||
BotConsume = 1,
|
||||
/** workflow 消耗 */
|
||||
WorkflowConsume = 2,
|
||||
/** 应用消耗 */
|
||||
ProjectConsume = 3,
|
||||
/** 智能语音 */
|
||||
IntelligentVoiceConsume = 4,
|
||||
/** 扣子罗盘消耗 */
|
||||
FornaxConsume = 5,
|
||||
/** 模型评测消耗 */
|
||||
EvaluateModelConsume = 6,
|
||||
}
|
||||
|
||||
/** 权益类型
|
||||
40 -59 免费次数
|
||||
60 - 99 限流
|
||||
100-109 资源点
|
||||
110-129 Fornax
|
||||
130-149 WorkSpace
|
||||
150-169 运维
|
||||
170-179 知识库
|
||||
180-199 语音
|
||||
200-219 租户相关
|
||||
220-229 发布相关 */
|
||||
export enum BenefitType {
|
||||
/** 海外 */
|
||||
MessageCredit = 1,
|
||||
UserFreeChat = 2,
|
||||
TopUpMessageCredit = 3,
|
||||
BonusMessageCredit = 4,
|
||||
/** 40 -59 免费次数 */
|
||||
Freetimes = 40,
|
||||
/** 评测免费次数 */
|
||||
EvaluateFree = 41,
|
||||
/** Workflow 测试运行免费次数 */
|
||||
WorkflowTestRunFree = 42,
|
||||
/** App 测试运行免费次数 */
|
||||
AppTestRunFree = 43,
|
||||
/** Plugin 测试运行免费次数 */
|
||||
PluginRunFree = 44,
|
||||
/** API 运行免费次数 */
|
||||
APIRunFree = 45,
|
||||
/** SDK 运行免费次数 */
|
||||
SDKRunFree = 46,
|
||||
/** 60 - 99 限流
|
||||
模型 RPM 限流 */
|
||||
RateLimitModelRPM = 60,
|
||||
/** 模型 Input TPM 限流 */
|
||||
RateLimitModelInputTPM = 61,
|
||||
/** 模型 Output TPM 限流 */
|
||||
RateLimitModelOutputTPM = 62,
|
||||
/** 基础模型 Input TPM 限流 */
|
||||
RateLimitModelInputTPMBasic = 63,
|
||||
/** 基础模型 Output TPM 限流 */
|
||||
RateLimitModelOutputTPMBasic = 64,
|
||||
/** Plugin 运行 QPS 限流 */
|
||||
PluginRunQPS = 65,
|
||||
/** Plugin 运行并发度限流 */
|
||||
PluginRunParallel = 66,
|
||||
/** 图像节点
|
||||
Workflow 运行 QPS 限流 */
|
||||
WorkflowRunQPS = 67,
|
||||
/** Workflow 运行并发度限流 */
|
||||
WorkflowRunParallel = 68,
|
||||
/** API 运行 QPS 限流 */
|
||||
APIRunQPS = 70,
|
||||
/** 语音 QPS 限流 */
|
||||
VoiceQPS = 71,
|
||||
/** 语音并发度限流 */
|
||||
VoiceParallel = 72,
|
||||
/** 100-109 资源点
|
||||
资源点总量 */
|
||||
ResourcePoint = 100,
|
||||
/** 免费资源点,废弃 */
|
||||
FreeResourcePoint = 101,
|
||||
/** 火山购买的资源点 */
|
||||
VolcProResourcePoint = 102,
|
||||
/** 周期性资源点 */
|
||||
PeriodicResourcePoint = 103,
|
||||
/** 渠道递减资源点 */
|
||||
ChannelResourcePoint = 104,
|
||||
/** 试算资源点 */
|
||||
CutAndTryResourcePoint = 109,
|
||||
/** 110-129 Fornax
|
||||
Trace 用量 */
|
||||
TraceAmount = 111,
|
||||
/** Trace 存储时长 */
|
||||
TraceStorageDuration = 112,
|
||||
/** 130-149 WorkSpace
|
||||
Space 总量 */
|
||||
SpaceAmount = 131,
|
||||
/** Space 人数 */
|
||||
SpacePeopleNumber = 132,
|
||||
/** Space 下协作者人数 */
|
||||
SpaceCollaboratorNumber = 133,
|
||||
/** 150-169 运维
|
||||
日志存储时长 */
|
||||
LogStorageDuration = 151,
|
||||
/** 日志导出 */
|
||||
LogExport = 152,
|
||||
/** 170-179 知识库
|
||||
知识库容量 */
|
||||
Capacity = 170,
|
||||
/** 180-199 语音
|
||||
音色克隆总数 */
|
||||
VoiceCloneNumber = 180,
|
||||
/** 音色克隆基础数量 */
|
||||
VoiceCloneNumberBasic = 181,
|
||||
/** 200-219 租户相关
|
||||
席位数上限 */
|
||||
SeatNumberLimit = 200,
|
||||
/** 基础席位数 */
|
||||
SeatNumberBasic = 201,
|
||||
/** 移除水印 */
|
||||
RemoveWatermark = 220,
|
||||
/** 240-269 配置
|
||||
安心用 */
|
||||
ConfidenceUsing = 240,
|
||||
}
|
||||
|
||||
/** 权益使用模式 */
|
||||
export enum BenefitUseMode {
|
||||
/** 按额度使用 */
|
||||
ByQuota = 1,
|
||||
/** 无限使用 */
|
||||
Unlimited = 2,
|
||||
/** 不可用 */
|
||||
UnAvailable = 10,
|
||||
}
|
||||
|
||||
export enum BotMode {
|
||||
SingleMode = 0,
|
||||
MutiAgent = 1,
|
||||
WorkflowMode = 2,
|
||||
}
|
||||
|
||||
export enum ChargeItemType {
|
||||
/** 1-99 模型相关 */
|
||||
ModelInputTPM = 1,
|
||||
ModelOutputTPM = 2,
|
||||
/** 100-199 语音相关 */
|
||||
VoiceClone = 100,
|
||||
VoiceStorage = 101,
|
||||
/** 200- */
|
||||
PluginRunQPS = 200,
|
||||
PluginRunParallel = 201,
|
||||
}
|
||||
|
||||
export enum ChargeResourceType {
|
||||
Model = 1,
|
||||
Plugin = 2,
|
||||
}
|
||||
|
||||
/** 校验结果。通常结合BenefitType */
|
||||
export enum CheckResultType {
|
||||
Pass = 1,
|
||||
/** 超出限额 */
|
||||
OutOfLimitation = 2,
|
||||
/** 余额/余量不足 */
|
||||
InsufficientBalance = 3,
|
||||
}
|
||||
|
||||
/** 权益校验点位 */
|
||||
export enum CheckType {
|
||||
/** 仅校验用于权益余量 */
|
||||
CheckCommon = 0,
|
||||
/** 对话(含Chatflow)开始。 */
|
||||
ChatStart = 1,
|
||||
/** 对话(含Chatflow)结束。对话结束后,上报对应对话结果 ErrCode */
|
||||
ChatFinish = 2,
|
||||
/** 调用模型前(通常为chat_engine/runtime),通常做限流 */
|
||||
ModelCallBefore = 6,
|
||||
/** 模型执行完成(model_agent/llm_gateway),通常用量上报 */
|
||||
ModelExecDone = 7,
|
||||
/** workflow执行。通常为非对话接口的workflow的执行前校验,如试用次数 */
|
||||
WorkflowRunStart = 11,
|
||||
/** workflow执行。通常为非对话接口的workflow执行后 */
|
||||
WorkflowRunFinish = 12,
|
||||
/** workflow中断重入 */
|
||||
WorkflowRunResume = 13,
|
||||
/** 调用插件前,通常做限流 */
|
||||
PluginCallBefore = 16,
|
||||
/** 插件执行完成。通常为插件用量上报 */
|
||||
PluginExecFinish = 17,
|
||||
/** 评测前(Fornax评测复用) */
|
||||
EvaluateBefore = 41,
|
||||
/** 评测结果裁判 */
|
||||
EvaluateJudge = 42,
|
||||
/** 语音消费结束时上报 */
|
||||
VoiceUseFinish = 51,
|
||||
/** Trace日志落库前,用于限额 */
|
||||
FornaxTraceBefore = 61,
|
||||
}
|
||||
|
||||
/** 权益流水对应消耗的资源类型 */
|
||||
export enum ConsumeResourceType {
|
||||
/** 未知 */
|
||||
Unknown = 0,
|
||||
/** 模型 */
|
||||
Model = 1,
|
||||
/** 插件 */
|
||||
Plugin = 2,
|
||||
/** 语音(ASR/TTS) */
|
||||
Voice = 3,
|
||||
/** RTC */
|
||||
RTC = 4,
|
||||
/** 知识库(暂不对外暴露该类型) */
|
||||
Dateset = 5,
|
||||
}
|
||||
|
||||
/** 权益流水的成本归属用户类型 */
|
||||
export enum CostUserType {
|
||||
/** 未知 */
|
||||
Unknown = 0,
|
||||
/** 企业(国内为火山账号) */
|
||||
Enterprise = 1,
|
||||
/** 个人用户 */
|
||||
User = 2,
|
||||
}
|
||||
|
||||
export enum CozeAccountType {
|
||||
/** 未知 */
|
||||
Unknown = 0,
|
||||
/** 组织账号 */
|
||||
Organization = 1,
|
||||
/** 个人账号 */
|
||||
Personal = 2,
|
||||
}
|
||||
|
||||
/** 用户权益套餐状态 */
|
||||
export enum CozeInstanceStaus {
|
||||
/** 运行中 */
|
||||
Running = 1,
|
||||
/** 退订 */
|
||||
Unsubs = 2,
|
||||
/** 到期 */
|
||||
Expired = 3,
|
||||
/** 欠费 */
|
||||
Overdue = 4,
|
||||
}
|
||||
|
||||
export enum DurationType {
|
||||
Day = 1,
|
||||
Month = 2,
|
||||
Year = 3,
|
||||
}
|
||||
|
||||
export enum EntityBenefitStatus {
|
||||
/** 正常使用 */
|
||||
Valid = 1,
|
||||
/** 冻结使用 */
|
||||
Frozen = 3,
|
||||
/** 取消 */
|
||||
Cancel = 5,
|
||||
/** 待生效(此枚举通过计算得出,数据库中并无此项数据) */
|
||||
Pending = 6,
|
||||
}
|
||||
|
||||
export enum EntityPeriodType {
|
||||
/** 绝对时间 */
|
||||
AbsoluteTime = 1,
|
||||
/** 相对时间 */
|
||||
RelativeTime = 2,
|
||||
}
|
||||
|
||||
export enum ExecutionMode {
|
||||
/** 发布态/正式态 */
|
||||
Release = 0,
|
||||
/** 草稿态/调试态/编辑态。 */
|
||||
Draft = 1,
|
||||
}
|
||||
|
||||
export enum InstanceLimitStatus {
|
||||
/** 未受限 */
|
||||
UnLimited = 1,
|
||||
/** 受限中(欠费) */
|
||||
Limited = 2,
|
||||
}
|
||||
|
||||
export enum InstanceStatus {
|
||||
/** 创建中, 理论上不会返回该状态 */
|
||||
InstanceStatusCreating = 0,
|
||||
/** 运行中 */
|
||||
Running = 1,
|
||||
/** 创建失败, 理论上不会返回该状态 */
|
||||
InstanceStatusFailed = 2,
|
||||
/** 退订回收 */
|
||||
UnsubsRecycled = 3,
|
||||
/** 到期关停 */
|
||||
ExpiredClosed = 4,
|
||||
/** 到期回收 */
|
||||
ExpiredRecycled = 5,
|
||||
/** 欠费关停 */
|
||||
InstanceStatusOverdueShutdown = 6,
|
||||
/** 欠费回收 */
|
||||
InstanceStatusOverdueRecycled = 7,
|
||||
/** 退订关停 */
|
||||
InstanceStatusTerminatedShutdown = 8,
|
||||
}
|
||||
|
||||
export enum LimitationTriggerUnit {
|
||||
Never = 0,
|
||||
Minute = 1,
|
||||
Hour = 2,
|
||||
Day = 3,
|
||||
Month = 4,
|
||||
Second = 5,
|
||||
}
|
||||
|
||||
export enum MonetizationEntityType {
|
||||
Bot = 0,
|
||||
Project = 1,
|
||||
}
|
||||
|
||||
/** 权益流水的权益类型(用于对客) */
|
||||
export enum OpenBenefitType {
|
||||
/** 未知 */
|
||||
Unknown = 0,
|
||||
/** 免费赠送(大类,包括插件试用次数等。对于国内,当前仅个人免费版有该类型) */
|
||||
Free = 1,
|
||||
/** 资源点 */
|
||||
ResourcePoint = 2,
|
||||
}
|
||||
|
||||
export enum OperateType {
|
||||
AddBenefit = 1,
|
||||
RefundSubscription = 2,
|
||||
RefundTopUp = 3,
|
||||
SubscriptionChargeBack = 4,
|
||||
TopUpChargeBack = 5,
|
||||
SubscriptionChargeBackReverse = 6,
|
||||
TopUpChargeBackReverse = 7,
|
||||
}
|
||||
|
||||
export enum PluginBillType {
|
||||
/** 按次调用计费。适用于大多数插件 */
|
||||
ByCallTime = 0,
|
||||
/** 按时长计费(单位S)。适用于音乐生成、视频编辑等 */
|
||||
ByDuration = 1,
|
||||
/** 按token数计费。适用于视频生成 */
|
||||
ByTotalTokens = 2,
|
||||
/** 插件本身不计费,由下游计费。 */
|
||||
NoneButByDownstream = 11,
|
||||
}
|
||||
|
||||
/** 资源归属的实体类型 */
|
||||
export enum ResBelongsToEntityType {
|
||||
/** 未知 */
|
||||
Unknown = 0,
|
||||
/** bot */
|
||||
Bot = 1,
|
||||
/** workflow */
|
||||
Workflow = 2,
|
||||
/** plugin */
|
||||
Plugin = 3,
|
||||
/** 应用。原Project */
|
||||
Application = 4,
|
||||
/** 模型 */
|
||||
Model = 5,
|
||||
/** 语音类(ASR/TTS) */
|
||||
Voice = 6,
|
||||
}
|
||||
|
||||
export enum ResourceUsageStrategy {
|
||||
/** 无限制 */
|
||||
UnLimit = 1,
|
||||
/** 限制 */
|
||||
Forbidden = 2,
|
||||
/** 通过额度校验 */
|
||||
ByQuota = 3,
|
||||
}
|
||||
|
||||
/** 场景 */
|
||||
export enum SceneType {
|
||||
/** 对话 */
|
||||
Chat = 1,
|
||||
/** workflow testrun */
|
||||
WorkflowTest = 2,
|
||||
/** 评测bot */
|
||||
EvaluateBot = 41,
|
||||
/** 评测模型 */
|
||||
EvaluateModel = 42,
|
||||
}
|
||||
|
||||
export enum UserLevel {
|
||||
/** 免费版。 */
|
||||
Free = 0,
|
||||
/** 海外
|
||||
PremiumLite */
|
||||
PremiumLite = 10,
|
||||
/** Premium */
|
||||
Premium = 15,
|
||||
PremiumPlus = 20,
|
||||
/** 国内
|
||||
V1火山专业版 */
|
||||
V1ProInstance = 100,
|
||||
/** 个人旗舰版 */
|
||||
ProPersonal = 110,
|
||||
/** 团队版 */
|
||||
Team = 120,
|
||||
/** 企业版 */
|
||||
Enterprise = 130,
|
||||
}
|
||||
|
||||
export enum VoiceResType {
|
||||
/** 音色克隆 */
|
||||
VoiceClone = 1,
|
||||
/** 复刻语音-文字转语音 */
|
||||
TTSCustom = 2,
|
||||
/** 系统语音-文字转语音 */
|
||||
TTSSystem = 3,
|
||||
/** 流式语音识别 - 大模型 */
|
||||
ASRStream = 4,
|
||||
/** 录音文件语音识别 - 大模型 */
|
||||
ASRFile = 5,
|
||||
/** 流式语音识别 - 小模型 */
|
||||
ASRStreamSmall = 6,
|
||||
/** 录音文件语音识别 - 小模型 */
|
||||
ASRFileSmall = 7,
|
||||
/** 语音通话 音频时长 */
|
||||
RTCVoice = 8,
|
||||
/** 对话式AI 音频时长 */
|
||||
RTCDialogAI = 9,
|
||||
/** 视频通话时长-4k */
|
||||
RTCVideoCall4K = 10,
|
||||
/** 视频通话时长-2k */
|
||||
RTCVideoCall2K = 11,
|
||||
/** 视频通话时长-1080P */
|
||||
RTCVideoCall1080P = 12,
|
||||
/** 视频通话时长-720P */
|
||||
RTCVideoCall720P = 13,
|
||||
/** 视频通话时长-360P */
|
||||
RTCVideoCall360P = 14,
|
||||
/** TTS 相关计费项 【20-40)
|
||||
文字转语音,按调用次数收费 - 小模型 */
|
||||
TTSSmall = 20,
|
||||
}
|
||||
|
||||
export enum VolcanoUserType {
|
||||
Unknown = 0,
|
||||
RootUser = 1,
|
||||
BasicUser = 2,
|
||||
}
|
||||
|
||||
export enum VolcInstanceType {
|
||||
/** 正常版本 */
|
||||
Normal = 1,
|
||||
/** 渠道版本 */
|
||||
Channel = 2,
|
||||
}
|
||||
|
||||
export enum WorkflowMode {
|
||||
Unknown = 0,
|
||||
TestRun = 1,
|
||||
Released = 2,
|
||||
}
|
||||
|
||||
export interface BenefitRecord {
|
||||
ID: string;
|
||||
IdempotencyKey: string;
|
||||
BizScene: string;
|
||||
ConsumeTime: Int64;
|
||||
CheckType: Int64;
|
||||
RecordRootID: Int64;
|
||||
AccountID: Int64;
|
||||
CozeUserID: Int64;
|
||||
EnterpriseID: string;
|
||||
CozeAccountType: Int64;
|
||||
ConnectorID: Int64;
|
||||
ConnectorUID: string;
|
||||
DeviceID: string;
|
||||
SpaceID: Int64;
|
||||
RootEntityType: Int64;
|
||||
RootEntityID: Int64;
|
||||
ChangeBalance: string;
|
||||
BalanceType: Int64;
|
||||
BizDetail?: BizDetail;
|
||||
ResourceType: Int64;
|
||||
ResourceID: string;
|
||||
ResModelContent?: ResModelContent;
|
||||
ResPluginContent?: ResPluginContent;
|
||||
ResVoiceContent?: ResVoiceContent;
|
||||
CostConnectorID: Int64;
|
||||
CostConnectorUID: string;
|
||||
CostAccountID: Int64;
|
||||
CostUserType: Int64;
|
||||
CostEnterpriseID: string;
|
||||
Status: Int64;
|
||||
CreatedAt: Int64;
|
||||
UpdatedAt: Int64;
|
||||
}
|
||||
|
||||
export interface BizDetail {
|
||||
APIID?: Int64;
|
||||
APIOwnerID?: Int64;
|
||||
ByteTreeID?: string;
|
||||
LogID?: string;
|
||||
Caller?: string;
|
||||
Ftf?: string;
|
||||
Env?: string;
|
||||
OriPath?: string;
|
||||
OriHost?: string;
|
||||
OriConsumeTime?: Int64;
|
||||
}
|
||||
|
||||
export interface CommonCounter {
|
||||
/** 当 Strategy == ByQuota 时, 表示已使用量, 若权益无相关用量数据则返回 0 */
|
||||
used?: number;
|
||||
/** 当 Strategy == ByQuota 时, 表示用量上限 */
|
||||
total?: number;
|
||||
/** 使用策略 */
|
||||
strategy?: ResourceUsageStrategy;
|
||||
/** 开始时间,单位秒 */
|
||||
start_at?: Int64;
|
||||
/** 过期时间,单位秒 */
|
||||
end_at?: Int64;
|
||||
}
|
||||
|
||||
export interface DenyReason {
|
||||
Code: number;
|
||||
Message: string;
|
||||
}
|
||||
|
||||
/** 模型资源 */
|
||||
export interface ModeleResInfo {
|
||||
model_id?: Int64;
|
||||
/** model family */
|
||||
model_family?: copilot_common.ModelFamily;
|
||||
/** 输入token数 */
|
||||
input_tokens?: Int64;
|
||||
/** 输出token数 */
|
||||
output_tokens?: Int64;
|
||||
/** 模型AK类别 */
|
||||
ak_catalog?: string;
|
||||
/** 模型AK */
|
||||
model_ak?: string;
|
||||
}
|
||||
|
||||
export interface PluginRelationInfo {
|
||||
/** 计费类型 */
|
||||
bill_type?: PluginBillType;
|
||||
/** 插件功能名称。只有当一个插件内有多种计费时,该字段才需要填值 */
|
||||
feature_name?: string;
|
||||
}
|
||||
|
||||
export interface PluginResInfo {
|
||||
plugin_id?: Int64;
|
||||
plugin_api_id?: Int64;
|
||||
/** 是否是图像流 */
|
||||
is_image_flow?: boolean;
|
||||
/** 工具ID */
|
||||
tool_id?: Int64;
|
||||
/** 工具名称 */
|
||||
tool_name?: string;
|
||||
/** 插件关联信息 */
|
||||
relation_info?: PluginRelationInfo;
|
||||
/** 插件执行时间(单位秒)。默认存在是则优先取该值。适用于通过执行时长计费的插件 */
|
||||
duration?: Int64;
|
||||
/** 输出token数。默认存在是则优先取该值。适用于通过token数计费的插件 */
|
||||
total_tokens?: Int64;
|
||||
}
|
||||
|
||||
export interface PublicUserBasicInfo {
|
||||
user_level?: UserLevel;
|
||||
/** 火山账户信息。CN返回 */
|
||||
volc_account_info?: VolcAccountInfo;
|
||||
}
|
||||
|
||||
/** 资源消耗所归属对象。有则填充,避免重复获取 */
|
||||
export interface ResBelongsToEntity {
|
||||
/** 最外层的根bot id */
|
||||
root_bot_id?: Int64;
|
||||
/** 根bot的创建者Coze UserID */
|
||||
bot_creator_id?: Int64;
|
||||
/** 根bot的创建者AccountID */
|
||||
bot_creator_account_id?: Int64;
|
||||
/** 所属应用(原Project)ID */
|
||||
application_id?: Int64;
|
||||
/** 所属应用(原Project)创建者Coze UserID */
|
||||
application_creator_id?: Int64;
|
||||
/** 所属应用(原Project)创建者AccountID */
|
||||
application_account_id?: Int64;
|
||||
/** 执行的workflow id */
|
||||
workflow_id?: Int64;
|
||||
/** 是否为异步执行 */
|
||||
is_async_workflow?: boolean;
|
||||
/** Workflow 执行ID */
|
||||
workflow_execute_id?: Int64;
|
||||
/** 是否是中断重执行Workflow */
|
||||
is_reload_workflow?: boolean;
|
||||
}
|
||||
|
||||
export interface ResModelContent {
|
||||
ModelID?: Int64;
|
||||
ModelFamily?: copilot_common.ModelFamily;
|
||||
ModelMetaID?: Int64;
|
||||
ModelInputTokens?: Int64;
|
||||
ModelOutputTokens?: Int64;
|
||||
AKCatalog?: string;
|
||||
LLMScene?: string;
|
||||
APICatalog?: string;
|
||||
ModelAK?: string;
|
||||
}
|
||||
|
||||
export interface ResPluginContent {
|
||||
PluginID?: Int64;
|
||||
PluginAPIID?: Int64;
|
||||
IsImageFlow?: boolean;
|
||||
}
|
||||
|
||||
/** 资源关联基础信息,用于计算资源消耗的归属。有则填充,避免重复获取 */
|
||||
export interface ResRelationBaiscInfo {
|
||||
/** 所属空间ID */
|
||||
space_id?: Int64;
|
||||
/** 所属空间创建者Coze UserID */
|
||||
space_owner_id?: Int64;
|
||||
/** 所属空间创建者AccountID */
|
||||
space_owner_account_id?: Int64;
|
||||
/** API来源必填。对应APIKey Owner的Coze UserID */
|
||||
api_key_owner_id?: Int64;
|
||||
/** API来源的APIKey Owner的AccountID */
|
||||
api_key_owner_account_id?: Int64;
|
||||
/** 调用的bot的创建者Coze UserID */
|
||||
bind_coze_uid?: Int64;
|
||||
/** 调用的bot的创建者AccountID */
|
||||
bind_coze_account_id?: Int64;
|
||||
/** 调用的bot的创建者ByteTreeID */
|
||||
byte_tree_id?: string;
|
||||
}
|
||||
|
||||
export interface ResVoiceContent {
|
||||
VoiceResType?: VoiceResType;
|
||||
VoiceID?: string;
|
||||
CharNum?: number;
|
||||
AudioLength?: number;
|
||||
RTCDuration?: number;
|
||||
BeginTime?: Int64;
|
||||
EndTime?: Int64;
|
||||
}
|
||||
|
||||
export interface UserBasicInfo {
|
||||
UserLevel?: UserLevel;
|
||||
/** 火山账户信息。CN返回 */
|
||||
VolcAccountInfo?: VolcAccountInfo;
|
||||
/** 火山用户信息。CN返回 */
|
||||
VolcUserInfo?: VolcUserInfo;
|
||||
}
|
||||
|
||||
export interface VoiceResInfo {
|
||||
/** 资源类型 */
|
||||
voice_type: VoiceResType;
|
||||
/** 语音转文字,字符数 */
|
||||
char_num?: number;
|
||||
/** 音频时长 */
|
||||
audio_length?: number;
|
||||
/** 通话时长 */
|
||||
rtc_duration?: number;
|
||||
/** 语音通话开始时间戳 */
|
||||
begin_time?: Int64;
|
||||
/** 语音通话结束时间戳 */
|
||||
end_time?: Int64;
|
||||
/** 对应的coze_id */
|
||||
coze_id?: string;
|
||||
/** 计数,适合按调用次数计费 */
|
||||
count?: number;
|
||||
}
|
||||
|
||||
export interface VolcAccountInfo {
|
||||
/** 火山账户ID */
|
||||
account_id?: Int64;
|
||||
/** 是否为火山专业版账户,即是否开通过,当UserLevel in (100,110,120,130)时为true(即使账户关停回收仍为true) */
|
||||
is_volcano_pro_account?: boolean;
|
||||
/** 实例ID */
|
||||
instance_id?: string;
|
||||
/** 扣子专业版是否可用(含套餐及存量专业版)。存量专业版仅返回此字段 */
|
||||
coze_instance_status?: AccountStatus;
|
||||
/** 套餐(实例)状态。仅订阅套餐返回此字段 */
|
||||
instance_status?: InstanceStatus;
|
||||
/** 套餐(实例)是否受限(欠费)。仅订阅套餐返回此字段 */
|
||||
limit_status?: InstanceLimitStatus;
|
||||
/** 火山用户类型 */
|
||||
volcano_user_type?: VolcanoUserType;
|
||||
/** 权益生效时间(秒级) */
|
||||
instance_begin_time?: Int64;
|
||||
/** 权益失效时间(秒级) */
|
||||
instance_end_time?: Int64;
|
||||
/** 套餐对应周期资源包实例Id,如果用户购买的是仅版本,则该字段为空 */
|
||||
period_pack_instance_id?: string;
|
||||
}
|
||||
|
||||
export interface VolcUserInfo {
|
||||
/** 火山身份中心实例ID */
|
||||
VolcAuthInstanceID?: string;
|
||||
/** 火山开通的套餐等级 */
|
||||
VolcUserLevel?: UserLevel;
|
||||
/** 火山用户实例版本 */
|
||||
VolcInstanceType?: VolcInstanceType;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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 benefit_common from './benefit_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export enum BotMonetizationMode {
|
||||
Unknown = 0,
|
||||
Draft = 1,
|
||||
Released = 2,
|
||||
}
|
||||
|
||||
export enum BotMonetizationRefreshPeriod {
|
||||
Unknown = 0,
|
||||
Never = 1,
|
||||
Day = 2,
|
||||
Week = 3,
|
||||
Month = 4,
|
||||
}
|
||||
|
||||
export interface BotMonetizationConfig {
|
||||
IsEnabled?: boolean;
|
||||
FreeChatAllowanceCount?: number;
|
||||
}
|
||||
|
||||
export interface BotMonetizationConfigData {
|
||||
is_enable?: boolean;
|
||||
free_chat_allowance_count?: number;
|
||||
refresh_period?: BotMonetizationRefreshPeriod;
|
||||
}
|
||||
|
||||
export interface BotOpenMonetizationConfData {
|
||||
is_enable?: boolean;
|
||||
}
|
||||
|
||||
export interface PublicGetBotMonetizationConfigRequest {
|
||||
bot_id?: string;
|
||||
/** bot 收费配置是草稿还是正式的 */
|
||||
bot_monetization_mode?: BotMonetizationMode;
|
||||
/** 是否回退,如 mode 指定为 Draft 时,如果无配置,是否取 Released 中的值 */
|
||||
is_fallback?: boolean;
|
||||
entity_id?: string;
|
||||
entity_type?: benefit_common.MonetizationEntityType;
|
||||
}
|
||||
|
||||
export interface PublicGetBotMonetizationConfigResponse {
|
||||
code?: number;
|
||||
message?: string;
|
||||
data?: BotMonetizationConfigData;
|
||||
}
|
||||
|
||||
export interface PublicGetBotOpenMonetizationConfRequest {
|
||||
bot_id?: string;
|
||||
entity_id?: string;
|
||||
entity_type?: benefit_common.MonetizationEntityType;
|
||||
}
|
||||
|
||||
export interface PublicGetBotOpenMonetizationConfResponse {
|
||||
code?: number;
|
||||
message?: string;
|
||||
data?: BotOpenMonetizationConfData;
|
||||
}
|
||||
|
||||
export interface PublicSaveBotDraftMonetizationConfigRequest {
|
||||
bot_id?: string;
|
||||
is_enable?: boolean;
|
||||
free_chat_allowance_count?: number;
|
||||
refresh_period?: BotMonetizationRefreshPeriod;
|
||||
entity_id?: string;
|
||||
entity_type?: benefit_common.MonetizationEntityType;
|
||||
}
|
||||
|
||||
export interface PublicSaveBotDraftMonetizationConfigResponse {
|
||||
code?: number;
|
||||
message?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,646 @@
|
||||
/*
|
||||
* 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 Act {
|
||||
RequireAction = 0,
|
||||
RequireMessage = 1,
|
||||
}
|
||||
|
||||
/** the task status */
|
||||
export enum AsyncTaskStatus {
|
||||
NotFinished = 0,
|
||||
Interrupted = 1,
|
||||
NoResults = 2,
|
||||
WithResults = 3,
|
||||
}
|
||||
|
||||
export enum BotRecommendType {
|
||||
/** 不推荐 */
|
||||
None = 0,
|
||||
/** 精选的 */
|
||||
Featured = 1,
|
||||
/** 可被发现的 */
|
||||
Discoverable = 2,
|
||||
}
|
||||
|
||||
/** 上下文允许传输的类型 */
|
||||
export enum ContextContentType {
|
||||
/** 无任何处理版 */
|
||||
USER_RES = 0,
|
||||
USER_LLM_RES = 1,
|
||||
USER_LLM_TOOLLEN_RES = 2,
|
||||
USER_LLM_TOOL_RES = 3,
|
||||
USER_LLM_TOOL = 4,
|
||||
}
|
||||
|
||||
export enum ConversationType {
|
||||
Unknown = 0,
|
||||
Single = 1,
|
||||
Group = 2,
|
||||
}
|
||||
|
||||
export enum CopilotContentType {
|
||||
Txt = 1,
|
||||
Image = 2,
|
||||
Audio = 3,
|
||||
Video = 4,
|
||||
Link = 6,
|
||||
Music = 7,
|
||||
Tako = 8,
|
||||
File = 9,
|
||||
Card = 50,
|
||||
BotCard = 51,
|
||||
Widget = 52,
|
||||
APP = 100,
|
||||
OutputSearchResult = 200,
|
||||
OutputMultiStream = 201,
|
||||
SearchIntentionResult = 300,
|
||||
}
|
||||
|
||||
export enum CopilotResult {
|
||||
Success = 1,
|
||||
SystemLimitation = 2,
|
||||
UserLimitation = 3,
|
||||
}
|
||||
|
||||
export enum CopilotRole {
|
||||
System = 0,
|
||||
User = 1,
|
||||
Assistant = 2,
|
||||
/** 占位符,仅出现在模板中 */
|
||||
Placeholder = 3,
|
||||
/** 触发 function-call 调用的模型消息 */
|
||||
LLMOutput = 4,
|
||||
/** tool 返回,function 角色 */
|
||||
ToolOutput = 5,
|
||||
/** 同 5 */
|
||||
Function = 6,
|
||||
}
|
||||
|
||||
export enum ErrCode {
|
||||
ParamErr = 1,
|
||||
InnerErr = 2,
|
||||
WebGPT = 4,
|
||||
ByteArtist = 5,
|
||||
Claude = 6,
|
||||
Dalle2 = 7,
|
||||
GPT = 8,
|
||||
Seed = 9,
|
||||
StableDiffusion = 10,
|
||||
RiskSecurity = 11,
|
||||
RequireLocation = 12,
|
||||
SigInterrupt = 702112002,
|
||||
Timeout = 702112101,
|
||||
AuthenticationError = 702112102,
|
||||
RateLimitError = 702112103,
|
||||
InvalidRequestError = 702112104,
|
||||
FunctionInputError = 702112105,
|
||||
EngineInternalError = 702112106,
|
||||
MaximumTokenError = 702112107,
|
||||
NotSupportRoleTypeError = 702112108,
|
||||
AbParamsError = 702112109,
|
||||
ParseTemplateError = 702112110,
|
||||
ModelAKInvalidError = 702112111,
|
||||
PluginRequireAuthorityError = 702112112,
|
||||
}
|
||||
|
||||
export enum FinReason {
|
||||
/** 正常结束 */
|
||||
Normal = 0,
|
||||
/** Plugin内部中断 */
|
||||
PluginInterrupt = 1,
|
||||
}
|
||||
|
||||
export enum HighLightType {
|
||||
None = 0,
|
||||
GoogleNLP = 1,
|
||||
ToutiaoWiki = 2,
|
||||
}
|
||||
|
||||
export enum InsertReferenceType {
|
||||
/** 文本(默认) */
|
||||
Text = 1,
|
||||
/** 视频 */
|
||||
Video = 2,
|
||||
/** 图片 */
|
||||
Image = 3,
|
||||
}
|
||||
|
||||
export enum IntentionType {
|
||||
Default = 1,
|
||||
SearchText = 2,
|
||||
SearchVideo = 3,
|
||||
ComplexSearchText = 4,
|
||||
SearchImage = 5,
|
||||
SearchRichMedia = 6,
|
||||
SearchRichMediaStrong = 7,
|
||||
SearchRichMediaWeak = 8,
|
||||
}
|
||||
|
||||
export enum LLMScene {
|
||||
Chat = 1,
|
||||
Suggest = 2,
|
||||
QueryKeyword = 3,
|
||||
Workflow = 4,
|
||||
/** 生成 Onboarding */
|
||||
OnboardingOnline = 5,
|
||||
OnboardingOffline = 6,
|
||||
/** 会话命名 */
|
||||
Naming = 7,
|
||||
/** SC生成用户画像 */
|
||||
GenProfile = 8,
|
||||
BrowserPlugin = 9,
|
||||
BrowserPluginSearch = 10,
|
||||
BrowserPluginExplain = 11,
|
||||
BrowserPluginTranslate = 12,
|
||||
BrowserPluginSummary = 13,
|
||||
BrowserPluginGrammar = 14,
|
||||
BrowserPluginRewrite = 15,
|
||||
BrowserPluginWebSummary = 16,
|
||||
/** 热搜词 忽略上下文 */
|
||||
HotSearch = 17,
|
||||
/** 离线用于生成缓存 */
|
||||
HotSearchPreload = 18,
|
||||
/** 输入框Sug */
|
||||
InputSug = 19,
|
||||
/** 新闻热点Push */
|
||||
NewsPush = 20,
|
||||
NewsPushPreload = 21,
|
||||
/** Onboarding建议问题触发的回答 */
|
||||
OnboardingSug = 22,
|
||||
OnboardingSugPreload = 23,
|
||||
/** web未登录用户输入问题 */
|
||||
WebNotLogin = 24,
|
||||
/** Onboarding welcomeback */
|
||||
BackOnboardingSug = 25,
|
||||
/** 通过LLM的能力生成卡片 */
|
||||
GenCard = 26,
|
||||
/** 高亮词 */
|
||||
HighLightMsg = 27,
|
||||
/** 高亮词强制搜索 */
|
||||
HighLightMsgSearch = 28,
|
||||
/** 划词提问场景(浏览器插件) */
|
||||
BrowserPluginSelectionQuestion = 29,
|
||||
/** youtube视频摘要(浏览器插件) */
|
||||
BrowserPluginYoutubeSummary = 30,
|
||||
/** 只调用Chain场景(浏览器插件) */
|
||||
BrowserPluginRawChain = 31,
|
||||
/** PDF理解(浏览器插件) */
|
||||
BrowserPluginPDFReader = 32,
|
||||
/** 图片理解(浏览器插件) */
|
||||
BrowserPluginImgReader = 33,
|
||||
/** 复杂搜索总结 */
|
||||
SearchSummary = 34,
|
||||
}
|
||||
|
||||
export enum MediaSearchType {
|
||||
Nothing = 0,
|
||||
DouYin = 1,
|
||||
TikTok = 2,
|
||||
}
|
||||
|
||||
export enum MessageScene {}
|
||||
|
||||
export enum MessageType {
|
||||
System = 1,
|
||||
User = 2,
|
||||
Assistant = 3,
|
||||
Placeholder = 4,
|
||||
Function = 5,
|
||||
}
|
||||
|
||||
export enum MetaType {
|
||||
/** 端侧直接替换 */
|
||||
Replaceable = 1,
|
||||
/** 插入引用 */
|
||||
Insertable = 2,
|
||||
/** 文档引用 */
|
||||
DocumentRef = 3,
|
||||
/** 知识库引用卡片 */
|
||||
KnowledgeCard = 4,
|
||||
/** 嵌入的多媒体信息,只是alice给端上用的,因为全链路复用这一个字段,所以在这儿改了 */
|
||||
EmbeddedMultimedia = 100,
|
||||
}
|
||||
|
||||
export enum ModelFamily {
|
||||
GPT = 1,
|
||||
Seed = 2,
|
||||
Claude = 3,
|
||||
MiniMax = 4,
|
||||
Plugin = 5,
|
||||
StableDiffusion = 6,
|
||||
ByteArtist = 7,
|
||||
Edu = 8,
|
||||
/** 方舟(火山引擎) */
|
||||
Maas = 9,
|
||||
/** 废弃:千帆(百度云) */
|
||||
QianFan = 10,
|
||||
/** gemini(google) */
|
||||
Gemini = 11,
|
||||
Moonshot = 12,
|
||||
/** 智谱 */
|
||||
GLM = 13,
|
||||
/** MaaS自动同步模型 */
|
||||
MaaSAutoSync = 14,
|
||||
QWen = 15,
|
||||
/** Command R/R+ */
|
||||
Cohere = 16,
|
||||
Baichuan = 17,
|
||||
/** 文心一言 */
|
||||
Ernie = 18,
|
||||
/** deep seek */
|
||||
DeekSeek = 19,
|
||||
Llama = 20,
|
||||
}
|
||||
|
||||
/** ** 业务自定义 Model ****** 命名规则 业务 + 功能
|
||||
每次 Scene 新增需要手动添加提交
|
||||
每次场景的新增备注说明使用的地方 */
|
||||
export enum ModelListScene {
|
||||
/** Prompt 评测平台 */
|
||||
PromptEvaluatePlatform = 1000,
|
||||
/** Flow 用户前台 */
|
||||
FlowApp = 2000,
|
||||
/** Flow OP 后台 */
|
||||
FlowOPAdmin = 3000,
|
||||
/** Flow 前台与后台的模型合集 */
|
||||
FlowAll = 3001,
|
||||
/** Bot 平台 Release版本 */
|
||||
BotPlatform = 4000,
|
||||
/** Bot 平台 Inhouse版本 */
|
||||
BotPlatformInhouse = 4001,
|
||||
/** Flow Workflow */
|
||||
Workflow = 5000,
|
||||
/** Arena */
|
||||
Arena = 6000,
|
||||
/** Arena Inhouse */
|
||||
ArenaInhouse = 6001,
|
||||
}
|
||||
|
||||
/** raw 模型列表 */
|
||||
export enum ModelName {
|
||||
GPT3dot5Turbo = 1,
|
||||
GPT4_32k = 2,
|
||||
GPT4 = 3,
|
||||
SeedBeta = 4,
|
||||
/** seed + browsing */
|
||||
SeedWebGPT = 5,
|
||||
/** seed strong character */
|
||||
SeedSystem = 6,
|
||||
SeedMusic = 7,
|
||||
GPT4_32k0613 = 8,
|
||||
Seed_Img2Text = 9,
|
||||
/** seed sc for test */
|
||||
Seed_SCTest = 10,
|
||||
/** seed or test */
|
||||
Seed_Test = 11,
|
||||
/** seed main + browsing + (Plugin 未放开) */
|
||||
Seed_WithPlugins = 12,
|
||||
GPT3dot5Turbo0613 = 13,
|
||||
GPT35_Turbo16k = 14,
|
||||
/** sota */
|
||||
SeedSota = 15,
|
||||
/** sota + browsing */
|
||||
SeedSotaBrowsing = 16,
|
||||
/** 三合一, 主模型 + plugin + browsing, 但plugin是固定的 */
|
||||
SeedOmni = 17,
|
||||
/** function call */
|
||||
SeedFunctionCall = 18,
|
||||
/** seed main + you are right */
|
||||
SeedMain = 19,
|
||||
/** 联网策略实验 */
|
||||
SeedBrowsingExperiment = 20,
|
||||
/** browsing单模型 */
|
||||
SeedBrowsingOnly = 21,
|
||||
/** MiniMax abab5.5-chat模型 */
|
||||
MiniMaxABAB5dot5Chat = 22,
|
||||
Echo = 23,
|
||||
GPT4_0613 = 24,
|
||||
/** seed + system prompt + memory */
|
||||
SeedSystemWithMemory = 25,
|
||||
/** seed + system prompt + momory test */
|
||||
SeedSystemWithMemoryTest = 26,
|
||||
/** seed map */
|
||||
SeedMap = 27,
|
||||
SeedSuggest = 28,
|
||||
SeedComplexInstruction = 29,
|
||||
SeedComplexInstructionTest = 30,
|
||||
Edu = 31,
|
||||
SeedSuggestOffline = 32,
|
||||
SeedOmniSota = 33,
|
||||
SeedStrongCharacterNearlinePortrait = 34,
|
||||
}
|
||||
|
||||
export enum ModelProxy {
|
||||
/** ModelId >= 100 */
|
||||
FuncBot = 1,
|
||||
/** Config in TCC: model_using_chain */
|
||||
Chain = 2,
|
||||
/** Define in copilot.chat_with_bot#aiAgentModels or ai_agent.Chat */
|
||||
Agent = 3,
|
||||
/** Other */
|
||||
Executor = 4,
|
||||
}
|
||||
|
||||
/** 兼容旧逻辑里的模型 status */
|
||||
export enum ModelStatus {
|
||||
InUse = 1,
|
||||
Pending = 5,
|
||||
Deleted = 10,
|
||||
}
|
||||
|
||||
export enum ModelType {
|
||||
GPT3dot5Turbo = 1,
|
||||
GPT4 = 2,
|
||||
Seed = 3,
|
||||
SeedMultiturn = 4,
|
||||
StableDiffusion = 5,
|
||||
ByteArtist = 6,
|
||||
Claude = 7,
|
||||
BingChat = 8,
|
||||
Bard = 9,
|
||||
Assistant = 10,
|
||||
DallE = 11,
|
||||
Midjourney = 12,
|
||||
TTSearch = 13,
|
||||
GPTTask = 14,
|
||||
GPT4Browsing = 15,
|
||||
GPT4WithPlugins = 16,
|
||||
GPT3dot5WithPlugins = 17,
|
||||
SeedSystem = 18,
|
||||
Plugin = 20,
|
||||
GPT4Plugin = 21,
|
||||
WebGPT = 22,
|
||||
GPT3dot5WithFunction = 23,
|
||||
AutoPlugin = 24,
|
||||
MiniMax = 25,
|
||||
GPT3dot5WithTako = 26,
|
||||
GPT4WithTako = 27,
|
||||
GPT4WithTakoTikTok = 28,
|
||||
GPT4WithTakoGoogle = 29,
|
||||
SeedBeta = 30,
|
||||
ByteArtistAnime = 31,
|
||||
GenMusic = 32,
|
||||
GPT48k = 33,
|
||||
SeedStrongCharacterForTest = 34,
|
||||
SeedForTest = 35,
|
||||
SeedOmniFake = 36,
|
||||
SeedOmniBrowse = 37,
|
||||
SeedOmniSota = 38,
|
||||
SeedOmniSotaBrowse = 39,
|
||||
SeedOmniBrowseWithCard = 40,
|
||||
CiciSearchMore = 41,
|
||||
CiciSearchLess = 42,
|
||||
CiciSearchBing = 43,
|
||||
SeedOmniPlugin = 44,
|
||||
CiciSearchBing_GPT35 = 45,
|
||||
GPT40613 = 46,
|
||||
SeedForMap = 47,
|
||||
SeedForMusic = 48,
|
||||
XiaoningWithMem = 49,
|
||||
/** 功能性bot的模型从100开始,旧版bot的模型在100以下 pangzhiqiang@bytedance.com */
|
||||
GPT_35Turbo = 100,
|
||||
GPT_35Turbo0301 = 101,
|
||||
GPT_4 = 102,
|
||||
GPT_40314 = 103,
|
||||
GPT_432k = 104,
|
||||
GPT_432k0314 = 105,
|
||||
/** seed 主模型 */
|
||||
Seed_Beta = 106,
|
||||
Seed_Music = 107,
|
||||
GPT4_32k0613 = 108,
|
||||
Seed_Img2Text = 109,
|
||||
/** seed主模型 + browsing */
|
||||
Seed_WebGPT = 110,
|
||||
/** seed主模型 + browsing + (plugin暂为开放) */
|
||||
Seed_WithPlugins = 111,
|
||||
GPT_35Turbo0613 = 112,
|
||||
GPT_35Turbo16K = 113,
|
||||
/** sota */
|
||||
Seed_Sota = 114,
|
||||
/** sota + browsing */
|
||||
Seed_Sota_Browsing = 115,
|
||||
/** strong character */
|
||||
Seed_WithSystem = 116,
|
||||
/** 三合一, 主模型 + plugin + browsing, 但plugin是固定的 */
|
||||
Seed_Omni = 118,
|
||||
/** seed function calling */
|
||||
SeedFunctionCall = 119,
|
||||
/** seed 主模型, 带"是的你说的对" */
|
||||
Seed_Main = 120,
|
||||
/** 联网策略实验 */
|
||||
SeedBrowsingExperiment = 121,
|
||||
/** browsing单模型 */
|
||||
SeedBrowsingOnly = 122,
|
||||
/** 虚假的 llm,function call 协议,一直调用第一个 function */
|
||||
Echo = 123,
|
||||
GPT_40613 = 124,
|
||||
/** for seed test */
|
||||
Seed_WithSystemForTest = 125,
|
||||
/** 地图 */
|
||||
Seed_Map = 126,
|
||||
SeedSuggest = 127,
|
||||
Seed_ComplexInstructionTest = 128,
|
||||
Seed_ComplexInstruction = 129,
|
||||
Edu = 130,
|
||||
Tako_Intent = 131,
|
||||
Seed_Text2Img = 132,
|
||||
GPT_4Preview_128k1106 = 133,
|
||||
SeedForDouyin = 134,
|
||||
SeedFunctionCallSp = 135,
|
||||
SeedSuggestOffline = 136,
|
||||
SkylarkChat = 137,
|
||||
SeedStrongCharacterNearlinePortrait = 138,
|
||||
/** 保障头条链路 */
|
||||
SkylarkPro_v1_1_TT = 1704353638,
|
||||
/** 保障头条链路(带联网插件) */
|
||||
SkylarkPro_v1_1_TT_BROWSING = 1704696164,
|
||||
/** 豆包 bot 分类模型 */
|
||||
SeedBotTag = 1705216686,
|
||||
/** 豆包语音链路优化模型 */
|
||||
SeedStrongCharacterAudio = 1705220979,
|
||||
}
|
||||
|
||||
export enum ModelVersion {
|
||||
UNK = 0,
|
||||
GPT3D5 = 1,
|
||||
GPT4 = 2,
|
||||
}
|
||||
|
||||
export enum ModuleType {
|
||||
Plugin = 1,
|
||||
Hook = 2,
|
||||
GptEngine = 3,
|
||||
Edu = 4,
|
||||
}
|
||||
|
||||
export enum MultiStreamScene {
|
||||
Unknown_MultiStreamScene = 0,
|
||||
CrowdTesting = 1,
|
||||
}
|
||||
|
||||
export enum MultiStreamStatus {
|
||||
Unknown_MultiStreamStatus = 0,
|
||||
Start = 1,
|
||||
End = 2,
|
||||
}
|
||||
|
||||
/** Onboarding组件类型 */
|
||||
export enum OnboardingComponentType {
|
||||
Prologue = 1,
|
||||
SuggestedQuestion = 2,
|
||||
}
|
||||
|
||||
/** onboarding结果的内容来源 */
|
||||
export enum OnboardingResultSource {
|
||||
/** LLM生成 */
|
||||
LLM_GEN = 1,
|
||||
/** LLM翻译自LLM生成内容 */
|
||||
LLM_GEN_THEN_TRANSLATE = 2,
|
||||
/** 人工指定 */
|
||||
MANUAL = 3,
|
||||
/** LLM翻译自人工指定 */
|
||||
MANUAL_THEN_TRANSLATE = 4,
|
||||
}
|
||||
|
||||
/** Onboarding场景 */
|
||||
export enum OnboardingSceneType {
|
||||
/** 新用户 */
|
||||
FIRST_MET = 1,
|
||||
/** 欢迎回来 */
|
||||
WELCOME_BACK = 2,
|
||||
}
|
||||
|
||||
/** onboarding内容生成模式 */
|
||||
export enum OnboardingSourceMode {
|
||||
/** 不需要 */
|
||||
NO_NEED = 1,
|
||||
/** 人工指定内容(多语言支持由LLM兜底) */
|
||||
USE_MANUAL = 2,
|
||||
/** 由LLM生成 */
|
||||
USE_LLM = 3,
|
||||
}
|
||||
|
||||
export enum OnboardingType {
|
||||
None = 0,
|
||||
/** 不展示开场白 */
|
||||
OnboardingNotDisplay = 1,
|
||||
/** 完全使用预设开场白 */
|
||||
OnboardingPreset = 2,
|
||||
/** 使用llm自动生成的开场白 */
|
||||
OnboardingLLMGen = 3,
|
||||
}
|
||||
|
||||
export enum PreGenType {
|
||||
PreGen_Query = 1,
|
||||
PreGen_PreQuery = 2,
|
||||
PreGen_Continue = 3,
|
||||
PreGen_End = 4,
|
||||
}
|
||||
|
||||
export enum PrintBehavior {
|
||||
Block = 0,
|
||||
Streaming = 1,
|
||||
Full = 2,
|
||||
}
|
||||
|
||||
export enum PromptTemplateFormat {
|
||||
FString = 1,
|
||||
Jinja2 = 2,
|
||||
}
|
||||
|
||||
export enum ReplyType {
|
||||
Answer = 1,
|
||||
Suggest = 2,
|
||||
LLMOutput = 3,
|
||||
ToolOutput = 4,
|
||||
DataSet = 5,
|
||||
QueryKeyword = 6,
|
||||
IntermediateOutput = 7,
|
||||
Verbose = 100,
|
||||
/** [copilot inner package protocol] A buffered packege in multi-agent messenger to maintain the upstream */
|
||||
PlaceHolder = 101,
|
||||
}
|
||||
|
||||
export enum ResultType {
|
||||
ResultType_Default = 0,
|
||||
ResultType_PluginResponse = 1,
|
||||
ResultType_PluginIntent = 2,
|
||||
ResultType_Variables = 3,
|
||||
ResultType_None = 4,
|
||||
ResultType_BotSchema = 5,
|
||||
ResultType_ReferenceVariable = 6,
|
||||
}
|
||||
|
||||
export enum ResumeScene {
|
||||
/** Compatible value */
|
||||
ResumeDefault = 0,
|
||||
/** 插件授权场景 */
|
||||
PluginAuthorized = 1,
|
||||
/** 异步插件 */
|
||||
PluginAsync = 2,
|
||||
/** 插件打断 */
|
||||
PluginInterrupt = 3,
|
||||
}
|
||||
|
||||
export enum SearchEngineType {
|
||||
Nothing = 0,
|
||||
Google = 1,
|
||||
DouYin = 2,
|
||||
TouTiao = 4,
|
||||
}
|
||||
|
||||
export enum SourceType {
|
||||
BotStudioSubmit = 1,
|
||||
BotStudioWorkflowTest = 2,
|
||||
Flow = 3,
|
||||
API = 4,
|
||||
Aweme = 5,
|
||||
}
|
||||
|
||||
export enum Stage {
|
||||
Plan = 0,
|
||||
AgentHook = 1,
|
||||
}
|
||||
|
||||
/** 回答附带建议问题 */
|
||||
export enum SuggestReplyMode {
|
||||
/** 使用默认Suggest Prompt生成建议回复 */
|
||||
WithDefaultPrompt = 0,
|
||||
/** 使用自定义Suggest Prompt生成建议回复 */
|
||||
WithCustomizedPrompt = 1,
|
||||
/** 不需要Suggest */
|
||||
Disable = 2,
|
||||
/** (Agent)使用源bot的配置 */
|
||||
UseOriginBotMode = 3,
|
||||
}
|
||||
|
||||
export enum ToolAuthType {
|
||||
/** 默认,调用插件时若无权限会报错 */
|
||||
Ask = 0,
|
||||
/** 仅本次允许 */
|
||||
Once = 1,
|
||||
/** 始终允许 */
|
||||
Always = 2,
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 FollowType {
|
||||
/** 无关系 */
|
||||
Unknown = 0,
|
||||
/** 关注 */
|
||||
Followee = 1,
|
||||
/** 粉丝 */
|
||||
Follower = 2,
|
||||
/** 互相关注 */
|
||||
MutualFollow = 3,
|
||||
}
|
||||
|
||||
export enum UserRole {
|
||||
Unknown = 0,
|
||||
/** 普通版 */
|
||||
Normal = 1,
|
||||
/** 专业版主账号 */
|
||||
ProfessionalRootUser = 2,
|
||||
/** 专业版子账号 */
|
||||
ProfessionalBasicAccount = 3,
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* 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 BenefitInfo {
|
||||
benefit_id?: string;
|
||||
benefit_type?: string;
|
||||
active_mode?: string;
|
||||
started_at?: Int64;
|
||||
ended_at?: Int64;
|
||||
duration?: number;
|
||||
limit?: Int64;
|
||||
status?: string;
|
||||
entity_type?: string;
|
||||
entity_id?: string;
|
||||
trigger_unit?: string;
|
||||
trigger_time?: Int64;
|
||||
}
|
||||
|
||||
export interface BillBusinessData {
|
||||
task_infos?: Array<BillTaskInfo>;
|
||||
total?: number;
|
||||
}
|
||||
|
||||
export interface BillTaskInfo {
|
||||
task_id?: string;
|
||||
status?: string;
|
||||
file_urls?: Array<string>;
|
||||
/** 过期时间,Unix 时间戳 */
|
||||
expires_at?: Int64;
|
||||
/** 创建时间,Unix 时间戳 */
|
||||
created_at?: Int64;
|
||||
/** 开始时间,Unix 时间戳 */
|
||||
started_at?: Int64;
|
||||
/** 结束时间,Unix 时间戳 */
|
||||
ended_at?: Int64;
|
||||
}
|
||||
|
||||
export interface CreateBenefitLimitationData {
|
||||
benefit_info?: BenefitInfo;
|
||||
}
|
||||
|
||||
export interface CreateBenefitLimitationRequest {
|
||||
entity_type?: string;
|
||||
entity_id?: string;
|
||||
benefit_info?: BenefitInfo;
|
||||
}
|
||||
|
||||
export interface CreateBenefitLimitationResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: CreateBenefitLimitationData;
|
||||
}
|
||||
|
||||
export interface CreateBillDownloadTaskRequest {
|
||||
/** 开始时间,时间戳 */
|
||||
started_at?: Int64;
|
||||
/** 结束时间,时间戳 */
|
||||
ended_at?: Int64;
|
||||
}
|
||||
|
||||
export interface CreateBillDownloadTaskResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: BillTaskInfo;
|
||||
}
|
||||
|
||||
export interface ListBenefitLimitationData {
|
||||
benefit_infos?: Array<BenefitInfo>;
|
||||
has_more?: boolean;
|
||||
page_token?: string;
|
||||
}
|
||||
|
||||
export interface ListBenefitLimitationRequest {
|
||||
entity_type?: string;
|
||||
entity_id?: string;
|
||||
benefit_type?: string;
|
||||
status?: string;
|
||||
page_token?: string;
|
||||
page_size?: number;
|
||||
}
|
||||
|
||||
export interface ListBenefitLimitationResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: ListBenefitLimitationData;
|
||||
}
|
||||
|
||||
export interface ListBillDownloadTaskRequest {
|
||||
task_ids?: Array<string>;
|
||||
page_num?: number;
|
||||
page_size?: number;
|
||||
}
|
||||
|
||||
export interface ListBillDownloadTaskResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: BillBusinessData;
|
||||
}
|
||||
|
||||
export interface UpdateBenefitLimitationRequest {
|
||||
benefit_id?: string;
|
||||
active_mode?: string;
|
||||
started_at?: Int64;
|
||||
ended_at?: Int64;
|
||||
duration?: number;
|
||||
limit?: Int64;
|
||||
status?: string;
|
||||
trigger_unit?: string;
|
||||
trigger_time?: Int64;
|
||||
}
|
||||
|
||||
export interface UpdateBenefitLimitationResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** 根据文档配置 error code 到 http code 转化。 */
|
||||
export enum ErrCode {
|
||||
CommonNoPermission = 788780101,
|
||||
CommonInvalidParam = 788780202,
|
||||
InvalidParamsError = 788784000,
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* 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 marketplace_common from './marketplace_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export enum BalanceType {
|
||||
Unknown = 0,
|
||||
LegalTender = 1,
|
||||
}
|
||||
|
||||
export enum TradeType {
|
||||
Unknown = 0,
|
||||
Purchase = 1,
|
||||
Refund = 2,
|
||||
ChargeBack = 3,
|
||||
}
|
||||
|
||||
export enum WalletHistoryDirection {
|
||||
Unknown = 0,
|
||||
Income = 1,
|
||||
Outcome = 2,
|
||||
}
|
||||
|
||||
export enum WalletHistoryType {
|
||||
Unknown = 0,
|
||||
Withdraw = 1,
|
||||
Template = 2,
|
||||
}
|
||||
|
||||
export interface PublicGetUserBalanceRequest {
|
||||
balance_type_list?: Array<BalanceType>;
|
||||
'Tt-Agw-Client-Ip'?: string;
|
||||
}
|
||||
|
||||
export interface PublicGetUserBalanceResponse {
|
||||
code?: number;
|
||||
message?: string;
|
||||
data?: UserBalanceData;
|
||||
}
|
||||
|
||||
export interface PublicGetUserProfitDetailRequest {
|
||||
'Tt-Agw-Client-Ip'?: string;
|
||||
}
|
||||
|
||||
export interface PublicGetUserProfitDetailResponse {
|
||||
code?: number;
|
||||
message?: string;
|
||||
data?: UserProfitData;
|
||||
}
|
||||
|
||||
export interface PublicGetUserWalletDetailRequest {
|
||||
balance_type?: BalanceType;
|
||||
'Tt-Agw-Client-Ip'?: string;
|
||||
}
|
||||
|
||||
export interface PublicGetUserWalletDetailResponse {
|
||||
code?: number;
|
||||
message?: string;
|
||||
data?: UserWalletDetailData;
|
||||
}
|
||||
|
||||
export interface PublicGetUserWalletHistoryRequest {
|
||||
/** 第一次不用传 */
|
||||
index?: string;
|
||||
/** 每页数量 */
|
||||
count?: Int64;
|
||||
/** 类型列表 */
|
||||
type_list?: Array<WalletHistoryType>;
|
||||
}
|
||||
|
||||
export interface PublicGetUserWalletHistoryResponse {
|
||||
code?: number;
|
||||
message?: string;
|
||||
data?: UserWalletHistoryData;
|
||||
}
|
||||
|
||||
export interface UserBalanceData {
|
||||
balance_map?: Partial<Record<BalanceType, Int64>>;
|
||||
}
|
||||
|
||||
export interface UserProfitData {
|
||||
today_predict_profit?: string;
|
||||
total_profit?: string;
|
||||
}
|
||||
|
||||
export interface UserWalletDetailData {
|
||||
/** 当前提现余额,单位:分 */
|
||||
current_balance?: string;
|
||||
/** 累计结算总额,单位:分 */
|
||||
total_settled_amount?: string;
|
||||
}
|
||||
|
||||
export interface UserWalletHistoryData {
|
||||
history_list?: Array<UserWalletHistoryItem>;
|
||||
/** 是否还有下一页 */
|
||||
has_more?: boolean;
|
||||
/** 下次请求的分页 index */
|
||||
next_index?: string;
|
||||
}
|
||||
|
||||
export interface UserWalletHistoryItem {
|
||||
id?: string;
|
||||
name?: string;
|
||||
desc?: string;
|
||||
icon_url?: string;
|
||||
type?: WalletHistoryType;
|
||||
direction?: WalletHistoryDirection;
|
||||
amount?: string;
|
||||
/** 单位:秒 */
|
||||
timestamp?: string;
|
||||
/** 只有收入有该字段,该笔收入来源的类型 */
|
||||
income_from_user_role?: marketplace_common.UserRole;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,304 @@
|
||||
/*
|
||||
* 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 bot_common from './namespaces/bot_common';
|
||||
import * as bot_connector from './namespaces/bot_connector';
|
||||
|
||||
export { base, bot_common, bot_connector };
|
||||
export * from './namespaces/base';
|
||||
export * from './namespaces/bot_common';
|
||||
export * from './namespaces/bot_connector';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export default class BotConnectorService<T> {
|
||||
private request: any = () => {
|
||||
throw new Error('BotConnectorService.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);
|
||||
}
|
||||
|
||||
/** GET /v3/chat/retrieve */
|
||||
RetrieveChatOpen(
|
||||
req: bot_connector.RetrieveChatOpenRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.RetrieveChatOpenResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v3/chat/retrieve');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
conversation_id: _req['conversation_id'],
|
||||
chat_id: _req['chat_id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /v1/conversation/message/retrieve
|
||||
*
|
||||
* 查询单条消息详情
|
||||
*/
|
||||
RetrieveMessageApi(
|
||||
req: bot_connector.RetrieveMessageApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.RetrieveMessageApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/conversation/message/retrieve');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
conversation_id: _req['conversation_id'],
|
||||
message_id: _req['message_id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /v1/conversation/message/create
|
||||
*
|
||||
* 创建单条消息
|
||||
*/
|
||||
CreateMessageApi(
|
||||
req: bot_connector.CreateMessageApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.CreateMessageApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/conversation/message/create');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
role: _req['role'],
|
||||
content: _req['content'],
|
||||
meta_data: _req['meta_data'],
|
||||
content_type: _req['content_type'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
const params = { conversation_id: _req['conversation_id'] };
|
||||
return this.request({ url, method, data, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /v1/conversation/message/modify
|
||||
*
|
||||
* 修改单条消息
|
||||
*/
|
||||
ModifyMessageApi(
|
||||
req: bot_connector.ModifyMessageApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.ModifyMessageApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/conversation/message/modify');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
meta_data: _req['meta_data'],
|
||||
content: _req['content'],
|
||||
content_type: _req['content_type'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
const params = {
|
||||
conversation_id: _req['conversation_id'],
|
||||
message_id: _req['message_id'],
|
||||
};
|
||||
return this.request({ url, method, data, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /v1/conversation/retrieve
|
||||
*
|
||||
* 查询会话详情
|
||||
*/
|
||||
RetrieveConversationApi(
|
||||
req: bot_connector.RetrieveConversationApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.RetrieveConversationApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/conversation/retrieve');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
conversation_id: _req['conversation_id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /v3/chat/message/list
|
||||
*
|
||||
* 查询单次运行的消息列表
|
||||
*/
|
||||
ListChatMessageApi(
|
||||
req: bot_connector.ListChatMessageApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.ListChatMessageApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v3/chat/message/list');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
conversation_id: _req['conversation_id'],
|
||||
chat_id: _req['chat_id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /v1/conversation/create
|
||||
*
|
||||
* 能力开放接口
|
||||
*
|
||||
* 创建会话
|
||||
*/
|
||||
CreateConversationApi(
|
||||
req?: bot_connector.CreateConversationApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.CreateConversationApiResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/v1/conversation/create');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
meta_data: _req['meta_data'],
|
||||
messages: _req['messages'],
|
||||
bot_id: _req['bot_id'],
|
||||
connector_id: _req['connector_id'],
|
||||
app_id: _req['app_id'],
|
||||
conversation_name: _req['conversation_name'],
|
||||
get_or_create: _req['get_or_create'],
|
||||
draft_mode: _req['draft_mode'],
|
||||
workflow_id: _req['workflow_id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /v1/conversation/message/list
|
||||
*
|
||||
* 查询消息列表
|
||||
*/
|
||||
ListMessageApi(
|
||||
req: bot_connector.ListMessageApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.ListMessageApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/conversation/message/list');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
limit: _req['limit'],
|
||||
order: _req['order'],
|
||||
chat_id: _req['chat_id'],
|
||||
before_id: _req['before_id'],
|
||||
after_id: _req['after_id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
const params = { conversation_id: _req['conversation_id'] };
|
||||
return this.request({ url, method, data, params }, options);
|
||||
}
|
||||
|
||||
/** POST /v3/chat/cancel */
|
||||
CancelChatApi(
|
||||
req: bot_connector.CancelChatApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.CancelChatApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v3/chat/cancel');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
chat_id: _req['chat_id'],
|
||||
conversation_id: _req['conversation_id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /v1/conversation/message/delete */
|
||||
DeleteMessageApi(
|
||||
req: bot_connector.DeleteMessageApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.DeleteMessageApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/conversation/message/delete');
|
||||
const method = 'POST';
|
||||
const data = { Base: _req['Base'] };
|
||||
const params = {
|
||||
message_id: _req['message_id'],
|
||||
conversation_id: _req['conversation_id'],
|
||||
};
|
||||
return this.request({ url, method, data, params }, options);
|
||||
}
|
||||
|
||||
/** POST /v1/conversations/:conversation_id/clear */
|
||||
ClearConversationApi(
|
||||
req: bot_connector.ClearConversationApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.ClearConversationApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL(
|
||||
`/v1/conversations/${_req['conversation_id']}/clear`,
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = { Base: _req['Base'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** GET /v1/conversations */
|
||||
ListConversationsApi(
|
||||
req: bot_connector.ListConversationsApiRequest,
|
||||
options?: T,
|
||||
): Promise<bot_connector.ListConversationsApiResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/conversations');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
page_num: _req['page_num'],
|
||||
page_size: _req['page_size'],
|
||||
sort_order: _req['sort_order'],
|
||||
sort_field: _req['sort_field'],
|
||||
bot_id: _req['bot_id'],
|
||||
connector_id: _req['connector_id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -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 {
|
||||
LogID?: string;
|
||||
Caller?: string;
|
||||
Addr?: string;
|
||||
Client?: string;
|
||||
TrafficEnv?: TrafficEnv;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface BaseResp {
|
||||
StatusMessage?: string;
|
||||
StatusCode?: number;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface TrafficEnv {
|
||||
Open?: boolean;
|
||||
Env?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,703 @@
|
||||
/*
|
||||
* 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 AgentType {
|
||||
Start_Agent = 0,
|
||||
LLM_Agent = 1,
|
||||
Task_Agent = 2,
|
||||
Global_Agent = 3,
|
||||
Bot_Agent = 4,
|
||||
}
|
||||
|
||||
/** 版本兼容:0-旧版本 1-可回退的新版本 2-不可回退的新版本 3-可回退的新版本(不再提示) */
|
||||
export enum AgentVersionCompat {
|
||||
OldVersion = 0,
|
||||
MiddleVersion = 1,
|
||||
NewVersion = 2,
|
||||
MiddleVersionNotPrompt = 3,
|
||||
}
|
||||
|
||||
/** AnswerActions */
|
||||
export enum AnswerActionsMode {
|
||||
Default = 1,
|
||||
Customize = 2,
|
||||
}
|
||||
|
||||
export enum AnswerActionTriggerType {
|
||||
/** 平台预设Trigger action */
|
||||
Direct = 1,
|
||||
/** 点击Action 显示自定义的H5页面 */
|
||||
WebView = 2,
|
||||
/** 点击Action 发送自定义的用户消息 */
|
||||
SendMessage = 3,
|
||||
}
|
||||
|
||||
export enum BacktrackMode {
|
||||
Current = 1,
|
||||
Previous = 2,
|
||||
Start = 3,
|
||||
MostSuitable = 4,
|
||||
}
|
||||
|
||||
export enum BotMode {
|
||||
SingleMode = 0,
|
||||
MultiMode = 1,
|
||||
WorkflowMode = 2,
|
||||
}
|
||||
|
||||
export enum BotSpecies {
|
||||
/** bot种类
|
||||
从flow创建 */
|
||||
Default = 0,
|
||||
/** 从coze创建 */
|
||||
Function = 1,
|
||||
}
|
||||
|
||||
export enum BotStatus {
|
||||
Deleted = 0,
|
||||
Using = 1,
|
||||
Banned = 2,
|
||||
}
|
||||
|
||||
export enum BotTableRWMode {
|
||||
LimitedReadWrite = 1,
|
||||
ReadOnly = 2,
|
||||
UnlimitedReadWrite = 3,
|
||||
RWModeMax = 4,
|
||||
}
|
||||
|
||||
export enum BusinessType {
|
||||
Default = 0,
|
||||
DouyinAvatar = 1,
|
||||
}
|
||||
|
||||
export enum CacheType {
|
||||
/** 缓存关闭 */
|
||||
CacheClosed = 0,
|
||||
/** 前缀缓存 */
|
||||
PrefixCache = 1,
|
||||
}
|
||||
|
||||
/** 上下文允许传输的类型 */
|
||||
export enum ContextMode {
|
||||
Chat = 0,
|
||||
FunctionCall_1 = 1,
|
||||
FunctionCall_2 = 2,
|
||||
FunctionCall_3 = 3,
|
||||
}
|
||||
|
||||
export enum DefaultUserInputType {
|
||||
/** 没设置 */
|
||||
NotSet = 0,
|
||||
/** 文字 */
|
||||
Text = 1,
|
||||
/** 按住语音 */
|
||||
Voice = 2,
|
||||
/** 语音通话 */
|
||||
Call = 3,
|
||||
/** 视频通话 */
|
||||
VideoCall = 4,
|
||||
}
|
||||
|
||||
export enum DisablePromptCalling {
|
||||
Off = 0,
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum FieldItemType {
|
||||
/** 文本 String */
|
||||
Text = 1,
|
||||
/** 数字 Integer */
|
||||
Number = 2,
|
||||
/** 时间 Time */
|
||||
Date = 3,
|
||||
/** float Number */
|
||||
Float = 4,
|
||||
/** bool Boolean */
|
||||
Boolean = 5,
|
||||
}
|
||||
|
||||
export enum FileboxInfoMode {
|
||||
Off = 0,
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum IndependentRecognitionModelType {
|
||||
/** 小模型 */
|
||||
SLM = 0,
|
||||
/** 大模型 */
|
||||
LLM = 1,
|
||||
}
|
||||
|
||||
export enum IndependentTiming {
|
||||
/** 判断用户输入(前置) */
|
||||
Pre = 1,
|
||||
/** 判断节点输出(后置) */
|
||||
Post = 2,
|
||||
/** 前置模式和后置模式支持同时选择 */
|
||||
PreAndPost = 3,
|
||||
}
|
||||
|
||||
export enum KnowledgeNoRecallReplyMode {
|
||||
Default = 0,
|
||||
CustomizePrompt = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeShowSourceMode {
|
||||
ReplyBottom = 0,
|
||||
CardList = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeType {
|
||||
Coze = 0,
|
||||
Volcano = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeTypeMode {
|
||||
Coze = 0,
|
||||
Volcano = 1,
|
||||
}
|
||||
|
||||
export enum MessageFeedbackDetailType {
|
||||
UnlikeDefault = 0,
|
||||
/** 有害信息 */
|
||||
UnlikeHarmful = 1,
|
||||
/** 信息有误 */
|
||||
UnlikeIncorrect = 2,
|
||||
/** 未遵循指令 */
|
||||
UnlikeNotFollowInstructions = 3,
|
||||
/** 其他 */
|
||||
UnlikeOthers = 4,
|
||||
}
|
||||
|
||||
export enum MessageFeedbackType {
|
||||
Default = 0,
|
||||
Like = 1,
|
||||
Unlike = 2,
|
||||
}
|
||||
|
||||
export enum ModelFuncConfigStatus {
|
||||
FullSupport = 0,
|
||||
PoorSupport = 1,
|
||||
NotSupport = 2,
|
||||
}
|
||||
|
||||
export enum ModelFuncConfigType {
|
||||
Plugin = 1,
|
||||
Workflow = 2,
|
||||
ImageFlow = 3,
|
||||
Trigger = 4,
|
||||
KnowledgeText = 5,
|
||||
KnowledgeTable = 6,
|
||||
KnowledgeAutoCall = 7,
|
||||
KnowledgeOnDemandCall = 8,
|
||||
Variable = 9,
|
||||
Database = 10,
|
||||
LongTermMemory = 11,
|
||||
FileBox = 12,
|
||||
Onboarding = 13,
|
||||
Suggestion = 14,
|
||||
ShortcutCommand = 15,
|
||||
BackGroundImage = 16,
|
||||
TTS = 17,
|
||||
MultiAgentRecognize = 18,
|
||||
KnowledgePhoto = 19,
|
||||
HookInfo = 20,
|
||||
KnowledgeValcanoUnstructured = 21,
|
||||
KnowledgeValcanoStructured = 22,
|
||||
Model = 23,
|
||||
}
|
||||
|
||||
export enum ModelResponseFormat {
|
||||
Text = 0,
|
||||
Markdown = 1,
|
||||
JSON = 2,
|
||||
}
|
||||
|
||||
export enum ModelStyle {
|
||||
Custom = 0,
|
||||
Creative = 1,
|
||||
Balance = 2,
|
||||
Precise = 3,
|
||||
}
|
||||
|
||||
export enum MultiAgentConnectorType {
|
||||
Curve = 0,
|
||||
Straight = 1,
|
||||
}
|
||||
|
||||
export enum MultiAgentSessionType {
|
||||
Flow = 1,
|
||||
Host = 2,
|
||||
}
|
||||
|
||||
/** onboarding内容生成模式 */
|
||||
export enum OnboardingMode {
|
||||
/** 不需要 */
|
||||
NO_NEED = 1,
|
||||
/** 人工指定内容(多语言支持由LLM兜底) */
|
||||
USE_MANUAL = 2,
|
||||
/** 由LLM生成 */
|
||||
USE_LLM = 3,
|
||||
}
|
||||
|
||||
export enum PromptMode {
|
||||
Standard = 0,
|
||||
/** 前缀提示词 */
|
||||
PrefixPrompt = 1,
|
||||
}
|
||||
|
||||
export enum RecognitionMode {
|
||||
FunctionCall = 1,
|
||||
Independent = 2,
|
||||
}
|
||||
|
||||
export enum ReferenceInfoStatus {
|
||||
/** 1:有可用更新 */
|
||||
HasUpdates = 1,
|
||||
/** 2:被删除 */
|
||||
IsDelete = 2,
|
||||
}
|
||||
|
||||
/** struct ContentAttachment {
|
||||
1: required string FileID (api.body = "file_id")
|
||||
}
|
||||
struct MetaContent{
|
||||
1: required string Type (agw.key="type"),
|
||||
2: optional string Text ( agw.key="text"),
|
||||
3: optional string FileID (agw.key="file_id"),
|
||||
4: optional string FileURL (agw.key="file_url"),
|
||||
5: optional string Card (agw.key="card"),
|
||||
}
|
||||
struct EnterMessage {
|
||||
1: required string Role (agw.key = "role")
|
||||
2: string Content(agw.key = "content") // 内容
|
||||
3: map<string,string> MetaData(agw.key = "meta_data")
|
||||
4: string ContentType(agw.key = "content_type")//text/card/object_string
|
||||
5: string Type(agw.key = "type")
|
||||
}
|
||||
struct OpenMessageApi {
|
||||
1: string Id(agw.key = "id") // 主键ID
|
||||
2: string BotId(agw.key = "bot_id") // bot id //已TODO 所有的i64加注解str,入参和出参都要
|
||||
3: string Role(agw.key = "role")
|
||||
4: string Content(agw.key = "content") // 内容
|
||||
5: string ConversationId(agw.key = "conversation_id") // conversation id
|
||||
6: map<string,string> MetaData(agw.key = "meta_data")
|
||||
7: string CreatedAt(agw.key = "created_at") // 创建时间
|
||||
8: string UpdatedAt(agw.key = "updated_at") // 更新时间 //已TODO 时间改成int
|
||||
9: string ChatId(agw.key = "chat_id")
|
||||
10: string ContentType(agw.key = "content_type")
|
||||
11: string Type(agw.key = "type")
|
||||
} */
|
||||
export enum ReferenceUpdateType {
|
||||
ManualUpdate = 1,
|
||||
AutoUpdate = 2,
|
||||
}
|
||||
|
||||
export enum Scene {
|
||||
Default = 0,
|
||||
Explore = 1,
|
||||
BotStore = 2,
|
||||
CozeHome = 3,
|
||||
Playground = 4,
|
||||
/** 评测平台 */
|
||||
Evaluation = 5,
|
||||
AgentAPP = 6,
|
||||
/** prompt优化 */
|
||||
PromptOptimize = 7,
|
||||
/** createbot的nl2bot功能 */
|
||||
GenerateAgentInfo = 8,
|
||||
}
|
||||
|
||||
export enum SearchStrategy {
|
||||
/** 语义搜索 */
|
||||
SemanticSearch = 0,
|
||||
/** 混合搜索 */
|
||||
HybirdSearch = 1,
|
||||
/** 全文搜索 */
|
||||
FullTextSearch = 20,
|
||||
}
|
||||
|
||||
export enum SocietyVisibility {
|
||||
/** 对所有人可见 */
|
||||
Public = 1,
|
||||
/** 仅对host可见 */
|
||||
Anonymous = 2,
|
||||
/** 自定义 */
|
||||
Custom = 3,
|
||||
}
|
||||
|
||||
export enum SuggestedQuestionsShowMode {
|
||||
Random = 0,
|
||||
All = 1,
|
||||
}
|
||||
|
||||
export enum SuggestReplyMode {
|
||||
System = 0,
|
||||
Custom = 1,
|
||||
Disable = 2,
|
||||
/** agent专用,复用源Bot配置 */
|
||||
OriBot = 3,
|
||||
}
|
||||
|
||||
export enum TimeCapsuleMode {
|
||||
/** 关 */
|
||||
Off = 0,
|
||||
/** 开 */
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum WorkflowMode {
|
||||
Workflow = 0,
|
||||
Imageflow = 1,
|
||||
SceneFlow = 2,
|
||||
ChatFlow = 3,
|
||||
All = 100,
|
||||
}
|
||||
|
||||
export interface ActionIcon {
|
||||
/** 自定义的按钮 type 不用传 */
|
||||
type?: string;
|
||||
/** 默认状态 */
|
||||
default_url?: string;
|
||||
/** 按下按钮的状态 */
|
||||
active_url?: string;
|
||||
/** 默认状态 */
|
||||
default_uri?: string;
|
||||
/** 按下按钮的状态 */
|
||||
active_uri?: string;
|
||||
}
|
||||
|
||||
export interface AnswerActionConfig {
|
||||
/** 预制的只需要传key */
|
||||
key?: string;
|
||||
/** 默认 */
|
||||
name?: string;
|
||||
/** 下发uri */
|
||||
icon?: ActionIcon;
|
||||
/** 存储用户i18的name */
|
||||
name_i18n?: Record<string, string>;
|
||||
/** Direct 没有值; WebView 包含 webview_url和 webview_callback_psm两个key;SendMessage 包含send_message_prompt */
|
||||
trigger_rule?: AnswerActionTriggerRule;
|
||||
/** 位置 */
|
||||
position?: number;
|
||||
}
|
||||
|
||||
export interface AnswerActions {
|
||||
answer_actions_mode?: AnswerActionsMode;
|
||||
answer_action_configs?: Array<AnswerActionConfig>;
|
||||
}
|
||||
|
||||
export interface AnswerActionTriggerRule {
|
||||
type?: AnswerActionTriggerType;
|
||||
need_preloading?: boolean;
|
||||
/** 根据 AnswerActionTriggerType决定 */
|
||||
trigger_data?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface BackgroundImageDetail {
|
||||
/** 原始图片 */
|
||||
origin_image_uri?: string;
|
||||
origin_image_url?: string;
|
||||
/** 实际使用图片 */
|
||||
image_uri?: string;
|
||||
image_url?: string;
|
||||
theme_color?: string;
|
||||
/** 渐变位置 */
|
||||
gradient_position?: GradientPosition;
|
||||
/** 裁剪画布位置 */
|
||||
canvas_position?: CanvasPosition;
|
||||
}
|
||||
|
||||
export interface BackgroundImageInfo {
|
||||
/** web端背景图 */
|
||||
web_background_image?: BackgroundImageDetail;
|
||||
/** 移动端背景图 */
|
||||
mobile_background_image?: BackgroundImageDetail;
|
||||
}
|
||||
|
||||
/** bot ext */
|
||||
export interface BotExtInfo {
|
||||
answer_actions?: AnswerActions;
|
||||
card_ids?: Array<number>;
|
||||
prompt_id?: number;
|
||||
bot_template_name?: string;
|
||||
use_ugc_voice?: boolean;
|
||||
app_id?: number;
|
||||
/** 是否绑定小程序标识 */
|
||||
binding_mp?: boolean;
|
||||
}
|
||||
|
||||
export interface CanvasPosition {
|
||||
width?: number;
|
||||
height?: number;
|
||||
left?: number;
|
||||
top?: number;
|
||||
}
|
||||
|
||||
export interface ChatV3ChatDetail {
|
||||
id: string;
|
||||
conversation_id: string;
|
||||
bot_id: string;
|
||||
created_at?: number;
|
||||
completed_at?: number;
|
||||
failed_at?: number;
|
||||
meta_data?: Record<string, string>;
|
||||
last_error?: LastError;
|
||||
status: string;
|
||||
usage?: Usage;
|
||||
required_action?: RequiredAction;
|
||||
section_id?: string;
|
||||
}
|
||||
|
||||
export interface ChatV3MessageDetail {
|
||||
id: string;
|
||||
conversation_id: string;
|
||||
bot_id: string;
|
||||
role: string;
|
||||
type: string;
|
||||
content: string;
|
||||
content_type: string;
|
||||
meta_data?: Record<string, string>;
|
||||
chat_id: string;
|
||||
section_id?: string;
|
||||
created_at?: Int64;
|
||||
updated_at?: Int64;
|
||||
reasoning_content?: string;
|
||||
}
|
||||
|
||||
export interface CompletionUsage {
|
||||
reasoning_tokens?: number;
|
||||
}
|
||||
|
||||
export interface GradientPosition {
|
||||
left?: number;
|
||||
right?: number;
|
||||
}
|
||||
|
||||
export interface InterruptFunction {
|
||||
name?: string;
|
||||
arguments?: string;
|
||||
}
|
||||
|
||||
export interface InterruptPlugin {
|
||||
id?: string;
|
||||
type?: string;
|
||||
function?: InterruptFunction;
|
||||
require_info?: InterruptRequireInfo;
|
||||
}
|
||||
|
||||
export interface InterruptRequireInfo {
|
||||
infos?: Array<string>;
|
||||
}
|
||||
|
||||
export interface LastError {
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
export interface MessageFeedback {
|
||||
/** 反馈类型 */
|
||||
feedback_type?: MessageFeedbackType;
|
||||
/** 细分类型 */
|
||||
detail_types?: Array<MessageFeedbackDetailType>;
|
||||
/** 负反馈自定义内容,对应用户选择Others */
|
||||
detail_content?: string;
|
||||
}
|
||||
|
||||
export interface ModelInfo {
|
||||
/** 模型id */
|
||||
model_id?: string;
|
||||
/** 温度,模型输出随机性,值越大越随机,越小越保守(0-1] */
|
||||
temperature?: number;
|
||||
/** 回复最大Token数 */
|
||||
max_tokens?: number;
|
||||
/** 另一种模型的输出随机性,值越大越随机[0,1] */
|
||||
top_p?: number;
|
||||
/** 频率惩罚,调整生成内容中的单词频率,正值单词越少见[-1.0,1.0] */
|
||||
frequency_penalty?: number;
|
||||
/** 存在惩罚,调整生成内容中新词语频率,正值避免重复单词,用新词[-1.0,1.0] */
|
||||
presence_penalty?: number;
|
||||
/** 上下文策略 */
|
||||
short_memory_policy?: ShortMemoryPolicy;
|
||||
/** 生成时,采样候选集的大小 */
|
||||
top_k?: number;
|
||||
/** 模型回复内容格式 */
|
||||
response_format?: ModelResponseFormat;
|
||||
/** 用户选择的模型风格 */
|
||||
model_style?: ModelStyle;
|
||||
/** 缓存配置 */
|
||||
cache_type?: CacheType;
|
||||
/** sp拼接当前时间 */
|
||||
sp_current_time?: boolean;
|
||||
/** sp拼接防泄露指令 */
|
||||
sp_anti_leak?: boolean;
|
||||
/** sp拼接声纹信息 */
|
||||
sp_voice_info?: boolean;
|
||||
/** 个性化配置参数 */
|
||||
parameters?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface OnboardingInfo {
|
||||
/** 对应 Coze Opening Dialog
|
||||
开场白 */
|
||||
prologue?: string;
|
||||
/** 建议问题 */
|
||||
suggested_questions?: Array<string>;
|
||||
/** 开场白模型 */
|
||||
onboarding_mode?: OnboardingMode;
|
||||
/** LLM生成,用户自定义 Prompt */
|
||||
customized_onboarding_prompt?: string;
|
||||
/** 开场白预设问题展示方式 默认0 随机展示 */
|
||||
suggested_questions_show_mode?: SuggestedQuestionsShowMode;
|
||||
}
|
||||
|
||||
export interface PluginInfo {
|
||||
/** 插件id */
|
||||
plugin_id?: string;
|
||||
/** api Id */
|
||||
api_id?: string;
|
||||
/** api name O项目用 */
|
||||
api_name?: string;
|
||||
}
|
||||
|
||||
export interface PluginParameter {
|
||||
name?: string;
|
||||
desc?: string;
|
||||
required?: boolean;
|
||||
type?: string;
|
||||
sub_parameters?: Array<PluginParameter>;
|
||||
/** 如果Type是数组,则有subtype */
|
||||
sub_type?: string;
|
||||
}
|
||||
|
||||
export interface PrefixPromptInfo {
|
||||
/** 前缀提示词 */
|
||||
prefix_prompt?: string;
|
||||
/** 不支持前缀提示词部分 */
|
||||
dynamic_prompt?: string;
|
||||
}
|
||||
|
||||
export interface PromptInfo {
|
||||
/** 文本prompt */
|
||||
prompt?: string;
|
||||
/** 提示词模式 */
|
||||
prompt_mode?: PromptMode;
|
||||
/** 前缀提示词模式下的prompt内容 */
|
||||
prefix_prompt_info?: PrefixPromptInfo;
|
||||
}
|
||||
|
||||
export interface PromptUsage {
|
||||
cached_tokens?: number;
|
||||
}
|
||||
|
||||
export interface RequiredAction {
|
||||
type?: string;
|
||||
submit_tool_outputs?: SubmitToolOutputs;
|
||||
}
|
||||
|
||||
export interface ShortMemoryPolicy {
|
||||
/** 上下文允许传输的类型 */
|
||||
context_mode?: ContextMode;
|
||||
/** 上下文带的轮数 */
|
||||
history_round?: number;
|
||||
}
|
||||
|
||||
export interface SubmitToolOutputs {
|
||||
tool_calls?: Array<InterruptPlugin>;
|
||||
}
|
||||
|
||||
/** suggest */
|
||||
export interface SuggestReplyInfo {
|
||||
/** 对应 Coze Auto-Suggestion
|
||||
建议问题模型 */
|
||||
suggest_reply_mode?: SuggestReplyMode;
|
||||
/** 用户自定义建议问题 */
|
||||
customized_suggest_prompt?: string;
|
||||
/** 运行Prompt的ChainTask名称 */
|
||||
chain_task_name?: string;
|
||||
}
|
||||
|
||||
export interface Usage {
|
||||
token_count?: number;
|
||||
output_count?: number;
|
||||
input_count?: number;
|
||||
input_tokens_details?: PromptUsage;
|
||||
output_tokens_details?: CompletionUsage;
|
||||
}
|
||||
|
||||
export interface VideoCallConfig {
|
||||
/** 是否关闭 */
|
||||
video_call?: boolean;
|
||||
/** 每秒抽取帧数(范围1~24) */
|
||||
frames_per_second?: number;
|
||||
/** 开始说话前抽取秒数(范围0~10s) */
|
||||
pre_speech_seconds?: number;
|
||||
}
|
||||
|
||||
export interface VoiceprintRecognitionConfig {
|
||||
/** 是否关闭声纹识别 */
|
||||
close_voice_print_recognition?: boolean;
|
||||
/** 命中阈值 */
|
||||
hit_threshold?: number;
|
||||
/** 空值时是否沿用历史开关 */
|
||||
use_history_if_empty?: boolean;
|
||||
}
|
||||
|
||||
/** tts Voices */
|
||||
export interface VoicesInfo {
|
||||
/** 对应 Coze Voices
|
||||
是否开启声音 true:禁用 false:开启 */
|
||||
muted?: boolean;
|
||||
/** 多语音音色配置 */
|
||||
i18n_lang_voice?: Record<string, Int64>;
|
||||
/** 是否自动播放 */
|
||||
autoplay?: boolean;
|
||||
/** 自动播放的音色 */
|
||||
autoplay_voice?: Record<string, Int64>;
|
||||
/** 是否关闭语音通话,true:关闭 false:开启 默认为false */
|
||||
voice_call?: boolean;
|
||||
/** 默认用户输入类型 */
|
||||
default_user_input_type?: DefaultUserInputType;
|
||||
/** 多语音音色配置, string类型 */
|
||||
i18n_lang_voice_str?: Record<string, string>;
|
||||
video_call_config?: VideoCallConfig;
|
||||
voiceprint_recognition_config?: VoiceprintRecognitionConfig;
|
||||
}
|
||||
|
||||
export interface WorkflowInfo {
|
||||
/** WorkflowId */
|
||||
workflow_id?: string;
|
||||
/** 插件id */
|
||||
plugin_id?: string;
|
||||
/** api Id */
|
||||
api_id?: string;
|
||||
/** workflow or imageflow, 默认为workflow */
|
||||
flow_mode?: WorkflowMode;
|
||||
/** workflow name */
|
||||
workflow_name?: string;
|
||||
desc?: string;
|
||||
parameters?: Array<PluginParameter>;
|
||||
plugin_icon?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,530 @@
|
||||
/*
|
||||
* 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';
|
||||
import * as bot_common from './bot_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
/** ===================================消息接口开始===================================== */
|
||||
export enum ChatMode {
|
||||
Normal = 0,
|
||||
Group = 1,
|
||||
}
|
||||
|
||||
/** 上下文允许传输的类型 */
|
||||
export enum ContextMode {
|
||||
Chat = 0,
|
||||
FunctionCall_1 = 1,
|
||||
FunctionCall_2 = 2,
|
||||
FunctionCall_3 = 3,
|
||||
}
|
||||
|
||||
export enum FileType {
|
||||
file = 1,
|
||||
image = 2,
|
||||
}
|
||||
|
||||
export enum LoadDirection {
|
||||
Unknown = 0,
|
||||
Prev = 1,
|
||||
Next = 2,
|
||||
}
|
||||
|
||||
export enum MessageSource {
|
||||
/** 普通聊天消息 */
|
||||
Chat = 0,
|
||||
/** 定时任务 */
|
||||
TaskManualTrigger = 1,
|
||||
/** 通知 */
|
||||
Notice = 2,
|
||||
/** 异步结果 */
|
||||
AsyncResult = 3,
|
||||
}
|
||||
|
||||
export enum MetaType {
|
||||
/** Compatible value */
|
||||
Default_0 = 0,
|
||||
/** 端侧直接替换 */
|
||||
Replaceable = 1,
|
||||
/** 插入引用 */
|
||||
Insertable = 2,
|
||||
/** 文档引用 */
|
||||
DocumentRef = 3,
|
||||
/** 知识库引用卡片 本次新增 */
|
||||
KnowledgeCard = 4,
|
||||
/** 嵌入的多媒体信息,只是alice给端上用的,因为全链路复用这一个字段,所以在这儿改了 */
|
||||
EmbeddedMultimedia = 100,
|
||||
}
|
||||
|
||||
export enum RoleType {
|
||||
user = 1,
|
||||
assistant = 2,
|
||||
}
|
||||
|
||||
export enum SuggestReplyMode {
|
||||
System = 0,
|
||||
Custom = 1,
|
||||
Disable = 2,
|
||||
/** (Agent)使用源bot的配置 */
|
||||
OriBot = 3,
|
||||
}
|
||||
|
||||
export interface BotInfo {
|
||||
/** bot id */
|
||||
Id: Int64;
|
||||
/** bot 名称 */
|
||||
Name?: string;
|
||||
/** bot 描述 */
|
||||
Description?: string;
|
||||
/** bot 头像 */
|
||||
Icon?: string;
|
||||
/** prompt */
|
||||
PromptInfo?: PromptInfo;
|
||||
/** 模型配置 */
|
||||
ModelInfo?: ModelInfo;
|
||||
/** plugin列表 */
|
||||
PluginList?: Array<PluginInfo>;
|
||||
/** 开场白配置 */
|
||||
OnboardingInfo?: OnboardingInfo;
|
||||
/** workflow 列表 */
|
||||
WorkFlowList?: Array<WorkFlowInfo>;
|
||||
/** suggest配置 */
|
||||
SuggestReplyInfo?: SuggestReplyInfo;
|
||||
CreateTime?: Int64;
|
||||
UpdateTime?: Int64;
|
||||
}
|
||||
|
||||
export interface BotUserConversation {
|
||||
BotID?: Int64;
|
||||
UserID?: string;
|
||||
SessionName?: string;
|
||||
ConnectorID?: Int64;
|
||||
ConversationID?: Int64;
|
||||
AccountID?: Int64;
|
||||
CreatorID?: string;
|
||||
}
|
||||
|
||||
export interface CancelChatApiRequest {
|
||||
chat_id: string;
|
||||
conversation_id: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface CancelChatApiResponse {
|
||||
data?: bot_common.ChatV3ChatDetail;
|
||||
BaseResp?: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface ChatMessage {
|
||||
role?: string;
|
||||
type?: string;
|
||||
content?: string;
|
||||
content_type?: string;
|
||||
msg_id?: string;
|
||||
content_time?: Int64;
|
||||
message_id?: Int64;
|
||||
reply_id?: Int64;
|
||||
section_id?: Int64;
|
||||
status?: string;
|
||||
ext?: string;
|
||||
broken_position?: number;
|
||||
display_content?: string;
|
||||
bot_id?: Int64;
|
||||
user_id?: string;
|
||||
exclude_context?: boolean;
|
||||
message_index?: Int64;
|
||||
source?: MessageSource;
|
||||
meta_infos?: Array<MetaInfo>;
|
||||
query_snap?: string;
|
||||
card_status?: Record<string, string>;
|
||||
reasoning_content?: string;
|
||||
}
|
||||
|
||||
export interface ClearConversationApiRequest {
|
||||
conversation_id: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface ClearConversationApiResponse {
|
||||
/** 错误code */
|
||||
code?: Int64;
|
||||
/** 错误消息 */
|
||||
msg?: string;
|
||||
/** section 信息 */
|
||||
data?: Section;
|
||||
BaseResp?: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface ConversationData {
|
||||
id?: string;
|
||||
created_at?: Int64;
|
||||
meta_data?: Record<string, string>;
|
||||
creator_d?: string;
|
||||
connector_id?: string;
|
||||
last_section_id?: string;
|
||||
account_id?: Int64;
|
||||
}
|
||||
|
||||
export interface CreateConversationApiRequest {
|
||||
meta_data?: Record<string, string>;
|
||||
/** 校验最多16个 */
|
||||
messages?: Array<EnterMessage>;
|
||||
bot_id?: string;
|
||||
connector_id?: string;
|
||||
app_id?: string;
|
||||
conversation_name?: string;
|
||||
get_or_create?: boolean;
|
||||
draft_mode?: boolean;
|
||||
workflow_id?: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface CreateConversationApiResponse {
|
||||
data?: ConversationData;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface CreateMessageApiRequest {
|
||||
conversation_id: Int64;
|
||||
/** 已TODO 字段打平 */
|
||||
role: string;
|
||||
/** 内容 */
|
||||
content?: string;
|
||||
meta_data?: Record<string, string>;
|
||||
content_type?: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface CreateMessageApiResponse {
|
||||
data?: OpenMessageApi;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface DatasetData {
|
||||
Name?: string;
|
||||
ID?: string;
|
||||
}
|
||||
|
||||
/** dataset */
|
||||
export interface DatasetInfo {
|
||||
Dataset?: Array<DatasetData>;
|
||||
TopK?: number;
|
||||
MinScore?: number;
|
||||
Auto?: boolean;
|
||||
}
|
||||
|
||||
export interface DeleteMessageApiRequest {
|
||||
message_id: string;
|
||||
conversation_id: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface DeleteMessageApiResponse {
|
||||
data?: OpenMessageApi;
|
||||
BaseResp?: base.BaseResp;
|
||||
}
|
||||
|
||||
/** 批量删除message */
|
||||
export interface DeleteMessageBody {
|
||||
MessageId: Int64;
|
||||
ConversationId: Int64;
|
||||
}
|
||||
|
||||
export interface DraftMessageIdInfo {
|
||||
PushUuid?: string;
|
||||
Id?: string;
|
||||
}
|
||||
|
||||
export interface EnterMessage {
|
||||
role: string;
|
||||
/** 内容 */
|
||||
content?: string;
|
||||
meta_data?: Record<string, string>;
|
||||
/** text/card/object_string */
|
||||
content_type?: string;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export interface IdempotentInfo {
|
||||
source: MessageSource;
|
||||
BatchId: string;
|
||||
UniqueId: string;
|
||||
}
|
||||
|
||||
export interface ListChatMessageApiRequest {
|
||||
/** connector层的会话id */
|
||||
conversation_id: string;
|
||||
/** 运行id */
|
||||
chat_id: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface ListChatMessageApiResponse {
|
||||
data?: Array<bot_common.ChatV3MessageDetail>;
|
||||
BaseResp?: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface ListConversationData {
|
||||
conversations?: Array<ConversationData>;
|
||||
has_more?: boolean;
|
||||
}
|
||||
|
||||
export interface ListConversationsApiRequest {
|
||||
page_num?: Int64;
|
||||
page_size?: Int64;
|
||||
/** 可选值:ASC、DESC */
|
||||
sort_order?: string;
|
||||
/** 可选值:created_at创建时间 */
|
||||
sort_field?: string;
|
||||
bot_id: string;
|
||||
connector_id?: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface ListConversationsApiResponse {
|
||||
/** 错误code */
|
||||
code?: Int64;
|
||||
/** 错误消息 */
|
||||
msg?: string;
|
||||
data?: ListConversationData;
|
||||
BaseResp?: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface ListMessageApiRequest {
|
||||
/** connector层的会话id */
|
||||
conversation_id: Int64;
|
||||
/** 每页限制条数 TODO 限制50条 */
|
||||
limit?: Int64;
|
||||
/** 查询顺序 desc倒序 asc正序 TODO 默认倒序 */
|
||||
order?: string;
|
||||
/** 运行id */
|
||||
chat_id?: string;
|
||||
/** 前序消息游标ID 已TODO str */
|
||||
before_id?: string;
|
||||
/** 后序消息游标ID 已TODO str */
|
||||
after_id?: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface ListMessageApiResponse {
|
||||
data?: Array<OpenMessageApi>;
|
||||
has_more?: boolean;
|
||||
first_id?: string;
|
||||
last_id?: string;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface ListMessageQueryOption {
|
||||
NeedMessageContext?: boolean;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
/** user or assistant */
|
||||
Role: string;
|
||||
/** the content of the message */
|
||||
Content: string;
|
||||
ConversationId: Int64;
|
||||
/** customer meta data */
|
||||
CustomerData?: Record<string, string>;
|
||||
/** 创建时间 */
|
||||
CreateTime?: Int64;
|
||||
}
|
||||
|
||||
export interface MetaInfo {
|
||||
type?: MetaType;
|
||||
info?: string;
|
||||
}
|
||||
|
||||
export interface ModelInfo {
|
||||
ModelType?: Int64;
|
||||
Temperature?: number;
|
||||
MaxTokens?: number;
|
||||
TopP?: number;
|
||||
FrequencyPenalty?: number;
|
||||
PresencePenalty?: number;
|
||||
ShortMemoryPolicy?: ShortMemoryPolicy;
|
||||
}
|
||||
|
||||
export interface ModifyMessageApiRequest {
|
||||
conversation_id: Int64;
|
||||
message_id: Int64;
|
||||
meta_data?: Record<string, string>;
|
||||
/** 内容 */
|
||||
content?: string;
|
||||
content_type?: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface ModifyMessageApiResponse {
|
||||
message?: OpenMessageApi;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface MultiData {
|
||||
Url: string;
|
||||
Name?: string;
|
||||
/** 文件/图片/audio等 */
|
||||
Type: FileType;
|
||||
}
|
||||
|
||||
export interface OnboardingInfo {
|
||||
/** 开场白 */
|
||||
Prologue?: string;
|
||||
/** 建议问题 */
|
||||
SuggestedQuestions?: Array<string>;
|
||||
}
|
||||
|
||||
export interface OpenMessage {
|
||||
/** 主键ID */
|
||||
Id?: Int64;
|
||||
/** bot id */
|
||||
BotId?: Int64;
|
||||
Role?: RoleType;
|
||||
/** 内容 */
|
||||
Content?: string;
|
||||
/** conversation id */
|
||||
ConversationId?: Int64;
|
||||
CustomerData?: Record<string, string>;
|
||||
/** 创建时间 */
|
||||
CreatedAt?: Int64;
|
||||
/** 更新时间 */
|
||||
UpdatedAt?: Int64;
|
||||
/** 多模态数据 */
|
||||
MultiData?: Array<MultiData>;
|
||||
ChatId?: string;
|
||||
ContentType?: number;
|
||||
CustomerDataApi?: Record<string, string>;
|
||||
Type?: number;
|
||||
SectionID?: Int64;
|
||||
ReasoningContent?: string;
|
||||
}
|
||||
|
||||
export interface OpenMessageApi {
|
||||
/** 主键ID */
|
||||
id?: string;
|
||||
/** bot id //已TODO 所有的i64加注解str,入参和出参都要 */
|
||||
bot_id?: string;
|
||||
role?: string;
|
||||
/** 内容 */
|
||||
content?: string;
|
||||
/** conversation id */
|
||||
conversation_id?: string;
|
||||
meta_data?: Record<string, string>;
|
||||
/** 创建时间 */
|
||||
created_at?: Int64;
|
||||
/** 更新时间 //已TODO 时间改成int */
|
||||
updated_at?: Int64;
|
||||
chat_id?: string;
|
||||
content_type?: string;
|
||||
type?: string;
|
||||
section_id?: string;
|
||||
reasoning_content?: string;
|
||||
}
|
||||
|
||||
export interface PlaygroundOriginMessage {
|
||||
Query: PoMessage;
|
||||
AnswerList: Array<PoMessage>;
|
||||
ContextList: Array<PoMessage>;
|
||||
SuggestList: Array<PoMessage>;
|
||||
}
|
||||
|
||||
export interface PluginIdInfo {
|
||||
PluginId: Int64;
|
||||
ApiId?: Int64;
|
||||
}
|
||||
|
||||
export interface PluginIdList {
|
||||
IdList?: Array<PluginIdInfo>;
|
||||
}
|
||||
|
||||
export interface PluginInfo {
|
||||
PluginIdInfo: PluginIdInfo;
|
||||
}
|
||||
|
||||
export interface PoMessage {
|
||||
ContentType: number;
|
||||
Content: string;
|
||||
Ext: string;
|
||||
DraftMessageIdInfo: DraftMessageIdInfo;
|
||||
}
|
||||
|
||||
export interface PromptInfo {
|
||||
/** 文本prompt */
|
||||
Prompt?: string;
|
||||
}
|
||||
|
||||
export interface RetrieveChatOpenRequest {
|
||||
conversation_id: string;
|
||||
chat_id: string;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface RetrieveChatOpenResponse {
|
||||
data?: bot_common.ChatV3ChatDetail;
|
||||
/** 11: optional RequiredAction RequiredAction (api.body = "required_action") */
|
||||
BaseResp?: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface RetrieveConversationApiRequest {
|
||||
conversation_id: Int64;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface RetrieveConversationApiResponse {
|
||||
data?: ConversationData;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface RetrieveMessageApiRequest {
|
||||
conversation_id: Int64;
|
||||
message_id: Int64;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface RetrieveMessageApiResponse {
|
||||
data?: OpenMessageApi;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface Section {
|
||||
id?: string;
|
||||
conversation_id?: string;
|
||||
}
|
||||
|
||||
export interface ShortMemoryPolicy {
|
||||
ContextMode?: ContextMode;
|
||||
HistoryRound?: number;
|
||||
}
|
||||
|
||||
/** suggest */
|
||||
export interface SuggestReplyInfo {
|
||||
SuggestReplyMode?: SuggestReplyMode;
|
||||
}
|
||||
|
||||
export interface WorkFlowIdList {
|
||||
IdList?: Array<Int64>;
|
||||
}
|
||||
|
||||
export interface WorkFlowInfo {
|
||||
WorkFlowId: Int64;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,423 @@
|
||||
/*
|
||||
* 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 bot_common from './namespaces/bot_common';
|
||||
import * as bot_open_api from './namespaces/bot_open_api';
|
||||
|
||||
export { bot_common, bot_open_api };
|
||||
export * from './namespaces/bot_common';
|
||||
export * from './namespaces/bot_open_api';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export default class BotOpenApiService<T> {
|
||||
private request: any = () => {
|
||||
throw new Error('BotOpenApiService.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);
|
||||
}
|
||||
|
||||
/** GET /api/oauth/authorization_code */
|
||||
OauthAuthorizationCode(
|
||||
req?: bot_open_api.OauthAuthorizationCodeReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.OauthAuthorizationCodeResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/oauth/authorization_code');
|
||||
const method = 'GET';
|
||||
const params = { code: _req['code'], state: _req['state'] };
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/oauth/callback
|
||||
*
|
||||
* 飞书老接口 已弃用
|
||||
*/
|
||||
OauthCallback(
|
||||
req?: bot_open_api.OauthCallbackReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.OauthCallbackResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/oauth/callback');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
oauth_token: _req['oauth_token'],
|
||||
oauth_token_secret: _req['oauth_token_secret'],
|
||||
oauth_callback_confirmed: _req['oauth_callback_confirmed'],
|
||||
state: _req['state'],
|
||||
oauth_verifier: _req['oauth_verifier'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/** GET /api/oauth/authorization_code_debug */
|
||||
OauthAuthorizationCodeDebug(
|
||||
req?: bot_open_api.OauthAuthorizationCodeReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.OauthAuthorizationCodeResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/oauth/authorization_code_debug');
|
||||
const method = 'GET';
|
||||
const params = { code: _req['code'], state: _req['state'] };
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /open_api/v1/chat
|
||||
*
|
||||
* chat 接口
|
||||
*/
|
||||
ChatV1(
|
||||
req: bot_open_api.ChatV1Req,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.ChatV1Resp> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/open_api/v1/chat');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bot_id: _req['bot_id'],
|
||||
conversation_id: _req['conversation_id'],
|
||||
bot_version: _req['bot_version'],
|
||||
user: _req['user'],
|
||||
query: _req['query'],
|
||||
chat_history: _req['chat_history'],
|
||||
extra: _req['extra'],
|
||||
stream: _req['stream'],
|
||||
custom_variables: _req['custom_variables'],
|
||||
local_message_id: _req['local_message_id'],
|
||||
content_type: _req['content_type'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /open_api/v1/web_chat
|
||||
*
|
||||
* web chat 接口
|
||||
*/
|
||||
WebChatV1(
|
||||
req: bot_open_api.ChatV2Req,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.ChatV2NoneStreamResp> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/open_api/v1/web_chat');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bot_id: _req['bot_id'],
|
||||
conversation_id: _req['conversation_id'],
|
||||
bot_version: _req['bot_version'],
|
||||
user: _req['user'],
|
||||
query: _req['query'],
|
||||
chat_history: _req['chat_history'],
|
||||
stream: _req['stream'],
|
||||
custom_variables: _req['custom_variables'],
|
||||
extra: _req['extra'],
|
||||
local_message_id: _req['local_message_id'],
|
||||
meta_data: _req['meta_data'],
|
||||
content_type: _req['content_type'],
|
||||
tools: _req['tools'],
|
||||
model_id: _req['model_id'],
|
||||
bot_name: _req['bot_name'],
|
||||
extra_params: _req['extra_params'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** GET /api/oauth/exchange_token */
|
||||
OauthExchangeToken(
|
||||
req?: bot_open_api.OauthExchangeTokenReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.OauthExchangeTokenResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/oauth/exchange_token');
|
||||
const method = 'GET';
|
||||
const params = { code: _req['code'], state: _req['state'] };
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/** POST /open_api/v2/chat */
|
||||
ChatV2(
|
||||
req: bot_open_api.ChatV2Req,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.ChatV2NoneStreamResp> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/open_api/v2/chat');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bot_id: _req['bot_id'],
|
||||
conversation_id: _req['conversation_id'],
|
||||
bot_version: _req['bot_version'],
|
||||
user: _req['user'],
|
||||
query: _req['query'],
|
||||
chat_history: _req['chat_history'],
|
||||
stream: _req['stream'],
|
||||
custom_variables: _req['custom_variables'],
|
||||
extra: _req['extra'],
|
||||
local_message_id: _req['local_message_id'],
|
||||
meta_data: _req['meta_data'],
|
||||
content_type: _req['content_type'],
|
||||
tools: _req['tools'],
|
||||
model_id: _req['model_id'],
|
||||
bot_name: _req['bot_name'],
|
||||
extra_params: _req['extra_params'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /open_api/v1/file/upload
|
||||
*
|
||||
* 文件上传
|
||||
*/
|
||||
UploadV1(
|
||||
req?: bot_open_api.UploadReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.UploadResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/open_api/v1/file/upload');
|
||||
const method = 'POST';
|
||||
const data = { source: _req['source'], bot_id: _req['bot_id'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /open_api/v1/bot/onboarding
|
||||
*
|
||||
* 开场白
|
||||
*/
|
||||
BotOnboarding(
|
||||
req?: bot_open_api.BotOnboardingReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.BotOnboardingResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/open_api/v1/bot/onboarding');
|
||||
const method = 'GET';
|
||||
const params = { source: _req['source'], bot_id: _req['bot_id'] };
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /open_api/connector/bot/get_bot_info
|
||||
*
|
||||
* Bot 相关 OpenAPI
|
||||
*/
|
||||
GetBotInfo(
|
||||
req: bot_open_api.GetBotInfoReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.GetBotInfoResp> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/open_api/connector/bot/get_bot_info');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
bot_id: _req['bot_id'],
|
||||
connector_id: _req['connector_id'],
|
||||
version: _req['version'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/** GET /v1/bot/get_online_info */
|
||||
GetBotOnlineInfo(
|
||||
req: bot_open_api.GetBotOnlineInfoReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.GetBotOnlineInfoResp> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/bot/get_online_info');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
bot_id: _req['bot_id'],
|
||||
connector_id: _req['connector_id'],
|
||||
version: _req['version'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/** GET /v1/space/published_bots_list */
|
||||
GetSpacePublishedBotsList(
|
||||
req: bot_open_api.GetSpacePublishedBotsListReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.GetSpacePublishedBotsListResp> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/space/published_bots_list');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
space_id: _req['space_id'],
|
||||
connector_id: _req['connector_id'],
|
||||
page_index: _req['page_index'],
|
||||
page_size: _req['page_size'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /v3/chat
|
||||
*
|
||||
* Chat 相关 OpenAPI
|
||||
*/
|
||||
ChatV3(
|
||||
req: bot_open_api.ChatV3Request,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.ChatV3Response> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v3/chat');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bot_id: _req['bot_id'],
|
||||
user_id: _req['user_id'],
|
||||
stream: _req['stream'],
|
||||
additional_messages: _req['additional_messages'],
|
||||
custom_variables: _req['custom_variables'],
|
||||
auto_save_history: _req['auto_save_history'],
|
||||
meta_data: _req['meta_data'],
|
||||
tools: _req['tools'],
|
||||
custom_config: _req['custom_config'],
|
||||
extra_params: _req['extra_params'],
|
||||
connector_id: _req['connector_id'],
|
||||
shortcut_command: _req['shortcut_command'],
|
||||
parameters: _req['parameters'],
|
||||
enable_card: _req['enable_card'],
|
||||
};
|
||||
const params = { conversation_id: _req['conversation_id'] };
|
||||
return this.request({ url, method, data, params }, options);
|
||||
}
|
||||
|
||||
/** POST /v3/chat/submit_tool_outputs */
|
||||
SubmitToolOutputs(
|
||||
req: bot_open_api.SubmitToolOutputsRequest,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.ChatV3Response> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v3/chat/submit_tool_outputs');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
stream: _req['stream'],
|
||||
tool_outputs: _req['tool_outputs'],
|
||||
connector_id: _req['connector_id'],
|
||||
};
|
||||
const params = {
|
||||
conversation_id: _req['conversation_id'],
|
||||
chat_id: _req['chat_id'],
|
||||
};
|
||||
return this.request({ url, method, data, params }, options);
|
||||
}
|
||||
|
||||
/** POST /v1/bot/update */
|
||||
UpdateDraftBot(
|
||||
req: bot_open_api.UpdateDraftBotRequest,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.UpdateDraftBotResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/bot/update');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bot_id: _req['bot_id'],
|
||||
name: _req['name'],
|
||||
description: _req['description'],
|
||||
icon_file_id: _req['icon_file_id'],
|
||||
prompt_info: _req['prompt_info'],
|
||||
plugin_id_list: _req['plugin_id_list'],
|
||||
onboarding_info: _req['onboarding_info'],
|
||||
voice_ids: _req['voice_ids'],
|
||||
knowledge: _req['knowledge'],
|
||||
workflow_id_list: _req['workflow_id_list'],
|
||||
model_info_config: _req['model_info_config'],
|
||||
suggest_reply_info: _req['suggest_reply_info'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /v1/bot/get_voice_list
|
||||
*
|
||||
* 获取渠道资源、Bot管理相关信息
|
||||
*/
|
||||
GetVoiceList(
|
||||
req?: bot_open_api.GetVoiceListReq,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.GetVoiceListResp> {
|
||||
const url = this.genBaseURL('/v1/bot/get_voice_list');
|
||||
const method = 'GET';
|
||||
return this.request({ url, method }, options);
|
||||
}
|
||||
|
||||
/** POST /v1/bot/create */
|
||||
CreateDraftBot(
|
||||
req: bot_open_api.CreateDraftBotRequest,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.CreateDraftBotResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/bot/create');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
space_id: _req['space_id'],
|
||||
name: _req['name'],
|
||||
description: _req['description'],
|
||||
icon_file_id: _req['icon_file_id'],
|
||||
prompt_info: _req['prompt_info'],
|
||||
plugin_id_list: _req['plugin_id_list'],
|
||||
onboarding_info: _req['onboarding_info'],
|
||||
voice_ids: _req['voice_ids'],
|
||||
workflow_id_list: _req['workflow_id_list'],
|
||||
model_info_config: _req['model_info_config'],
|
||||
suggest_reply_info: _req['suggest_reply_info'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /v1/bot/publish */
|
||||
PublishDraftBot(
|
||||
req: bot_open_api.PublishDraftBotRequest,
|
||||
options?: T,
|
||||
): Promise<bot_open_api.PublishDraftBotResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/v1/bot/publish');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bot_id: _req['bot_id'],
|
||||
connector_ids: _req['connector_ids'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,438 @@
|
||||
/*
|
||||
* 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 AgentType {
|
||||
Start_Agent = 0,
|
||||
LLM_Agent = 1,
|
||||
Task_Agent = 2,
|
||||
Global_Agent = 3,
|
||||
Bot_Agent = 4,
|
||||
}
|
||||
|
||||
/** 版本兼容:0-旧版本 1-可回退的新版本 2-不可回退的新版本 3-可回退的新版本(不再提示) */
|
||||
export enum AgentVersionCompat {
|
||||
OldVersion = 0,
|
||||
MiddleVersion = 1,
|
||||
NewVersion = 2,
|
||||
MiddleVersionNotPrompt = 3,
|
||||
}
|
||||
|
||||
/** AnswerActions */
|
||||
export enum AnswerActionsMode {
|
||||
Default = 1,
|
||||
Customize = 2,
|
||||
}
|
||||
|
||||
export enum AnswerActionTriggerType {
|
||||
/** 平台预设Trigger action */
|
||||
Direct = 1,
|
||||
/** 点击Action 显示自定义的H5页面 */
|
||||
WebView = 2,
|
||||
/** 点击Action 发送自定义的用户消息 */
|
||||
SendMessage = 3,
|
||||
}
|
||||
|
||||
export enum BacktrackMode {
|
||||
Current = 1,
|
||||
Previous = 2,
|
||||
Start = 3,
|
||||
MostSuitable = 4,
|
||||
}
|
||||
|
||||
export enum BotMode {
|
||||
SingleMode = 0,
|
||||
MultiMode = 1,
|
||||
WorkflowMode = 2,
|
||||
}
|
||||
|
||||
export enum BotSpecies {
|
||||
/** bot种类
|
||||
从flow创建 */
|
||||
Default = 0,
|
||||
/** 从coze创建 */
|
||||
Function = 1,
|
||||
}
|
||||
|
||||
export enum BotStatus {
|
||||
Deleted = 0,
|
||||
Using = 1,
|
||||
Banned = 2,
|
||||
}
|
||||
|
||||
export enum BotTableRWMode {
|
||||
LimitedReadWrite = 1,
|
||||
ReadOnly = 2,
|
||||
UnlimitedReadWrite = 3,
|
||||
RWModeMax = 4,
|
||||
}
|
||||
|
||||
export enum BusinessType {
|
||||
Default = 0,
|
||||
DouyinAvatar = 1,
|
||||
}
|
||||
|
||||
export enum CacheType {
|
||||
/** 缓存关闭 */
|
||||
CacheClosed = 0,
|
||||
/** 前缀缓存 */
|
||||
PrefixCache = 1,
|
||||
}
|
||||
|
||||
/** 上下文允许传输的类型 */
|
||||
export enum ContextMode {
|
||||
Chat = 0,
|
||||
FunctionCall_1 = 1,
|
||||
FunctionCall_2 = 2,
|
||||
FunctionCall_3 = 3,
|
||||
}
|
||||
|
||||
export enum DefaultUserInputType {
|
||||
/** 没设置 */
|
||||
NotSet = 0,
|
||||
/** 文字 */
|
||||
Text = 1,
|
||||
/** 按住语音 */
|
||||
Voice = 2,
|
||||
/** 语音通话 */
|
||||
Call = 3,
|
||||
/** 视频通话 */
|
||||
VideoCall = 4,
|
||||
}
|
||||
|
||||
export enum DisablePromptCalling {
|
||||
Off = 0,
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum FieldItemType {
|
||||
/** 文本 String */
|
||||
Text = 1,
|
||||
/** 数字 Integer */
|
||||
Number = 2,
|
||||
/** 时间 Time */
|
||||
Date = 3,
|
||||
/** float Number */
|
||||
Float = 4,
|
||||
/** bool Boolean */
|
||||
Boolean = 5,
|
||||
}
|
||||
|
||||
export enum FileboxInfoMode {
|
||||
Off = 0,
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum IndependentRecognitionModelType {
|
||||
/** 小模型 */
|
||||
SLM = 0,
|
||||
/** 大模型 */
|
||||
LLM = 1,
|
||||
}
|
||||
|
||||
export enum IndependentTiming {
|
||||
/** 判断用户输入(前置) */
|
||||
Pre = 1,
|
||||
/** 判断节点输出(后置) */
|
||||
Post = 2,
|
||||
/** 前置模式和后置模式支持同时选择 */
|
||||
PreAndPost = 3,
|
||||
}
|
||||
|
||||
export enum KnowledgeNoRecallReplyMode {
|
||||
Default = 0,
|
||||
CustomizePrompt = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeShowSourceMode {
|
||||
ReplyBottom = 0,
|
||||
CardList = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeType {
|
||||
Coze = 0,
|
||||
Volcano = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeTypeMode {
|
||||
Coze = 0,
|
||||
Volcano = 1,
|
||||
}
|
||||
|
||||
export enum MessageFeedbackDetailType {
|
||||
UnlikeDefault = 0,
|
||||
/** 有害信息 */
|
||||
UnlikeHarmful = 1,
|
||||
/** 信息有误 */
|
||||
UnlikeIncorrect = 2,
|
||||
/** 未遵循指令 */
|
||||
UnlikeNotFollowInstructions = 3,
|
||||
/** 其他 */
|
||||
UnlikeOthers = 4,
|
||||
}
|
||||
|
||||
export enum MessageFeedbackType {
|
||||
Default = 0,
|
||||
Like = 1,
|
||||
Unlike = 2,
|
||||
}
|
||||
|
||||
export enum ModelFuncConfigStatus {
|
||||
FullSupport = 0,
|
||||
PoorSupport = 1,
|
||||
NotSupport = 2,
|
||||
}
|
||||
|
||||
export enum ModelFuncConfigType {
|
||||
Plugin = 1,
|
||||
Workflow = 2,
|
||||
ImageFlow = 3,
|
||||
Trigger = 4,
|
||||
KnowledgeText = 5,
|
||||
KnowledgeTable = 6,
|
||||
KnowledgeAutoCall = 7,
|
||||
KnowledgeOnDemandCall = 8,
|
||||
Variable = 9,
|
||||
Database = 10,
|
||||
LongTermMemory = 11,
|
||||
FileBox = 12,
|
||||
Onboarding = 13,
|
||||
Suggestion = 14,
|
||||
ShortcutCommand = 15,
|
||||
BackGroundImage = 16,
|
||||
TTS = 17,
|
||||
MultiAgentRecognize = 18,
|
||||
KnowledgePhoto = 19,
|
||||
HookInfo = 20,
|
||||
KnowledgeValcanoUnstructured = 21,
|
||||
KnowledgeValcanoStructured = 22,
|
||||
Model = 23,
|
||||
}
|
||||
|
||||
export enum ModelResponseFormat {
|
||||
Text = 0,
|
||||
Markdown = 1,
|
||||
JSON = 2,
|
||||
}
|
||||
|
||||
export enum ModelStyle {
|
||||
Custom = 0,
|
||||
Creative = 1,
|
||||
Balance = 2,
|
||||
Precise = 3,
|
||||
}
|
||||
|
||||
export enum MultiAgentConnectorType {
|
||||
Curve = 0,
|
||||
Straight = 1,
|
||||
}
|
||||
|
||||
export enum MultiAgentSessionType {
|
||||
Flow = 1,
|
||||
Host = 2,
|
||||
}
|
||||
|
||||
/** onboarding内容生成模式 */
|
||||
export enum OnboardingMode {
|
||||
/** 不需要 */
|
||||
NO_NEED = 1,
|
||||
/** 人工指定内容(多语言支持由LLM兜底) */
|
||||
USE_MANUAL = 2,
|
||||
/** 由LLM生成 */
|
||||
USE_LLM = 3,
|
||||
}
|
||||
|
||||
export enum PromptMode {
|
||||
Standard = 0,
|
||||
/** 前缀提示词 */
|
||||
PrefixPrompt = 1,
|
||||
}
|
||||
|
||||
export enum RecognitionMode {
|
||||
FunctionCall = 1,
|
||||
Independent = 2,
|
||||
}
|
||||
|
||||
export enum ReferenceInfoStatus {
|
||||
/** 1:有可用更新 */
|
||||
HasUpdates = 1,
|
||||
/** 2:被删除 */
|
||||
IsDelete = 2,
|
||||
}
|
||||
|
||||
/** struct ContentAttachment {
|
||||
1: required string FileID (api.body = "file_id")
|
||||
}
|
||||
struct MetaContent{
|
||||
1: required string Type (agw.key="type"),
|
||||
2: optional string Text ( agw.key="text"),
|
||||
3: optional string FileID (agw.key="file_id"),
|
||||
4: optional string FileURL (agw.key="file_url"),
|
||||
5: optional string Card (agw.key="card"),
|
||||
}
|
||||
struct EnterMessage {
|
||||
1: required string Role (agw.key = "role")
|
||||
2: string Content(agw.key = "content") // 内容
|
||||
3: map<string,string> MetaData(agw.key = "meta_data")
|
||||
4: string ContentType(agw.key = "content_type")//text/card/object_string
|
||||
5: string Type(agw.key = "type")
|
||||
}
|
||||
struct OpenMessageApi {
|
||||
1: string Id(agw.key = "id") // 主键ID
|
||||
2: string BotId(agw.key = "bot_id") // bot id //已TODO 所有的i64加注解str,入参和出参都要
|
||||
3: string Role(agw.key = "role")
|
||||
4: string Content(agw.key = "content") // 内容
|
||||
5: string ConversationId(agw.key = "conversation_id") // conversation id
|
||||
6: map<string,string> MetaData(agw.key = "meta_data")
|
||||
7: string CreatedAt(agw.key = "created_at") // 创建时间
|
||||
8: string UpdatedAt(agw.key = "updated_at") // 更新时间 //已TODO 时间改成int
|
||||
9: string ChatId(agw.key = "chat_id")
|
||||
10: string ContentType(agw.key = "content_type")
|
||||
11: string Type(agw.key = "type")
|
||||
} */
|
||||
export enum ReferenceUpdateType {
|
||||
ManualUpdate = 1,
|
||||
AutoUpdate = 2,
|
||||
}
|
||||
|
||||
export enum Scene {
|
||||
Default = 0,
|
||||
Explore = 1,
|
||||
BotStore = 2,
|
||||
CozeHome = 3,
|
||||
Playground = 4,
|
||||
/** 评测平台 */
|
||||
Evaluation = 5,
|
||||
AgentAPP = 6,
|
||||
/** prompt优化 */
|
||||
PromptOptimize = 7,
|
||||
/** createbot的nl2bot功能 */
|
||||
GenerateAgentInfo = 8,
|
||||
}
|
||||
|
||||
export enum SearchStrategy {
|
||||
/** 语义搜索 */
|
||||
SemanticSearch = 0,
|
||||
/** 混合搜索 */
|
||||
HybirdSearch = 1,
|
||||
/** 全文搜索 */
|
||||
FullTextSearch = 20,
|
||||
}
|
||||
|
||||
export enum SocietyVisibility {
|
||||
/** 对所有人可见 */
|
||||
Public = 1,
|
||||
/** 仅对host可见 */
|
||||
Anonymous = 2,
|
||||
/** 自定义 */
|
||||
Custom = 3,
|
||||
}
|
||||
|
||||
export enum SuggestedQuestionsShowMode {
|
||||
Random = 0,
|
||||
All = 1,
|
||||
}
|
||||
|
||||
export enum SuggestReplyMode {
|
||||
System = 0,
|
||||
Custom = 1,
|
||||
Disable = 2,
|
||||
/** agent专用,复用源Bot配置 */
|
||||
OriBot = 3,
|
||||
}
|
||||
|
||||
export enum TimeCapsuleMode {
|
||||
/** 关 */
|
||||
Off = 0,
|
||||
/** 开 */
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum WorkflowMode {
|
||||
Workflow = 0,
|
||||
Imageflow = 1,
|
||||
SceneFlow = 2,
|
||||
ChatFlow = 3,
|
||||
All = 100,
|
||||
}
|
||||
|
||||
export interface ChatV3ChatDetail {
|
||||
id: string;
|
||||
conversation_id: string;
|
||||
bot_id: string;
|
||||
created_at?: number;
|
||||
completed_at?: number;
|
||||
failed_at?: number;
|
||||
meta_data?: Record<string, string>;
|
||||
last_error?: LastError;
|
||||
status: string;
|
||||
usage?: Usage;
|
||||
required_action?: RequiredAction;
|
||||
section_id?: string;
|
||||
}
|
||||
|
||||
export interface CompletionUsage {
|
||||
reasoning_tokens?: number;
|
||||
}
|
||||
|
||||
export interface InterruptFunction {
|
||||
name?: string;
|
||||
arguments?: string;
|
||||
}
|
||||
|
||||
export interface InterruptPlugin {
|
||||
id?: string;
|
||||
type?: string;
|
||||
function?: InterruptFunction;
|
||||
require_info?: InterruptRequireInfo;
|
||||
}
|
||||
|
||||
export interface InterruptRequireInfo {
|
||||
infos?: Array<string>;
|
||||
}
|
||||
|
||||
export interface LastError {
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
export interface PromptUsage {
|
||||
cached_tokens?: number;
|
||||
}
|
||||
|
||||
export interface RequiredAction {
|
||||
type?: string;
|
||||
submit_tool_outputs?: SubmitToolOutputs;
|
||||
}
|
||||
|
||||
export interface SubmitToolOutputs {
|
||||
tool_calls?: Array<InterruptPlugin>;
|
||||
}
|
||||
|
||||
export interface Usage {
|
||||
token_count?: number;
|
||||
output_count?: number;
|
||||
input_count?: number;
|
||||
input_tokens_details?: PromptUsage;
|
||||
output_tokens_details?: CompletionUsage;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,764 @@
|
||||
/*
|
||||
* 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 bot_common from './bot_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export enum SearchStrategy {
|
||||
/** 语义搜索 */
|
||||
SemanticSearch = 0,
|
||||
/** 混合搜索 */
|
||||
HybridSearch = 1,
|
||||
/** 全文搜索 */
|
||||
FullTextSearch = 20,
|
||||
}
|
||||
|
||||
export interface ApiInfo {
|
||||
/** api id */
|
||||
api_id?: string;
|
||||
/** api名称 */
|
||||
name?: string;
|
||||
/** api描述 */
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface BackgroundImageDetail {
|
||||
origin_image_url?: string;
|
||||
image_url?: string;
|
||||
theme_color?: string;
|
||||
/** 渐变位置 */
|
||||
gradient_position?: GradientPosition;
|
||||
/** 裁剪画布位置 */
|
||||
canvas_position?: CanvasPosition;
|
||||
}
|
||||
|
||||
export interface BackgroundImageInfo {
|
||||
/** web端背景图 */
|
||||
web_background_image?: BackgroundImageDetail;
|
||||
/** 移动端背景图 */
|
||||
mobile_background_image?: BackgroundImageDetail;
|
||||
}
|
||||
|
||||
export interface BotConfig {
|
||||
character_name?: string;
|
||||
propmt?: string;
|
||||
}
|
||||
|
||||
export interface BotInfo {
|
||||
/** bot id */
|
||||
bot_id?: string;
|
||||
/** bot名称 */
|
||||
name?: string;
|
||||
/** bot描述 */
|
||||
description?: string;
|
||||
/** bot图像url */
|
||||
icon_url?: string;
|
||||
/** 创建时间 */
|
||||
create_time?: Int64;
|
||||
/** 更新时间 */
|
||||
update_time?: Int64;
|
||||
/** 版本 */
|
||||
version?: string;
|
||||
/** prompt 信息 */
|
||||
prompt_info?: PromptInfo;
|
||||
/** 开场白 */
|
||||
onboarding_info?: OnboardingInfoV2;
|
||||
/** bot 类型,single agent or multi agent */
|
||||
bot_mode?: bot_common.BotMode;
|
||||
/** 选择的语音信息 */
|
||||
voice_data_list?: Array<VoiceData>;
|
||||
/** 模型信息 */
|
||||
model_info?: ModelInfo;
|
||||
/** 插件信息列表 */
|
||||
plugin_info_list?: Array<PluginInfo>;
|
||||
/** 知识库信息 */
|
||||
knowledge?: CommonKnowledge;
|
||||
/** workflow信息列表 */
|
||||
workflow_info_list?: Array<WorkflowInfo>;
|
||||
/** 快捷指令信息列表 */
|
||||
shortcut_commands?: Array<ShortcutCommandInfo>;
|
||||
/** 音色配置 */
|
||||
voice_info_list?: Array<Voice>;
|
||||
/** 默认用户输入类型 */
|
||||
default_user_input_type?: string;
|
||||
/** 用户问题建议 */
|
||||
suggest_reply_info?: SuggestReplyInfo;
|
||||
/** 背景图片 */
|
||||
background_image_info?: BackgroundImageInfo;
|
||||
/** 变量列表 */
|
||||
variables?: Array<Variable>;
|
||||
/** owner_id */
|
||||
owner_user_id?: string;
|
||||
}
|
||||
|
||||
export interface BotOnboardingReq {
|
||||
source?: string;
|
||||
bot_id?: string;
|
||||
}
|
||||
|
||||
export interface BotOnboardingResp {
|
||||
code: number;
|
||||
msg: string;
|
||||
onboarding?: Onboarding;
|
||||
user_id?: string;
|
||||
sender_info?: SenderInfo;
|
||||
}
|
||||
|
||||
export interface CanvasPosition {
|
||||
width?: number;
|
||||
height?: number;
|
||||
left?: number;
|
||||
top?: number;
|
||||
}
|
||||
|
||||
export interface ChatMessage {
|
||||
role?: string;
|
||||
type?: string;
|
||||
content?: string;
|
||||
content_type?: string;
|
||||
message_id?: string;
|
||||
reply_id?: string;
|
||||
section_id?: string;
|
||||
extra_info?: Record<string, string>;
|
||||
/** 正常、打断状态 拉消息列表时使用,chat运行时没有这个字段 */
|
||||
status?: string;
|
||||
/** 打断位置 */
|
||||
broken_pos?: number;
|
||||
meta_data?: MetaData;
|
||||
name?: string;
|
||||
/** 思考内容 */
|
||||
reasoning_content?: string;
|
||||
}
|
||||
|
||||
export interface ChatV1Req {
|
||||
bot_id: string;
|
||||
conversation_id?: string;
|
||||
bot_version?: string;
|
||||
user: string;
|
||||
query: string;
|
||||
chat_history?: Array<ChatMessage>;
|
||||
extra?: Record<string, string>;
|
||||
stream?: boolean;
|
||||
custom_variables?: Record<string, string>;
|
||||
/** 前端本地的message_id 在extra_info 里面透传返回 */
|
||||
local_message_id?: string;
|
||||
content_type?: string;
|
||||
}
|
||||
|
||||
export interface ChatV1Resp {
|
||||
messages: Array<ChatMessage>;
|
||||
conversation_id: string;
|
||||
code?: Int64;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface ChatV2NoneStreamResp {
|
||||
messages?: Array<ChatMessage>;
|
||||
conversation_id?: string;
|
||||
code: Int64;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
export interface ChatV2Req {
|
||||
bot_id: string;
|
||||
conversation_id?: string;
|
||||
bot_version?: string;
|
||||
user: string;
|
||||
query: string;
|
||||
chat_history?: Array<ChatMessage>;
|
||||
stream?: boolean;
|
||||
custom_variables?: Record<string, string>;
|
||||
extra?: Record<string, string>;
|
||||
local_message_id?: string;
|
||||
meta_data?: MetaData;
|
||||
content_type?: string;
|
||||
tools?: Array<Tool>;
|
||||
/** 模型id,暂时不暴露,内部使用. */
|
||||
model_id?: string;
|
||||
/** 当前轮对话的 bot_name */
|
||||
bot_name?: string;
|
||||
/** 透传参数到 plugin/workflow 等下游 */
|
||||
extra_params?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ChatV3Request {
|
||||
bot_id: string;
|
||||
conversation_id?: string;
|
||||
user_id: string;
|
||||
stream?: boolean;
|
||||
additional_messages?: Array<EnterMessage>;
|
||||
custom_variables?: Record<string, string>;
|
||||
auto_save_history?: boolean;
|
||||
meta_data?: Record<string, string>;
|
||||
tools?: Array<Tool>;
|
||||
custom_config?: CustomConfig;
|
||||
/** 透传参数到 plugin/workflow 等下游 */
|
||||
extra_params?: Record<string, string>;
|
||||
/** 手动指定渠道 id 聊天。目前仅支持 websdk(=999) */
|
||||
connector_id?: string;
|
||||
/** 指定快捷指令 */
|
||||
shortcut_command?: ShortcutCommandDetail;
|
||||
/** key=参数名 value=值 传递给 workflows parameters 参数 */
|
||||
parameters?: string;
|
||||
enable_card?: boolean;
|
||||
}
|
||||
|
||||
export interface ChatV3Response {
|
||||
data?: bot_common.ChatV3ChatDetail;
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
export interface CommonKnowledge {
|
||||
/** 知识库信息 */
|
||||
knowledge_infos?: Array<KnowledgeInfo>;
|
||||
}
|
||||
|
||||
export interface CreateDraftBotData {
|
||||
bot_id: string;
|
||||
}
|
||||
|
||||
export interface CreateDraftBotRequest {
|
||||
space_id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
/** 头像文件id */
|
||||
icon_file_id?: string;
|
||||
prompt_info?: PromptInfo;
|
||||
plugin_id_list?: PluginIdList;
|
||||
onboarding_info?: OnboardingInfo;
|
||||
voice_ids?: Array<string>;
|
||||
workflow_id_list?: WorkflowIdList;
|
||||
model_info_config?: ModelInfoConfig;
|
||||
suggest_reply_info?: SuggestReplyInfo;
|
||||
}
|
||||
|
||||
export interface CreateDraftBotResponse {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: CreateDraftBotData;
|
||||
}
|
||||
|
||||
export interface CustomConfig {
|
||||
model_config?: ModelConfig;
|
||||
bot_config?: BotConfig;
|
||||
}
|
||||
|
||||
export interface EnterMessage {
|
||||
/** user / assistant */
|
||||
role?: string;
|
||||
/** 如果是非 text,需要解析 JSON */
|
||||
content?: string;
|
||||
meta_data?: Record<string, string>;
|
||||
/** text, card, object_string */
|
||||
content_type?: string;
|
||||
/** function_call, tool_output, knowledge, answer, follow_up, verbose, (普通请求可以不填)
|
||||
用户输入时可用:function_call,tool_output
|
||||
不支持用户输入使用:follow_up,knowledge,verbose,answer */
|
||||
type?: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface ExchangeTokenInfo {
|
||||
is_exchanged?: boolean;
|
||||
}
|
||||
|
||||
export interface File {
|
||||
url: string;
|
||||
/** 后缀名. 参考platform */
|
||||
suffix_type: string;
|
||||
file_name?: string;
|
||||
}
|
||||
|
||||
export interface FileData {
|
||||
url: string;
|
||||
uri: string;
|
||||
}
|
||||
|
||||
export interface GetBotInfoReq {
|
||||
/** botId */
|
||||
bot_id: string;
|
||||
/** 渠道id,外部使用时传 */
|
||||
connector_id: string;
|
||||
/** bot版本,不传则获取最新版本 */
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface GetBotInfoResp {
|
||||
code: Int64;
|
||||
msg: string;
|
||||
bot_info?: BotInfo;
|
||||
}
|
||||
|
||||
export interface GetBotOnlineInfoReq {
|
||||
/** botId */
|
||||
bot_id: string;
|
||||
/** 先保留,不暴露且不使用该字段 */
|
||||
connector_id?: string;
|
||||
/** bot版本,不传则获取最新版本 */
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface GetBotOnlineInfoResp {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: BotInfo;
|
||||
}
|
||||
|
||||
export interface GetSpacePublishedBotsListReq {
|
||||
/** botId */
|
||||
space_id: string;
|
||||
/** 先保留,不透传且不使用该字段 */
|
||||
connector_id?: string;
|
||||
/** 空间下 bots 分页查询参数 */
|
||||
page_index?: number;
|
||||
page_size?: number;
|
||||
}
|
||||
|
||||
export interface GetSpacePublishedBotsListResp {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: SpacePublishedBotsInfo;
|
||||
}
|
||||
|
||||
export interface GetVoiceListReq {}
|
||||
|
||||
export interface GetVoiceListResp {
|
||||
code: Int64;
|
||||
msg: string;
|
||||
/** 支持的语音信息 */
|
||||
voice_data_list?: Array<VoiceData>;
|
||||
}
|
||||
|
||||
export interface GradientPosition {
|
||||
left?: number;
|
||||
right?: number;
|
||||
}
|
||||
|
||||
export interface Image {
|
||||
url: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface Knowledge {
|
||||
/** 更新知识库列表 全量覆盖更新 */
|
||||
dataset_ids?: Array<string>;
|
||||
/** 自动调用 or 按需调用 */
|
||||
auto_call?: boolean;
|
||||
/** 搜索策略 */
|
||||
search_strategy?: SearchStrategy;
|
||||
}
|
||||
|
||||
export interface KnowledgeInfo {
|
||||
/** 知识库id */
|
||||
id?: string;
|
||||
/** 知识库名称 */
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface MetaData {
|
||||
img?: Array<Image>;
|
||||
file?: Array<File>;
|
||||
}
|
||||
|
||||
export interface ModelConfig {
|
||||
model_id?: string;
|
||||
}
|
||||
|
||||
export interface ModelInfo {
|
||||
/** 模型id */
|
||||
model_id?: string;
|
||||
/** 模型名称 */
|
||||
model_name?: string;
|
||||
/** 生成随机性 没配置不返回 */
|
||||
temperature?: number;
|
||||
/** top p 没配置不返回 */
|
||||
top_p?: number;
|
||||
/** 频率惩罚 没配置不返回 */
|
||||
frequency_penalty?: number;
|
||||
/** 存在惩罚 没配置不返回 */
|
||||
presence_penalty?: number;
|
||||
/** 生成时,采样候选集的大小 没配置不返回 */
|
||||
top_k?: number;
|
||||
/** 携带上下文轮数 */
|
||||
context_round?: number;
|
||||
/** 最大回复长度 */
|
||||
max_tokens?: number;
|
||||
/** 输出格式 text、markdown、json */
|
||||
response_format?: string;
|
||||
/** 缓存配置 */
|
||||
cache_type?: string;
|
||||
/** sp拼接当前时间 */
|
||||
sp_current_time?: boolean;
|
||||
/** sp拼接防泄露指令 */
|
||||
sp_anti_leak?: boolean;
|
||||
/** 模型个性化配置参数 */
|
||||
parameters?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ModelInfoConfig {
|
||||
/** 模型id */
|
||||
model_id: string;
|
||||
/** 生成随机性 */
|
||||
temperature?: number;
|
||||
/** top p */
|
||||
top_p?: number;
|
||||
/** 频率惩罚 */
|
||||
frequency_penalty?: number;
|
||||
/** 存在惩罚 */
|
||||
presence_penalty?: number;
|
||||
/** 生成时,采样候选集的大小 */
|
||||
top_k?: number;
|
||||
/** 携带上下文轮数 */
|
||||
context_round?: number;
|
||||
/** 最大回复长度 */
|
||||
max_tokens?: number;
|
||||
/** 输出格式 text、markdown、json */
|
||||
response_format?: string;
|
||||
/** 缓存配置 */
|
||||
cache_type?: string;
|
||||
/** sp拼接当前时间 */
|
||||
sp_current_time?: boolean;
|
||||
/** sp拼接防泄露指令 */
|
||||
sp_anti_leak?: boolean;
|
||||
/** 模型个性化配置参数 */
|
||||
parameters?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface OauthAuthorizationCodeReq {
|
||||
code?: string;
|
||||
state?: string;
|
||||
}
|
||||
|
||||
export interface OauthAuthorizationCodeResp {}
|
||||
|
||||
export interface OauthCallbackReq {
|
||||
/** tw仅使用 */
|
||||
oauth_token?: string;
|
||||
oauth_token_secret?: string;
|
||||
oauth_callback_confirmed?: boolean;
|
||||
/** 储存自定义json结构 */
|
||||
state?: string;
|
||||
/** tw仅使用 */
|
||||
oauth_verifier?: string;
|
||||
}
|
||||
|
||||
export interface OauthCallbackResp {}
|
||||
|
||||
export interface OauthExchangeTokenReq {
|
||||
code?: string;
|
||||
state?: string;
|
||||
}
|
||||
|
||||
export interface OauthExchangeTokenResp {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: ExchangeTokenInfo;
|
||||
}
|
||||
|
||||
export interface Onboarding {
|
||||
prologue: string;
|
||||
suggested_questions: Array<string>;
|
||||
}
|
||||
|
||||
export interface OnboardingInfo {
|
||||
/** 开场白 */
|
||||
prologue?: string;
|
||||
/** 建议问题 */
|
||||
suggested_questions?: Array<string>;
|
||||
}
|
||||
|
||||
export interface OnboardingInfoV2 {
|
||||
/** 对应 Coze Opening Dialog
|
||||
开场白 */
|
||||
prologue?: string;
|
||||
/** 建议问题 */
|
||||
suggested_questions?: Array<string>;
|
||||
/** 开场白模型 */
|
||||
onboarding_mode?: bot_common.OnboardingMode;
|
||||
/** LLM生成,用户自定义 Prompt */
|
||||
customized_onboarding_prompt?: string;
|
||||
/** 开场白预设问题展示方式 默认0 随机展示 */
|
||||
suggested_questions_show_mode?: bot_common.SuggestedQuestionsShowMode;
|
||||
}
|
||||
|
||||
export interface PluginIdInfo {
|
||||
plugin_id: string;
|
||||
api_id?: string;
|
||||
}
|
||||
|
||||
export interface PluginIdList {
|
||||
id_list?: Array<PluginIdInfo>;
|
||||
}
|
||||
|
||||
export interface PluginInfo {
|
||||
/** 插件id */
|
||||
plugin_id?: string;
|
||||
/** 插件名称 */
|
||||
name?: string;
|
||||
/** 插件描述 */
|
||||
description?: string;
|
||||
/** 插件图片url */
|
||||
icon_url?: string;
|
||||
/** 插件包含的api列表 */
|
||||
api_info_list?: Array<ApiInfo>;
|
||||
}
|
||||
|
||||
export interface PrefixPromptInfo {
|
||||
/** 前缀提示词 */
|
||||
prefix_prompt?: string;
|
||||
/** 不支持前缀提示词部分 */
|
||||
dynamic_prompt?: string;
|
||||
}
|
||||
|
||||
/** bot管理 */
|
||||
export interface PromptInfo {
|
||||
/** 文本prompt */
|
||||
prompt?: string;
|
||||
/** 提示词模式 */
|
||||
prompt_mode?: string;
|
||||
/** 前缀提示词模式下的prompt内容 */
|
||||
prefix_prompt_info?: PrefixPromptInfo;
|
||||
}
|
||||
|
||||
export interface PublishDraftBotData {
|
||||
bot_id?: string;
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface PublishDraftBotRequest {
|
||||
bot_id: string;
|
||||
connector_ids: Array<string>;
|
||||
}
|
||||
|
||||
export interface PublishDraftBotResponse {
|
||||
code: number;
|
||||
msg: string;
|
||||
data?: PublishDraftBotData;
|
||||
}
|
||||
|
||||
export interface SenderInfo {
|
||||
nick_name: string;
|
||||
icon_url: string;
|
||||
}
|
||||
|
||||
export interface ShortcutCommandComponent {
|
||||
/** panel参数
|
||||
参数名字 */
|
||||
name?: string;
|
||||
/** 参数描述 */
|
||||
description?: string;
|
||||
/** 输入类型 text、select、file */
|
||||
type?: string;
|
||||
/** 请求工具时,参数的key 对应tool的参数名称,没有则为不返回 */
|
||||
tool_parameter?: string;
|
||||
/** type为select时的可选项列表 or type为file时,支持哪些类型 image、doc、table、audio、video、zip、code、txt、ppt */
|
||||
options?: Array<string>;
|
||||
/** 默认值 没配置时不返回 */
|
||||
default_value?: string;
|
||||
/** 是否隐藏不展示 线上bot tool类型的快捷指令不返回hide=true的component */
|
||||
is_hide?: boolean;
|
||||
}
|
||||
|
||||
export interface ShortcutCommandDetail {
|
||||
command_id: string;
|
||||
/** key=参数名 value=值 object_string object 数组序列化之后的 JSON String */
|
||||
parameters?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ShortcutCommandInfo {
|
||||
/** 快捷指令id */
|
||||
id?: string;
|
||||
/** 快捷指令按钮名称 */
|
||||
name?: string;
|
||||
/** 快捷指令 */
|
||||
command?: string;
|
||||
/** 快捷指令描述 */
|
||||
description?: string;
|
||||
/** 指令query模版 */
|
||||
query_template?: string;
|
||||
/** 快捷指令icon */
|
||||
icon_url?: string;
|
||||
/** 组件列表(参数列表) */
|
||||
components?: Array<ShortcutCommandComponent>;
|
||||
/** tool信息 */
|
||||
tool?: ShortcutCommandToolInfo;
|
||||
/** multi的指令时,该指令由哪个节点执行 没配置不返回 */
|
||||
agent_id?: string;
|
||||
/** chatsdk 使用 */
|
||||
send_type?: string;
|
||||
/** chatsdk 使用,表单的schema */
|
||||
card_schema?: string;
|
||||
}
|
||||
|
||||
export interface ShortcutCommandToolInfo {
|
||||
name?: string;
|
||||
/** tool类型 workflow plugin */
|
||||
type?: string;
|
||||
plugin_id?: string;
|
||||
plugin_api_name?: string;
|
||||
workflow_id?: string;
|
||||
params?: Array<ShortcutToolParam>;
|
||||
}
|
||||
|
||||
export interface ShortcutToolParam {
|
||||
name?: string;
|
||||
is_required?: boolean;
|
||||
description?: string;
|
||||
type?: string;
|
||||
default_value?: string;
|
||||
/** 是否是panel参数 */
|
||||
is_refer_component?: boolean;
|
||||
}
|
||||
|
||||
export interface SpacePublishedBots {
|
||||
bot_id?: string;
|
||||
bot_name?: string;
|
||||
description?: string;
|
||||
icon_url?: string;
|
||||
publish_time?: string;
|
||||
}
|
||||
|
||||
export interface SpacePublishedBotsInfo {
|
||||
space_bots?: Array<SpacePublishedBots>;
|
||||
total?: number;
|
||||
}
|
||||
|
||||
export interface SubmitToolOutputsRequest {
|
||||
conversation_id: string;
|
||||
chat_id: string;
|
||||
stream?: boolean;
|
||||
tool_outputs: Array<ToolOutput>;
|
||||
connector_id?: string;
|
||||
}
|
||||
|
||||
export interface SuggestReplyInfo {
|
||||
/** 回复模式 */
|
||||
reply_mode?: string;
|
||||
/** custom 模式下的自定义 prompt */
|
||||
customized_prompt?: string;
|
||||
}
|
||||
|
||||
/** 对齐 platform,传递 tools */
|
||||
export interface Tool {
|
||||
plugin_id?: Int64;
|
||||
parameters?: string;
|
||||
api_name?: string;
|
||||
}
|
||||
|
||||
/** 续聊时提交的执行结果 */
|
||||
export interface ToolOutput {
|
||||
tool_call_id: string;
|
||||
output: string;
|
||||
}
|
||||
|
||||
export interface UpdateDraftBotRequest {
|
||||
bot_id: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
icon_file_id?: string;
|
||||
prompt_info?: PromptInfo;
|
||||
plugin_id_list?: PluginIdList;
|
||||
onboarding_info?: OnboardingInfo;
|
||||
voice_ids?: Array<string>;
|
||||
knowledge?: Knowledge;
|
||||
workflow_id_list?: WorkflowIdList;
|
||||
model_info_config?: ModelInfoConfig;
|
||||
suggest_reply_info?: SuggestReplyInfo;
|
||||
}
|
||||
|
||||
export interface UpdateDraftBotResponse {
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
export interface UploadReq {
|
||||
source?: string;
|
||||
bot_id?: string;
|
||||
}
|
||||
|
||||
export interface UploadResp {
|
||||
code: number;
|
||||
msg: string;
|
||||
file_data?: FileData;
|
||||
}
|
||||
|
||||
export interface Variable {
|
||||
/** 变量名 */
|
||||
keyword?: string;
|
||||
/** 默认值 */
|
||||
default_value?: string;
|
||||
/** 变量类型 */
|
||||
variable_type?: string;
|
||||
/** 变量来源 */
|
||||
channel?: string;
|
||||
/** 变量描述 */
|
||||
description?: string;
|
||||
/** 是否启用 */
|
||||
enable?: boolean;
|
||||
/** 变量默认支持在Prompt中访问,取消勾选后将不支持在Prompt中访问(仅能在Workflow中访问 */
|
||||
prompt_enable?: boolean;
|
||||
}
|
||||
|
||||
export interface Voice {
|
||||
/** 唯一id */
|
||||
voice_id?: string;
|
||||
/** 音色语种code */
|
||||
language_code?: string;
|
||||
}
|
||||
|
||||
export interface VoiceData {
|
||||
/** 唯一id */
|
||||
id?: string;
|
||||
/** 音色语种code */
|
||||
language_code?: string;
|
||||
/** 音色语种名称 */
|
||||
language_name?: string;
|
||||
/** 音色名称 */
|
||||
name?: string;
|
||||
/** 音色 style_id */
|
||||
style_id?: string;
|
||||
/** 预览文本内容 */
|
||||
preview_text?: string;
|
||||
/** 预览音色内容 */
|
||||
preview_audio?: string;
|
||||
}
|
||||
|
||||
export interface WorkflowIdInfo {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface WorkflowIdList {
|
||||
ids?: Array<WorkflowIdInfo>;
|
||||
}
|
||||
|
||||
export interface WorkflowInfo {
|
||||
/** workflow_id */
|
||||
id?: string;
|
||||
/** workflow名称 */
|
||||
name?: string;
|
||||
/** workflow描述 */
|
||||
description?: string;
|
||||
/** workflow图片url */
|
||||
icon_url?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
6037
frontend/packages/arch/idl/src/auto-generated/bytefaas_api/index.ts
Normal file
6037
frontend/packages/arch/idl/src/auto-generated/bytefaas_api/index.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,776 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface AdminCreateUpdateFunctionBatchTaskRequest {
|
||||
clusters: Array<AdminUpdateFunctionBatchTaskClusterParams>;
|
||||
runtime: string;
|
||||
target_image: string;
|
||||
/** strategy of upgrade image, enum value: [ only_once, always ] */
|
||||
strategy: string;
|
||||
rolling_step?: number;
|
||||
/** envs array */
|
||||
format_envs?: Array<common.FormatEnvs>;
|
||||
/** will skip for approval while critical is true */
|
||||
critical?: boolean;
|
||||
auto_start?: boolean;
|
||||
/** Description for this upgrade, will append to lark message card */
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface AdminCreateUpdateFunctionBatchTaskResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface AdminGetAllEtcdSettingsRequest {
|
||||
cell: string;
|
||||
region: string;
|
||||
}
|
||||
|
||||
export interface AdminGetAllEtcdSettingsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<EtcdSetting>;
|
||||
}
|
||||
|
||||
export interface AdminGetAvailableCellsRequest {
|
||||
region: string;
|
||||
}
|
||||
|
||||
export interface AdminGetAvailableCellsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<string>;
|
||||
}
|
||||
|
||||
export interface AdminGetBaseImageByRuntimeAndIdRequest {
|
||||
runtime: string;
|
||||
image_id: string;
|
||||
}
|
||||
|
||||
export interface AdminGetBaseImageByRuntimeAndIdResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: FaasBaseImageInfo;
|
||||
}
|
||||
|
||||
export interface AdminGetBatchTaskRequest {
|
||||
batch_task_id?: string;
|
||||
task_type?: string;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface AdminGetBatchTaskResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<BatchTask>;
|
||||
}
|
||||
|
||||
export interface AdminGetClustersRequest {
|
||||
service_id?: string;
|
||||
function_id?: string;
|
||||
psm?: string;
|
||||
region?: string;
|
||||
runtime?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
active?: string;
|
||||
env_name?: string;
|
||||
}
|
||||
|
||||
export interface AdminGetClustersResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<BasicCluster>;
|
||||
}
|
||||
|
||||
export interface AdminGetEtcdSettingsRequest {
|
||||
setting_name: string;
|
||||
cell?: string;
|
||||
region?: string;
|
||||
}
|
||||
|
||||
export interface AdminGetEtcdSettingsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: EtcdSetting;
|
||||
}
|
||||
|
||||
export interface AdminGetParentTaskDetailRequest {
|
||||
parent_task_id: string;
|
||||
}
|
||||
|
||||
export interface AdminGetParentTaskDetailResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: ParentTask;
|
||||
}
|
||||
|
||||
export interface AdminGetParentTaskRequest {
|
||||
status?: string;
|
||||
/** enum value: mqevent/function */
|
||||
task_type?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface AdminGetParentTaskResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<ParentTask>;
|
||||
}
|
||||
|
||||
export interface AdminRollbackRequest {
|
||||
targets?: Array<AdminRollbackRequestTargetsMessage>;
|
||||
}
|
||||
|
||||
export interface AdminRollbackRequestTargetsMessage {
|
||||
/** the ID of the target rollback ticket */
|
||||
ticket_id?: string;
|
||||
}
|
||||
|
||||
export interface AdminRollbackResponse {
|
||||
code?: number;
|
||||
data?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface AdminUpdateBatchTaskRequset {
|
||||
parent_task_id?: string;
|
||||
batch_task_id?: string;
|
||||
/** enum: [ "initial", "approved", "dispatched", "skipped", "success", "failed" ] */
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface AdminUpdateBatchTaskResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: BatchTask;
|
||||
}
|
||||
|
||||
export interface AdminUpdateFunctionBatchTaskClusterParams {
|
||||
service_id: string;
|
||||
region: string;
|
||||
cluster: string;
|
||||
psm: string;
|
||||
function_id: string;
|
||||
}
|
||||
|
||||
export interface AdminUpdateParentTaskRequest {
|
||||
batch_task_id: string;
|
||||
/** enum value: pending/failed */
|
||||
status: string;
|
||||
concurrency?: number;
|
||||
}
|
||||
|
||||
export interface AdminUpdateParentTaskResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface AdminUpsertEtcdSettingRequest {
|
||||
name: string;
|
||||
value: string;
|
||||
cell: string;
|
||||
region: string;
|
||||
}
|
||||
|
||||
export interface AdminUpsertEtcdSettingResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: EtcdSetting;
|
||||
}
|
||||
|
||||
export interface AsyncBuildImageVersionsRequest {
|
||||
faas_release_form_base64: string;
|
||||
trigger_user?: string;
|
||||
}
|
||||
|
||||
export interface AsyncBuildImageVersionsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: string;
|
||||
}
|
||||
|
||||
/** basic info of cluster. */
|
||||
export interface BasicCluster {
|
||||
adaptive_concurrency_mode?: string;
|
||||
/** traffic aliases */
|
||||
aliases?: Record<string, common.Alias>;
|
||||
/** restricted access, only open to administrators. 保留字段,仅 admin 可修改 */
|
||||
async_mode?: boolean;
|
||||
/** auth switch. 鉴权开关 */
|
||||
auth_enable?: boolean;
|
||||
cell?: string;
|
||||
/** cluster name, starts with faas-. 集群名 */
|
||||
cluster: string;
|
||||
/** ID of code revision. 部署代码版本 ID */
|
||||
code_revision_id?: string;
|
||||
/** number of code revision. 部署代码版本号 */
|
||||
code_revision_number?: string;
|
||||
/** cold start switch. 冷启动开关,true 为关闭 */
|
||||
cold_start_disabled?: boolean;
|
||||
/** CORS switch. CORS 开关 */
|
||||
cors_enable?: boolean;
|
||||
created_at: string;
|
||||
enable_colocate_scheduling?: boolean;
|
||||
enable_scale_optimise?: boolean;
|
||||
enable_scale_strategy?: boolean;
|
||||
env_name: string;
|
||||
/** exclusive mode. 独占模式 */
|
||||
exclusive_mode?: boolean;
|
||||
format_envs?: Array<common.FormatEnvs>;
|
||||
function_id: string;
|
||||
/** GDPR switch. GDPR 鉴权开关 */
|
||||
gdpr_enable?: boolean;
|
||||
global_kv_namespace_ids?: Array<string>;
|
||||
handler: string;
|
||||
http_trigger_disable?: boolean;
|
||||
id: string;
|
||||
initializer: string;
|
||||
initializer_sec?: number;
|
||||
is_ipv6_only?: boolean;
|
||||
/** disable zones in a region */
|
||||
is_this_zone_disabled?: Record<string, boolean>;
|
||||
latency_sec?: number;
|
||||
lazyload?: boolean;
|
||||
max_concurrency?: number;
|
||||
memory_mb?: number;
|
||||
region: string;
|
||||
/** function reserved mode switch. 函数预留模式开关 */
|
||||
reserved_dp_enabled?: boolean;
|
||||
resource_limit?: common.ResourceLimitWithAlias;
|
||||
/** ID of revision. 版本 ID */
|
||||
revision_id?: string;
|
||||
/** number of revision. 版本号 */
|
||||
revision_number?: number;
|
||||
/** function routing strategy, enums:prefer_reserved, prefer_elastic. 函数路由调度策略 */
|
||||
routing_strategy?: string;
|
||||
/** runtime. Optional values: golang/v1,node10/v1,python3/v1,rust1/v1,java8/v1,wasm/v1,v8/v1,native/v1,native-java8/v1 */
|
||||
runtime: string;
|
||||
scale_enabled?: boolean;
|
||||
scale_threshold?: number;
|
||||
scale_type?: number;
|
||||
service_id: string;
|
||||
trace_enable?: boolean;
|
||||
updated_at: string;
|
||||
/** zone throttle log bytes */
|
||||
zone_throttle_log_bytes_per_sec?: Record<string, number>;
|
||||
/** ZTI switch. ZTI 鉴权开关 */
|
||||
zti_enable?: boolean;
|
||||
online_mode?: boolean;
|
||||
enable_runtime_file_log?: boolean;
|
||||
enable_runtime_console_log?: boolean;
|
||||
enable_runtime_stream_log?: boolean;
|
||||
enable_runtime_es_log?: boolean;
|
||||
enable_runtime_json_log?: boolean;
|
||||
enable_system_stream_log?: boolean;
|
||||
enable_system_es_log?: boolean;
|
||||
runtime_stream_log_bytes_per_sec?: number;
|
||||
system_stream_log_bytes_per_sec?: number;
|
||||
enable_reserve_frozen_instance?: boolean;
|
||||
/** overload_protect_enabled */
|
||||
overload_protect_enabled?: boolean;
|
||||
privileged?: boolean;
|
||||
}
|
||||
|
||||
export interface BatchTask {
|
||||
batch_task_id: string;
|
||||
task_id: string;
|
||||
/** json string, meta info of task, e.g.: service_id/psm/function_id */
|
||||
task_meta: string;
|
||||
/** type of task, enum value: [ function, mqevent ] */
|
||||
type: string;
|
||||
/** status of task, enum value: [ initial, reviewing, dispatched, failed, success, skipped, approved, rejected ] */
|
||||
status: string;
|
||||
/** the person who created this task */
|
||||
operator: string;
|
||||
/** all events */
|
||||
events?: Array<BatchTaskEvent>;
|
||||
dispatched_at?: string;
|
||||
approved_by?: string;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export interface BatchTaskEvent {
|
||||
name: string;
|
||||
time: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface BytecycleWebhookData {
|
||||
field_name?: string;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export interface CheckUserIsAdministratorRequest {
|
||||
user: string;
|
||||
}
|
||||
|
||||
export interface CheckUserIsAdministratorResponse {
|
||||
code?: number;
|
||||
data?: boolean;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface CreateImageVersionByAdminRequest {
|
||||
region: string;
|
||||
type: string;
|
||||
status: string;
|
||||
tag: string;
|
||||
image_id: string;
|
||||
publisher: string;
|
||||
version: string;
|
||||
changelog: string;
|
||||
branch?: string;
|
||||
commit?: string;
|
||||
alias?: string;
|
||||
canary_ratio?: number;
|
||||
extra?: ImageVersionExtra;
|
||||
published_at?: number;
|
||||
}
|
||||
|
||||
export interface CreateImageVersionByAdminResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: ImageVersion;
|
||||
}
|
||||
|
||||
export interface CreateMqEventImageVersionsByBytecycleRequest {
|
||||
Authorization: string;
|
||||
trigger_user: string;
|
||||
faas_release_form_base64: string;
|
||||
commit_id: string;
|
||||
git_mr_detail: GitMrDetail;
|
||||
}
|
||||
|
||||
export interface CreateMqEventImageVersionsByBytecycleResponse {
|
||||
status?: string;
|
||||
message?: string;
|
||||
data?: Array<BytecycleWebhookData>;
|
||||
}
|
||||
|
||||
export interface DataMessage2 {
|
||||
/** Lark Group ID */
|
||||
ID?: string;
|
||||
/** Lark Group Name */
|
||||
Name?: string;
|
||||
}
|
||||
|
||||
export interface DataMessage5 {
|
||||
/** MQ trigger announcement template content */
|
||||
content?: string;
|
||||
}
|
||||
|
||||
export interface DeleteImageVersionByIDRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface DeleteImageVersionByIDResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: ImageVersion;
|
||||
}
|
||||
|
||||
export interface EmergencyTransferItem {
|
||||
value_type?: string;
|
||||
zone?: string;
|
||||
cluster_type?: string;
|
||||
cell?: string;
|
||||
region?: string;
|
||||
dps?: number;
|
||||
}
|
||||
|
||||
export interface EtcdSetting {
|
||||
name: string;
|
||||
value: string;
|
||||
updated_by?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export interface FaasBaseImageInfo {
|
||||
build_time_stamp: string;
|
||||
image_id: string;
|
||||
runtime: string;
|
||||
/** repo name */
|
||||
runtime_agent: ScmVersionInfo;
|
||||
/** repo name */
|
||||
runtime_agent_dp: ScmVersionInfo;
|
||||
}
|
||||
|
||||
export interface FuncCommonScaleSettings {
|
||||
scale_down_max_step?: number;
|
||||
scale_up_max_step?: number;
|
||||
continuous_scale_down_min_interval_sec?: number;
|
||||
/** 缩容步长比例 */
|
||||
scale_down_max_step_ratio?: number;
|
||||
/** 扩容步长比例 */
|
||||
scale_up_max_step_ratio?: number;
|
||||
/** 消费托管是否开启rebalance敏感型 */
|
||||
mqapp_rebalance_sensitive?: boolean;
|
||||
}
|
||||
|
||||
export interface FuncConcurrencyScaleSettings {
|
||||
concurrency_scale_out_threshold?: number;
|
||||
concurrency_scale_in_threshold?: number;
|
||||
concurrency_scale_target?: number;
|
||||
concurrency_continuous_down_dur_sec?: number;
|
||||
}
|
||||
|
||||
export interface FuncMEMScaleSettings {
|
||||
mem_scale_out_threshold?: number;
|
||||
mem_scale_in_threshold?: number;
|
||||
mem_scale_target?: number;
|
||||
}
|
||||
|
||||
export interface FuncScaleSettings {
|
||||
scale_set_name?: string;
|
||||
cpu_scale_settings?: common.FuncCPUScaleSettings;
|
||||
mem_scale_settings?: FuncMEMScaleSettings;
|
||||
concurrency_scale_settings?: FuncConcurrencyScaleSettings;
|
||||
fast_scale_settings?: common.FuncFastScaleSettings;
|
||||
predictive_scaling_setting?: common.FuncPredictiveScalingSettings;
|
||||
lag_scale_settings?: common.FuncLagScaleSettings;
|
||||
cpu_zone_scale_settings?: Record<string, common.FuncCPUScaleSettings>;
|
||||
common_scale_settings?: FuncCommonScaleSettings;
|
||||
}
|
||||
|
||||
export interface getAllAdministratorRequest {}
|
||||
|
||||
export interface GetAllAdministratorResponse {
|
||||
code?: number;
|
||||
data?: Array<string>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetEmergencyTransferMetricsRequest {
|
||||
cells?: Array<string>;
|
||||
cluster_types?: Array<string>;
|
||||
regions?: Array<string>;
|
||||
value_types?: Array<string>;
|
||||
zones?: Array<string>;
|
||||
}
|
||||
|
||||
export interface GetEmergencyTransferMetricsResponse {
|
||||
items?: Array<EmergencyTransferItem>;
|
||||
}
|
||||
|
||||
export interface GetImageVersionsRequest {
|
||||
region?: string;
|
||||
type?: string;
|
||||
tag?: string;
|
||||
limit?: string;
|
||||
offset?: string;
|
||||
with_history_images?: boolean;
|
||||
version_number?: string;
|
||||
}
|
||||
|
||||
export interface GetImageVersionsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<ImageVersion>;
|
||||
}
|
||||
|
||||
export interface getLarkBotChatGroupsRequest {}
|
||||
|
||||
export interface GetLarkBotChatGroupsResponse {
|
||||
code?: number;
|
||||
data?: Array<DataMessage2>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface getMQTriggerTemplateRequest {}
|
||||
|
||||
export interface GetMQTriggerTemplateResponse {
|
||||
code?: number;
|
||||
data?: DataMessage5;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetReleaseOverviewRequest {
|
||||
/** 格式 2024-01-04T06:49:59+00:00 */
|
||||
start_time?: string;
|
||||
/** 格式 2024-01-04T06:49:59+00:00 */
|
||||
end_time?: string;
|
||||
}
|
||||
|
||||
export interface GetReleaseOverviewResponse {
|
||||
code?: number;
|
||||
data?: Array<ReleaseOverviewItem>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetServiceTreesRequest {}
|
||||
|
||||
export interface GetServiceTreesResponse {
|
||||
code: number;
|
||||
data: Array<ServiceTreeNode>;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface GetTicketsByFilterRequest {
|
||||
category?: string;
|
||||
change_type?: string;
|
||||
cluster?: string;
|
||||
/** ID of function. */
|
||||
function_id?: string;
|
||||
/** ID of ticket. */
|
||||
id?: string;
|
||||
max_create_time?: string;
|
||||
min_create_time?: string;
|
||||
/** If set true, only return admin tickets */
|
||||
only_admin_ticket?: boolean;
|
||||
/** Parent ID of a ticket, ie, the ID of a batch ticket */
|
||||
parent_id?: string;
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** status of ticket. Enums: "pending","running","building","canceling","failed","success","canceled" */
|
||||
status?: string;
|
||||
trigger_id?: string;
|
||||
trigger_type?: string;
|
||||
/** ticket type. */
|
||||
type?: string;
|
||||
/** pagination query, specify the number for one page */
|
||||
limit?: number;
|
||||
/** pagination query, specify the offset, default 0 */
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface GetTicketsByFilterResponse {
|
||||
code?: number;
|
||||
data?: Array<common.Ticket>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetUnusedResourceMetricsRequest {
|
||||
regions?: Array<string>;
|
||||
cells?: Array<string>;
|
||||
zones?: Array<string>;
|
||||
node_levels?: Array<string>;
|
||||
service_levels?: Array<string>;
|
||||
item_types?: Array<string>;
|
||||
function_ids?: Array<string>;
|
||||
trigger_ids?: Array<string>;
|
||||
scale_types?: Array<string>;
|
||||
strategies?: Array<string>;
|
||||
start_timestamp?: Int64;
|
||||
end_timestamp?: Int64;
|
||||
top_k?: string;
|
||||
}
|
||||
|
||||
export interface GetUnusedResourceMetricsResponse {
|
||||
items?: Array<UnusedResourceItem>;
|
||||
}
|
||||
|
||||
export interface GitMrDetail {
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface ImageVersion {
|
||||
id: string;
|
||||
region: string;
|
||||
type: string;
|
||||
status: string;
|
||||
tag: string;
|
||||
image_id: string;
|
||||
pulisher: string;
|
||||
version: string;
|
||||
branch?: string;
|
||||
commit?: string;
|
||||
canary_ratio?: string;
|
||||
changelog?: string;
|
||||
alias?: string;
|
||||
extra?: ImageVersionExtra;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
published_at?: string;
|
||||
is_history_data?: boolean;
|
||||
counter?: number;
|
||||
}
|
||||
|
||||
export interface ImageVersionExtra {
|
||||
sdk_version?: string;
|
||||
}
|
||||
|
||||
export interface ParentTask {
|
||||
batch_task_id: string;
|
||||
operator?: string;
|
||||
type?: string;
|
||||
/** enum value: pending/running/failed/success */
|
||||
status?: string;
|
||||
concurrency?: number;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
updated_by?: string;
|
||||
status_group?: Array<ParentTaskStatusGroup>;
|
||||
total?: number;
|
||||
}
|
||||
|
||||
export interface ParentTaskStatusGroup {
|
||||
status: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface RecoverEmergencyTransferRequest {
|
||||
function_id?: string;
|
||||
region?: string;
|
||||
resource_type?: string;
|
||||
trigger_id?: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface RecoverEmergencyTransferResponse {
|
||||
code?: number;
|
||||
data?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface ReleaseOverviewItem {
|
||||
count?: number;
|
||||
error_code?: string;
|
||||
rate?: number;
|
||||
status_message?: string;
|
||||
total?: number;
|
||||
}
|
||||
|
||||
export interface ScmVersionInfo {
|
||||
version: string;
|
||||
type: string;
|
||||
desc: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface SendNotificationsToLarkBotGroupsRequest {
|
||||
/** Content of the notification message */
|
||||
content?: string;
|
||||
receiver_ids?: Array<string>;
|
||||
}
|
||||
|
||||
export interface SendNotificationsToLarkBotGroupsResponse {
|
||||
code?: number;
|
||||
data?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface ServiceTreeNode {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface SkipCheckForBatchTaskRequest {
|
||||
parent_id: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface SkipCheckForBatchTaskResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface SyncImageVersionsRequest {
|
||||
from_region: string;
|
||||
to_regions: Array<string>;
|
||||
tags: Array<string>;
|
||||
types: Array<string>;
|
||||
insert?: boolean;
|
||||
image_version_number?: string;
|
||||
image_version_type?: string;
|
||||
}
|
||||
|
||||
export interface SyncImageVersionsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<ImageVersion>;
|
||||
}
|
||||
|
||||
export interface TransferFuncScaleSettings {
|
||||
expired_time?: Int64;
|
||||
cpu_scale_settings?: common.FuncCPUScaleSettings;
|
||||
mem_scale_settings?: common.MQEventMEMScaleSettings;
|
||||
}
|
||||
|
||||
export interface TransferMQEventScaleSettings {
|
||||
expired_time?: Int64;
|
||||
cpu_scale_settings?: common.MQEventCPUScaleSettings;
|
||||
mem_scale_settings?: common.MQEventMEMScaleSettings;
|
||||
}
|
||||
|
||||
export interface UnusedResourceItem {
|
||||
function_id?: string;
|
||||
trigger_id?: string;
|
||||
item_type?: string;
|
||||
region?: string;
|
||||
cell?: string;
|
||||
zone?: string;
|
||||
node_level?: string;
|
||||
service_level?: string;
|
||||
scale_type?: string;
|
||||
scale_settings?: FuncScaleSettings;
|
||||
transfer_scale_settings?: common.FuncCPUScaleSettings;
|
||||
transfer_mem_scale_settings?: FuncMEMScaleSettings;
|
||||
mqevent_scale_settings?: common.MQEventScaleSettings;
|
||||
transfer_mqevent_cpu_scale_settings?: common.MQEventCPUScaleSettings;
|
||||
transfer_mqevent_mem_scale_settings?: common.MQEventMEMScaleSettings;
|
||||
dps?: number;
|
||||
}
|
||||
|
||||
export interface UpdateEmergencyTransferRequest {
|
||||
function_id: string;
|
||||
region: string;
|
||||
resource_type: string;
|
||||
trigger_id: string;
|
||||
transfer_func_scale_settings?: TransferFuncScaleSettings;
|
||||
transfer_mq_event_scale_settings?: TransferMQEventScaleSettings;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface UpdateEmergencyTransferResponse {
|
||||
code?: number;
|
||||
data?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateImageVersionByIDRequest {
|
||||
id: string;
|
||||
changelog?: string;
|
||||
status?: string;
|
||||
tag?: string;
|
||||
canary_ratio?: number;
|
||||
published_at?: number;
|
||||
alias?: string;
|
||||
extra?: ImageVersionExtra;
|
||||
}
|
||||
|
||||
export interface UpdateImageVersionByIDResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: ImageVersion;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,281 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface Agent {
|
||||
/** Unique identifier for the agent */
|
||||
agent_id: string;
|
||||
/** Service ID associated with the agent */
|
||||
service_id: string;
|
||||
/** Service PSM identifier */
|
||||
psm: string;
|
||||
/** Environment name */
|
||||
env_name: string;
|
||||
/** Name of the agent */
|
||||
name: string;
|
||||
/** Description of the agent */
|
||||
description?: string;
|
||||
/** Owner of the agent */
|
||||
owner?: string;
|
||||
/** List of subscribers to the agent */
|
||||
subscribers?: Array<string>;
|
||||
/** Runtime environment for the agent */
|
||||
runtime?: string;
|
||||
/** Timestamp when the agent was created */
|
||||
created_at?: string;
|
||||
/** Timestamp when the agent was last updated */
|
||||
updated_at?: string;
|
||||
/** Deprecated: status of the agent */
|
||||
status?: string;
|
||||
/** Deprecated: extra information about the agent */
|
||||
extras?: AgentExtras;
|
||||
/** Status of extra steps in the agent lifecycle */
|
||||
extra_steps_status?: string;
|
||||
/** Link to details about extra steps */
|
||||
extra_steps_link?: string;
|
||||
}
|
||||
|
||||
export interface AgentExtras {
|
||||
/** Error message encountered during agent creation */
|
||||
create_error?: string;
|
||||
/** List of steps performed during agent creation */
|
||||
create_steps?: Array<AsyncCreateStep>;
|
||||
}
|
||||
|
||||
export interface AsyncCreateAgentRequest {
|
||||
/** PSM identifier */
|
||||
psm: string;
|
||||
/** Name of the agent to create */
|
||||
name: string;
|
||||
/** Description of the agent */
|
||||
description?: string;
|
||||
/** Parent PSM ID */
|
||||
psm_parent_id: number;
|
||||
/** Owner of the agent */
|
||||
owner?: string;
|
||||
/** Region where the agent is deployed */
|
||||
region: string;
|
||||
/** Runtime environment for the agent */
|
||||
runtime: string;
|
||||
/** List of environment variables for the agent */
|
||||
format_envs?: Array<common.FormatEnvs>;
|
||||
/** Create git repo and SCM repo for the user */
|
||||
git_group: string;
|
||||
/** git repository name */
|
||||
git_repo: string;
|
||||
/** scm repository name */
|
||||
scm_repo: string;
|
||||
/** Template name used for the agent */
|
||||
template_name: string;
|
||||
/** List of admin users for the agent */
|
||||
admins?: string;
|
||||
/** List of authorizers for the agent */
|
||||
authorizers?: string;
|
||||
/** Service level of the agent */
|
||||
service_level?: string;
|
||||
/** Purpose of the service */
|
||||
service_purpose?: string;
|
||||
}
|
||||
|
||||
export interface AsyncCreateAgentResponse {
|
||||
/** Response code for the async create agent operation */
|
||||
code?: number;
|
||||
/** Error message if the operation failed */
|
||||
error?: string;
|
||||
/** Data about the async creation process */
|
||||
data?: AsyncCreateAgentResponseData;
|
||||
}
|
||||
|
||||
export interface AsyncCreateAgentResponseData {
|
||||
/** Unique identifier for the async creation process */
|
||||
creation_id?: string;
|
||||
}
|
||||
|
||||
export interface AsyncCreateAgentStatus {
|
||||
/** Unique identifier for the async creation process */
|
||||
creation_id: string;
|
||||
/** Current status of the async creation process */
|
||||
status: string;
|
||||
/** List of steps in the async creation process */
|
||||
steps?: Array<AsyncCreateStep>;
|
||||
/** Resulting agent, only set when status is success */
|
||||
result?: Agent;
|
||||
}
|
||||
|
||||
export interface AsyncCreateStep {
|
||||
/** Unique identifier for the step */
|
||||
step_id?: string;
|
||||
/** Name of the step in the async creation process */
|
||||
step_name?: string;
|
||||
/** Description of what this step does */
|
||||
description?: string;
|
||||
/** Current status of the step */
|
||||
status?: string;
|
||||
/** Additional details about the step's execution */
|
||||
detail?: string;
|
||||
/** Time when the step was created */
|
||||
create_time?: string;
|
||||
/** Time when the step started */
|
||||
start_time?: string;
|
||||
/** Time when the step ended */
|
||||
end_time?: string;
|
||||
/** Error message if the step failed */
|
||||
error_message?: string;
|
||||
}
|
||||
|
||||
export interface CreateAgentRequest {
|
||||
/** PSM identifier */
|
||||
psm: string;
|
||||
/** Name of the agent to create */
|
||||
name: string;
|
||||
/** Description of the agent */
|
||||
description?: string;
|
||||
/** Parent PSM ID */
|
||||
psm_parent_id: number;
|
||||
/** Owner of the agent */
|
||||
owner?: string;
|
||||
/** Region where the agent is deployed */
|
||||
region: string;
|
||||
/** Runtime environment for the agent */
|
||||
runtime: string;
|
||||
/** List of environment variables for the agent */
|
||||
format_envs?: Array<common.FormatEnvs>;
|
||||
/** Source type for the agent */
|
||||
source_type: string;
|
||||
/** Source identifier for the agent */
|
||||
source: string;
|
||||
/** List of dependencies for the agent */
|
||||
dependency?: Array<common.Dependency>;
|
||||
/** List of admin users for the agent */
|
||||
admins?: string;
|
||||
/** List of authorizers for the agent */
|
||||
authorizers?: string;
|
||||
/** Service level of the agent */
|
||||
service_level?: string;
|
||||
/** Purpose of the service */
|
||||
service_purpose?: string;
|
||||
/** Git group for the agent's repository */
|
||||
git_group?: string;
|
||||
/** Git repository name */
|
||||
git_repo?: string;
|
||||
/** SCM repository name */
|
||||
scm_repo?: string;
|
||||
/** Template name used for the agent */
|
||||
template_name?: string;
|
||||
/** Programming language used by the agent */
|
||||
language?: string;
|
||||
}
|
||||
|
||||
export interface CreateAgentResponse {
|
||||
/** Response code for the create agent operation */
|
||||
code?: number;
|
||||
/** Error message if the operation failed */
|
||||
error?: string;
|
||||
/** Created agent data */
|
||||
data?: Agent;
|
||||
}
|
||||
|
||||
export interface DeleteAgentRequest {
|
||||
/** Unique identifier for the agent to delete */
|
||||
agent_id: string;
|
||||
}
|
||||
|
||||
export interface GetAgentRequest {
|
||||
/** Unique identifier for the agent */
|
||||
agent_id: string;
|
||||
}
|
||||
|
||||
export interface GetAgentResponse {
|
||||
/** Response code for the get agent operation */
|
||||
code?: number;
|
||||
/** Error message if the operation failed */
|
||||
error?: string;
|
||||
/** Agent data returned in the response */
|
||||
data?: Agent;
|
||||
}
|
||||
|
||||
export interface GetAsyncCreateAgentStatusRequest {
|
||||
/** Unique identifier for the async creation process */
|
||||
creation_id: string;
|
||||
}
|
||||
|
||||
export interface GetAsyncCreateAgentStatusResponse {
|
||||
/** Response code for the get async create agent status operation */
|
||||
code?: number;
|
||||
/** Error message if the operation failed */
|
||||
error?: string;
|
||||
/** Data about the async creation status */
|
||||
data?: AsyncCreateAgentStatus;
|
||||
}
|
||||
|
||||
export interface ListAgentsRequest {
|
||||
/** Whether to list all agents */
|
||||
all?: string;
|
||||
/** Environment name to filter agents, e.g. prod/ppe/boe_feature */
|
||||
env?: string;
|
||||
/** Limit for pagination */
|
||||
limit?: number;
|
||||
/** Filter agents by name */
|
||||
name?: string;
|
||||
/** Offset for pagination */
|
||||
offset?: number;
|
||||
/** Filter agents by owner */
|
||||
owner?: string;
|
||||
/** Prefix search across multiple fields */
|
||||
search?: string;
|
||||
/** Type of search: all, admin, own, subscribe */
|
||||
search_type?: string;
|
||||
/** Field to sort agents by */
|
||||
sort_by?: string;
|
||||
/** Supported search fields */
|
||||
search_fields?: string;
|
||||
}
|
||||
|
||||
export interface ListAgentsResponse {
|
||||
/** Response code for the list agents operation */
|
||||
code?: number;
|
||||
/** List of agents returned in the response */
|
||||
data?: Array<Agent>;
|
||||
/** Error message if the operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateAgentRequest {
|
||||
/** Unique identifier for the agent */
|
||||
agent_id: string;
|
||||
/** New name for the agent */
|
||||
name?: string;
|
||||
/** New description for the agent */
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface UpdateAgentResponse {
|
||||
/** Response code for the update agent operation */
|
||||
code?: number;
|
||||
/** Error message if the operation failed */
|
||||
error?: string;
|
||||
/** Updated agent data */
|
||||
data?: Agent;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** alarm model */
|
||||
export interface Alarm {
|
||||
/** Notification methods for the alarm */
|
||||
alarm_methods?: string;
|
||||
/** Interval (in seconds or minutes) between alarm checks */
|
||||
check_interval?: number;
|
||||
/** Name or ID of the cluster associated with the alarm */
|
||||
cluster?: string;
|
||||
/** Time when the alarm ends (ISO8601 or timestamp string) */
|
||||
end_time?: string;
|
||||
/** Suggested actions to handle the alarm */
|
||||
handle_suggestion?: string;
|
||||
/** Unique identifier for the alarm */
|
||||
id?: number;
|
||||
/** User who last updated the alarm */
|
||||
last_updated_by?: string;
|
||||
/** Severity level of the alarm */
|
||||
level?: string;
|
||||
/** Name of the alarm */
|
||||
name?: string;
|
||||
/** PSM identifier */
|
||||
psm?: string;
|
||||
/** Rule expression or condition for the alarm */
|
||||
rule?: string;
|
||||
/** Alias for the alarm rule */
|
||||
rule_alias?: string;
|
||||
/** Format or type of the rule */
|
||||
rule_format?: string;
|
||||
/** Time when the alarm starts (ISO8601 or timestamp string) */
|
||||
start_time?: string;
|
||||
/** Current status of the alarm */
|
||||
status?: string;
|
||||
/** Threshold value for triggering the alarm */
|
||||
threshold?: number;
|
||||
/** Unit for the threshold value */
|
||||
threshold_unit?: string;
|
||||
/** Type/category of the alarm */
|
||||
type?: string;
|
||||
/** ID of the unit (subsystem/component) related to the alarm */
|
||||
unit_id?: number;
|
||||
/** Last update time for the alarm (ISO8601 or timestamp string) */
|
||||
updated_at?: string;
|
||||
/** Zone or availability zone for the alarm */
|
||||
zone?: string;
|
||||
}
|
||||
|
||||
export interface GetClusterAlarmRequest {
|
||||
/** Name or ID of the cluster */
|
||||
cluster: string;
|
||||
/** Region of the cluster */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetClusterAlarmResponse {
|
||||
/** Response code for the get cluster alarm operation */
|
||||
code?: number;
|
||||
/** List of alarms for the cluster */
|
||||
data?: Array<Alarm>;
|
||||
/** Error message if the operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateClusterAlarmRequest {
|
||||
/** ID of the alarm to update */
|
||||
alarm_id?: string;
|
||||
/** Notification methods for the alarm */
|
||||
alarm_methods?: string;
|
||||
/** Name or ID of the cluster */
|
||||
cluster: string;
|
||||
/** ID of the function related to the alarm */
|
||||
function_id?: string;
|
||||
/** Severity level of the alarm */
|
||||
level?: string;
|
||||
/** Region of the cluster */
|
||||
region: string;
|
||||
/** Alias for the alarm rule */
|
||||
rule_alias?: string;
|
||||
/** Format or type of the rule */
|
||||
rule_format?: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Status of the alarm */
|
||||
status?: string;
|
||||
/** Threshold value for triggering the alarm */
|
||||
threshold?: number;
|
||||
}
|
||||
|
||||
export interface UpdateClusterAlarmResponse {
|
||||
/** Response code for the update cluster alarm operation */
|
||||
code?: number;
|
||||
/** Updated alarm data */
|
||||
data?: Alarm;
|
||||
/** Error message if the operation failed */
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,175 @@
|
||||
/*
|
||||
* 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 AsyncRequestRecordResponse {
|
||||
/** Time when the async request was created */
|
||||
created_at?: string;
|
||||
/** Type of event that triggered the async request */
|
||||
event_type?: string;
|
||||
/** Time when execution of the request ended */
|
||||
execute_end_time?: string;
|
||||
/** Time when execution of the request started */
|
||||
execute_start_time?: string;
|
||||
/** Duration of execution as a string */
|
||||
execution_duration_str?: string;
|
||||
/** Time when the request finished */
|
||||
finished_time?: string;
|
||||
/** ID of the function invoked by the request */
|
||||
function_id?: string;
|
||||
/** Link to Kibana logs for the request */
|
||||
kibana_link?: string;
|
||||
/** Unique identifier for the request */
|
||||
request_id?: string;
|
||||
/** Metadata about the response */
|
||||
response_meta?: AsyncRequestRecordResponseResponseMetaMessage2;
|
||||
/** ID of the function revision used */
|
||||
revision_id?: string;
|
||||
/** Status of the async task */
|
||||
task_status?: string;
|
||||
/** Time when the record was last updated */
|
||||
updated_at?: string;
|
||||
/** Time when the user invoked the request */
|
||||
user_invoke_time?: string;
|
||||
/** User or system that invoked the request */
|
||||
invoker?: string;
|
||||
/** Type of async task */
|
||||
task_type?: string;
|
||||
/** Actual command run for the request */
|
||||
real_run_cmd?: string;
|
||||
/** Maximum CPU usage during execution */
|
||||
max_cpu_usage?: number;
|
||||
/** Maximum memory usage during execution */
|
||||
max_mem_usage?: number;
|
||||
}
|
||||
|
||||
export interface AsyncRequestRecordResponseResponseMetaMessage2 {
|
||||
/** Error code returned by the async request */
|
||||
error_code?: string;
|
||||
/** Error message returned by the async request */
|
||||
error_message?: string;
|
||||
/** Body of the response from the async request */
|
||||
response_body?: string;
|
||||
/** Status of the response */
|
||||
response_status?: string;
|
||||
}
|
||||
|
||||
export interface DataMessage71 {
|
||||
/** Time when the async request was created */
|
||||
created_at?: string;
|
||||
/** Type of event that triggered the async request */
|
||||
event_type?: string;
|
||||
/** Time when execution of the request ended */
|
||||
execute_end_time?: string;
|
||||
/** Time when execution of the request started */
|
||||
execute_start_time?: string;
|
||||
/** Duration of execution as a string */
|
||||
execution_duration_str?: string;
|
||||
/** Time when the request finished */
|
||||
finished_time?: string;
|
||||
/** ID of the function invoked by the request */
|
||||
function_id?: string;
|
||||
/** Link to Kibana logs for the request */
|
||||
kibana_link?: string;
|
||||
/** Unique identifier for the request */
|
||||
request_id?: string;
|
||||
/** Metadata about the response */
|
||||
response_meta?: AsyncRequestRecordResponseResponseMetaMessage2;
|
||||
/** ID of the function revision used */
|
||||
revision_id?: string;
|
||||
/** Status of the async task */
|
||||
task_status?: string;
|
||||
/** Time when the record was last updated */
|
||||
updated_at?: string;
|
||||
/** Time when the user invoked the request */
|
||||
user_invoke_time?: string;
|
||||
/** User or system that invoked the request */
|
||||
invoker?: string;
|
||||
/** Type of async task */
|
||||
task_type?: string;
|
||||
/** Actual command run for the request */
|
||||
real_run_cmd?: string;
|
||||
/** Maximum CPU usage during execution */
|
||||
max_cpu_usage?: number;
|
||||
/** Maximum memory usage during execution */
|
||||
max_mem_usage?: number;
|
||||
/** Name of the pod where the request was executed */
|
||||
pod_name?: string;
|
||||
}
|
||||
|
||||
export interface GetAsyncRequestRequest {
|
||||
/** cluster of service */
|
||||
cluster: string;
|
||||
/** region of service */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** the request id you want */
|
||||
'x-bytefaas-request-id': string;
|
||||
}
|
||||
|
||||
export interface GetAsyncRequestResponse {
|
||||
code?: number;
|
||||
data?: AsyncRequestRecordResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface KillAsyncRequestsRequest {
|
||||
/** cluster of service */
|
||||
cluster: string;
|
||||
/** region of service */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** the request id you want to kill */
|
||||
'x-bytefaas-request-id': string;
|
||||
}
|
||||
|
||||
export interface KillAsyncRequestsResponse {}
|
||||
|
||||
export interface ListAsyncRequestsRequest {
|
||||
/** begin_time */
|
||||
begin_time?: string;
|
||||
/** cluster of service */
|
||||
cluster: string;
|
||||
/** end_time */
|
||||
end_time?: string;
|
||||
/** limit */
|
||||
limit?: string;
|
||||
/** offset */
|
||||
offset?: string;
|
||||
/** region of service */
|
||||
region: string;
|
||||
/** request_id */
|
||||
request_id?: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** task_status */
|
||||
task_status?: string;
|
||||
}
|
||||
|
||||
export interface ListAsyncRequestsResponse {
|
||||
code?: number;
|
||||
data?: Array<DataMessage71>;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface AbortBuildRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region */
|
||||
region: string;
|
||||
/** Number of revision */
|
||||
revision_number: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface AbortBuildResponse {
|
||||
code?: number;
|
||||
data?: common.Revision;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface BuildLatestRevisionRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface BuildLatestRevisionResponse {
|
||||
code?: number;
|
||||
data?: common.Revision;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface BuildServiceRevisionRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region */
|
||||
region: string;
|
||||
/** Number of revision */
|
||||
revision_number: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface BuildServiceRevisionResponse {
|
||||
code?: number;
|
||||
data?: common.Revision;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetICMBaseImagesListRequest {}
|
||||
|
||||
export interface GetICMBaseImagesListResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<ICMBaseImage>;
|
||||
}
|
||||
|
||||
export interface ICMBaseImage {
|
||||
/** Version of the base image */
|
||||
base_version?: string;
|
||||
/** Name of the base image */
|
||||
name?: string;
|
||||
/** Labels associated with the base image */
|
||||
labels?: Array<string>;
|
||||
/** Unique identifier for the image */
|
||||
image_id?: number;
|
||||
/** Whether the image is recommended for use */
|
||||
recommend?: boolean;
|
||||
/** Whether the image is end-of-life (EOL) */
|
||||
eol?: boolean;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
* 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 BurstProtectorConfig {
|
||||
/** Maximum number of instances allowed during burst period */
|
||||
instance_quota: number;
|
||||
/** Time period for quota enforcement (seconds) */
|
||||
period: number;
|
||||
/** Service to redirect traffic to when burst is detected */
|
||||
redirect_service?: string;
|
||||
/** Cluster to redirect traffic to when burst is detected */
|
||||
redirect_cluster?: string;
|
||||
/** IDC (data center) to redirect traffic to when burst is detected */
|
||||
redirect_idc?: string;
|
||||
/** Stage of burst protection (e.g., development, production) */
|
||||
stage: string;
|
||||
/** Ratio for burst protection threshold calculation */
|
||||
ratio: number;
|
||||
}
|
||||
|
||||
export interface BurstProtectorWithMetas {
|
||||
/** Method name for burst protection */
|
||||
method: string;
|
||||
/** Cluster making the call */
|
||||
caller_cluster: string;
|
||||
/** Cluster receiving the call */
|
||||
callee_cluster: string;
|
||||
/** Quota of instances allowed */
|
||||
instance_quota: number;
|
||||
/** Time period for quota enforcement (seconds or minutes) */
|
||||
period: number;
|
||||
/** Service to redirect to if burst is detected */
|
||||
redirect_service?: string;
|
||||
/** Cluster to redirect to if burst is detected */
|
||||
redirect_cluster?: string;
|
||||
/** IDC (data center) to redirect to if burst is detected */
|
||||
redirect_idc?: string;
|
||||
/** Ratio for burst protection */
|
||||
ratio: number;
|
||||
}
|
||||
|
||||
export interface DeleteBurstProtectorRequest {
|
||||
/** Delete all burst protectors */
|
||||
is_all?: boolean;
|
||||
/** List of PSMs to delete */
|
||||
psms?: string;
|
||||
/** Single PSM to delete */
|
||||
psm?: string;
|
||||
/** Cluster to delete */
|
||||
cluster?: string;
|
||||
}
|
||||
|
||||
export interface DeleteBurstProtectorResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
/** Success or failure summary */
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export interface GetBurstProtectorSwitchRequest {
|
||||
/** PSM to fetch */
|
||||
psm?: string;
|
||||
/** Cluster to fetch */
|
||||
cluster?: string;
|
||||
}
|
||||
|
||||
export interface GetBurstProtectorSwitchResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
/** Burst protector configurations */
|
||||
data?: Array<BurstProtectorWithMetas>;
|
||||
}
|
||||
|
||||
export interface PutBurstProtectorSwitchRequest {
|
||||
/** PSM to update */
|
||||
psm: string;
|
||||
/** Cluster to update */
|
||||
cluster: string;
|
||||
/** Caller PSM */
|
||||
caller_psm?: string;
|
||||
/** Caller cluster */
|
||||
caller_cluster?: string;
|
||||
/** Method */
|
||||
method?: string;
|
||||
/** Burst protector configuration */
|
||||
config: BurstProtectorConfig;
|
||||
}
|
||||
|
||||
export interface PutBurstProtectorSwitchResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
/** Updated configuration */
|
||||
data?: BurstProtectorConfig;
|
||||
}
|
||||
|
||||
export interface SwitchBurstProtectorRequest {
|
||||
/** Switch stage for all PSMs */
|
||||
is_all?: boolean;
|
||||
/** List of PSMs to switch */
|
||||
psms?: string;
|
||||
/** Single PSM to switch */
|
||||
psm?: string;
|
||||
/** Cluster to switch */
|
||||
cluster?: string;
|
||||
/** Stage to switch to */
|
||||
stage: string;
|
||||
/** Debug mode */
|
||||
debug?: boolean;
|
||||
}
|
||||
|
||||
export interface SwitchBurstProtectorResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
/** Success or failure summary */
|
||||
message?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CreateCodeRevisionRequest {
|
||||
/** List of code dependencies */
|
||||
dependency?: Array<common.Dependency>;
|
||||
/** Deployment method. 部署方式
|
||||
How the code revision is deployed. Enums: online-edit, scm, command-line, online-edit, image, lego */
|
||||
deploy_method: string;
|
||||
/** Description of the code revision */
|
||||
description?: string;
|
||||
/** Whether build install is disabled, true means disable */
|
||||
disable_build_install?: boolean;
|
||||
/** Handler function name */
|
||||
handler?: string;
|
||||
/** Initializer function name */
|
||||
initializer?: string;
|
||||
/** Whether lazy loading is enabled */
|
||||
lazyload?: boolean;
|
||||
/** Code revision number, generated by server if empty. 版本号
|
||||
Unique number for the code revision */
|
||||
number?: string;
|
||||
/** Protocol used by the code revision */
|
||||
protocol?: string;
|
||||
/** Command to run the code revision */
|
||||
run_cmd?: string;
|
||||
/** Runtime environment */
|
||||
runtime?: string;
|
||||
/** Port for the runtime container */
|
||||
runtime_container_port?: number;
|
||||
/** Debug port for the runtime container */
|
||||
runtime_debug_container_port?: number;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Source of code revision. 代码版本 URI
|
||||
URI for the code revision source */
|
||||
source: string;
|
||||
/** Source type of code revision. 代码版本类型。Enums: url, tos, scm, ceph, image, image-scm, private-tos, lego */
|
||||
source_type: string;
|
||||
/** Whether image lazy loading is enabled */
|
||||
open_image_lazyload?: boolean;
|
||||
/** Additional container ports for runtime */
|
||||
runtime_other_container_ports?: Array<number>;
|
||||
}
|
||||
|
||||
export interface CreateCodeRevisionResponse {
|
||||
code?: number;
|
||||
data?: common.CodeRevision;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DownloadCodeRevisionPackageRequest {
|
||||
/** Code revision number */
|
||||
revision_number: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface DownloadCodeRevisionPackageResponse {
|
||||
code?: number;
|
||||
/** Downloaded package response data */
|
||||
data?: common.ApiResponseDataMessage2;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetCodeRevisionByNumberRequest {
|
||||
/** Code revision number */
|
||||
revision_number: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetCodeRevisionByNumberResponse {
|
||||
code?: number;
|
||||
/** Code revision data */
|
||||
data?: common.CodeRevision;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetCodeRevisionsRequest {
|
||||
/** limit in pagination */
|
||||
limit?: string;
|
||||
/** offset in pagination */
|
||||
offset?: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetCodeRevisionsResponse {
|
||||
code?: number;
|
||||
data?: Array<common.CodeRevision>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetOnlineCodeRevisionRequest {
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetOnlineCodeRevisionResponse {
|
||||
code?: number;
|
||||
/** Online code revision data by region */
|
||||
data?: Record<string, OnlineCodeRevision>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Online code revision information */
|
||||
export interface OnlineCodeRevision {
|
||||
/** Creation time */
|
||||
created_at?: string;
|
||||
/** Creator of the code revision */
|
||||
created_by?: string;
|
||||
/** Deployment method. 部署方式
|
||||
Enums: online-edit, scm, command-line, online-edit, image, lego */
|
||||
deploy_method?: string;
|
||||
/** Description of the code revision */
|
||||
description?: string;
|
||||
/** Whether build install is disabled, true means disable */
|
||||
disable_build_install?: boolean;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** Handler function name */
|
||||
handler?: string;
|
||||
/** Code revision ID */
|
||||
id?: string;
|
||||
/** Initializer function name */
|
||||
initializer?: string;
|
||||
/** Whether zone traffic exists */
|
||||
is_zone_traffic_exist?: boolean;
|
||||
/** Whether lazy loading is enabled */
|
||||
lazyload?: boolean;
|
||||
/** Code revision number */
|
||||
number?: string;
|
||||
/** Protocol used by the code revision */
|
||||
protocol?: string;
|
||||
/** Command to run the code revision */
|
||||
run_cmd?: string;
|
||||
/** Runtime environment */
|
||||
runtime?: string;
|
||||
/** Port for the runtime container */
|
||||
runtime_container_port?: number;
|
||||
/** Debug port for the runtime container */
|
||||
runtime_debug_container_port?: number;
|
||||
/** Service ID */
|
||||
service_id?: string;
|
||||
/** Source of code revision. 代码版本 URI
|
||||
URI for the code revision source */
|
||||
source?: string;
|
||||
/** Source type of code revision. 代码版本类型。Enums: url, tos, scm, ceph, image, image-scm, private-tos, lego */
|
||||
source_type?: string;
|
||||
/** Traffic value for the code revision */
|
||||
traffic_value?: number;
|
||||
/** Whether image lazy loading is enabled */
|
||||
open_image_lazyload?: boolean;
|
||||
/** Additional container ports for runtime */
|
||||
runtime_other_container_ports?: Array<number>;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* 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 APIType {
|
||||
RPC = 1,
|
||||
HTTP = 2,
|
||||
}
|
||||
|
||||
export enum ChatRole {
|
||||
USER = 1,
|
||||
AGENT = 2,
|
||||
}
|
||||
|
||||
/** Enums */
|
||||
export enum CodeType {
|
||||
AGENT = 1,
|
||||
SCRIPT = 2,
|
||||
HTTP_SERVER = 3,
|
||||
}
|
||||
|
||||
export enum ProgrammingLanguage {
|
||||
PYTHON = 1,
|
||||
JAVASCRIPT = 2,
|
||||
TYPESCRIPT = 3,
|
||||
JAVA = 4,
|
||||
GO = 5,
|
||||
CPP = 6,
|
||||
}
|
||||
|
||||
export enum PSMAPIType {
|
||||
OVERPAAS = 1,
|
||||
BAM = 2,
|
||||
MCP = 3,
|
||||
}
|
||||
|
||||
export enum ReleaseType {
|
||||
MCP = 1,
|
||||
A2A = 2,
|
||||
}
|
||||
|
||||
/** Basic Data Structures */
|
||||
export interface APIMeta {
|
||||
name: string;
|
||||
source_psm: string;
|
||||
source_psm_type: PSMAPIType;
|
||||
api_type: APIType;
|
||||
method: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
export interface CreateProjectRequest {
|
||||
name: string;
|
||||
description: string;
|
||||
code_type: CodeType;
|
||||
language: ProgrammingLanguage;
|
||||
psm: string;
|
||||
bytetree_node_id: Int64;
|
||||
admins?: Array<string>;
|
||||
api_dependencies?: Array<APIMeta>;
|
||||
prompt?: string;
|
||||
}
|
||||
|
||||
export interface CreateProjectResponse {
|
||||
code: number;
|
||||
error: string;
|
||||
data?: Project;
|
||||
}
|
||||
|
||||
export interface DeleteProjectRequest {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface DeleteProjectResponse {
|
||||
code: number;
|
||||
error: string;
|
||||
data?: Project;
|
||||
}
|
||||
|
||||
export interface GetAPIRequest {
|
||||
psm: string;
|
||||
version: string;
|
||||
api_type: PSMAPIType;
|
||||
}
|
||||
|
||||
export interface GetAPIResponse {
|
||||
code: number;
|
||||
error: string;
|
||||
data: Array<APIMeta>;
|
||||
}
|
||||
|
||||
export interface GetProjectRequest {
|
||||
project_id: string;
|
||||
}
|
||||
|
||||
export interface GetProjectResponse {
|
||||
code: number;
|
||||
error: string;
|
||||
data?: Project;
|
||||
}
|
||||
|
||||
export interface ListProjectsRequest {
|
||||
name?: Array<string>;
|
||||
description?: Array<string>;
|
||||
code_type?: Array<CodeType>;
|
||||
language?: Array<ProgrammingLanguage>;
|
||||
psm?: Array<string>;
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
id?: Array<string>;
|
||||
}
|
||||
|
||||
export interface ListProjectsResponse {
|
||||
code: number;
|
||||
error: string;
|
||||
data?: Array<Project>;
|
||||
}
|
||||
|
||||
export interface ListPSMAPIVersionsRequest {
|
||||
psm: string;
|
||||
api_type: PSMAPIType;
|
||||
}
|
||||
|
||||
export interface ListPSMAPIVersionsResponse {
|
||||
code: number;
|
||||
error: string;
|
||||
data?: Array<string>;
|
||||
}
|
||||
|
||||
export interface Project {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
code_type: CodeType;
|
||||
language: ProgrammingLanguage;
|
||||
psm: string;
|
||||
bytetree_node_id: Int64;
|
||||
admins?: Array<string>;
|
||||
api_dependencies?: Array<APIMeta>;
|
||||
prompt?: string;
|
||||
created_at: Int64;
|
||||
updated_at: Int64;
|
||||
sandbox_id: string;
|
||||
}
|
||||
|
||||
export interface UpdateProjectRequest {
|
||||
project_id: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
code_type?: CodeType;
|
||||
language?: ProgrammingLanguage;
|
||||
psm?: string;
|
||||
bytetree_node_id?: Int64;
|
||||
admins?: Array<string>;
|
||||
api_dependencies?: Array<APIMeta>;
|
||||
prompt?: string;
|
||||
}
|
||||
|
||||
export interface UpdateProjectResponse {
|
||||
code: number;
|
||||
error: string;
|
||||
data?: Project;
|
||||
}
|
||||
/* eslint-enable */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CreateConsulTriggerRequest {
|
||||
/** Name of the cluster for the service */
|
||||
cluster: string;
|
||||
/** Description of the Consul trigger */
|
||||
description?: string;
|
||||
/** Whether the trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Name of the Consul trigger */
|
||||
name?: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface CreateConsulTriggerResponse {
|
||||
code?: number;
|
||||
data?: common.ConsulTriggerResponseData;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeleteConsulTriggerRequest {
|
||||
/** Name of the cluster for the service */
|
||||
cluster: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** ID of the trigger to delete */
|
||||
trigger_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface DeleteConsulTriggerResponse {
|
||||
code?: number;
|
||||
data?: common.EmptyObject;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetConsulTriggerRequest {
|
||||
/** Name of the cluster for the service */
|
||||
cluster: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** trigger_id of function */
|
||||
trigger_id: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetConsulTriggerResponse {
|
||||
code?: number;
|
||||
data?: common.ConsulTriggerResponseData;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateConsulTriggerRequest {
|
||||
/** Name of the cluster for the service */
|
||||
cluster: string;
|
||||
/** Description of the Consul trigger */
|
||||
description?: string;
|
||||
/** Whether the trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Name of the Consul trigger */
|
||||
name?: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** ID of the trigger to update */
|
||||
trigger_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface UpdateConsulTriggerResponse {
|
||||
code?: number;
|
||||
data?: common.ConsulTriggerResponseData;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
/** Debug execution data message */
|
||||
export interface DataMessage114 {
|
||||
/** Additional debug execution data */
|
||||
additional_data?: DataMessage114AdditionalDataMessage2;
|
||||
/** Main debug data payload */
|
||||
data?: string;
|
||||
}
|
||||
|
||||
/** Additional debug execution data */
|
||||
export interface DataMessage114AdditionalDataMessage2 {
|
||||
/** CPU usage during debug execution */
|
||||
cpuUsage?: string;
|
||||
/** Duration of debug execution */
|
||||
executionDuration?: string;
|
||||
/** Memory usage during debug execution */
|
||||
memoryUsage?: string;
|
||||
/** Request payload sent for debugging */
|
||||
request?: string;
|
||||
/** Response payload from debugging */
|
||||
response?: string;
|
||||
}
|
||||
|
||||
export interface DebugFunctionRequest {
|
||||
/** Enable batch debug mode */
|
||||
batch?: boolean;
|
||||
/** Name of the cluster */
|
||||
cluster: string;
|
||||
/** Input data for debugging */
|
||||
data?: string;
|
||||
/** Additional debug extensions */
|
||||
extensions?: Record<string, common.EmptyObject>;
|
||||
/** Name of the region */
|
||||
region: string;
|
||||
/** Service ID to debug */
|
||||
service_id: string;
|
||||
/** Debug type */
|
||||
type?: string;
|
||||
/** Enable verbose debug output */
|
||||
verbose?: boolean;
|
||||
/** Event name for debugging */
|
||||
event_name?: string;
|
||||
}
|
||||
|
||||
export interface DebugFunctionResponse {
|
||||
code?: number;
|
||||
data?: DataMessage114;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* 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 CreateDiagnosisRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
diagnosis_id?: string;
|
||||
end_at?: number;
|
||||
item_id?: string;
|
||||
item_type?: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
set_time_range?: boolean;
|
||||
start_at?: number;
|
||||
}
|
||||
|
||||
export interface CreateDiagnosisResponse {
|
||||
code?: number;
|
||||
data?: Diagnose;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeleteDiagnosisByIDRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** diagnosis id */
|
||||
diagnosis_id: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface DeleteDiagnosisByIDResponse {
|
||||
code?: number;
|
||||
data?: Diagnose;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface Diagnose {
|
||||
/** Time when the diagnosis was created */
|
||||
created_at?: string;
|
||||
/** Unique identifier for the diagnosis */
|
||||
diagnosis_id?: string;
|
||||
/** List of diagnosis items */
|
||||
diagnosis_items?: Array<DiagnoseDiagnosisItemsMessage>;
|
||||
/** End time of the diagnosis (timestamp) */
|
||||
end_at?: number;
|
||||
/** ID of the function being diagnosed */
|
||||
function_id?: string;
|
||||
/** ID of the diagnosis item */
|
||||
item_id?: string;
|
||||
/** Type of the diagnosis item */
|
||||
item_type?: string;
|
||||
/** Language used for the diagnosis */
|
||||
language?: string;
|
||||
/** Whether metadata is synced */
|
||||
meta_synced?: boolean;
|
||||
/** Time when metadata was synced */
|
||||
meta_synced_at?: string;
|
||||
/** Whether a time range is set for the diagnosis */
|
||||
set_time_range?: boolean;
|
||||
/** Start time of the diagnosis (timestamp) */
|
||||
start_at?: number;
|
||||
/** Time when the diagnosis was last updated */
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export interface DiagnoseDiagnosisItemsMessage {
|
||||
/** Content of the diagnosis item */
|
||||
content?: string;
|
||||
/** Hint or suggestion for the diagnosis item */
|
||||
hint?: string;
|
||||
/** Result of the diagnosis item */
|
||||
result?: string;
|
||||
}
|
||||
|
||||
export interface GetDiagnosisByIDRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** diagnosis id */
|
||||
diagnosis_id: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetDiagnosisByIDResponse {
|
||||
code?: number;
|
||||
data?: Diagnose;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetDiagnosisRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetDiagnosisResponse {
|
||||
code?: number;
|
||||
data?: Array<Diagnose>;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CheckMqAppConsumerMetaRequest {
|
||||
/** PSM identifier */
|
||||
psm: string;
|
||||
/** Name of the MQ cluster */
|
||||
mq_cluster: string;
|
||||
/** Topic name in the MQ cluster */
|
||||
topic: string;
|
||||
/** Consumer group name */
|
||||
consumer_group: string;
|
||||
}
|
||||
|
||||
export interface CheckMqAppConsumerMetaResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: string;
|
||||
}
|
||||
|
||||
export interface GetMqAppConsumerMetaRequest {
|
||||
/** PSM identifier */
|
||||
psm: string;
|
||||
}
|
||||
|
||||
export interface GetMqAppConsumerMetaResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<common.ClusterMQConsumerMeta>;
|
||||
}
|
||||
|
||||
export interface GetMqAppConsumerMetaStatusRequest {
|
||||
/** PSM identifier */
|
||||
psm: string;
|
||||
}
|
||||
|
||||
export interface GetMqAppConsumerMetaStatusResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: MqAppConsumerMetaResult;
|
||||
}
|
||||
|
||||
export interface MqAppConsumerMetaResult {
|
||||
/** PSM identifier */
|
||||
psm?: string;
|
||||
/** List of eventbus metadata for the consumer */
|
||||
eventbus_meta?: Array<MQConsumerMetaStatus>;
|
||||
}
|
||||
|
||||
export interface MQConsumerMetaStatus {
|
||||
/** Region where the consumer group is located */
|
||||
region?: string;
|
||||
/** Name of the event (topic or eventbus event) */
|
||||
event_name?: string;
|
||||
/** Name of the consumer group */
|
||||
consumer_group?: string;
|
||||
/** Whether the consumer group metadata is updated */
|
||||
is_updated?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateMqAppConsumerMetaStatusRequest {
|
||||
/** PSM identifier */
|
||||
psm: string;
|
||||
}
|
||||
|
||||
export interface UpdateMqAppConsumerMetaStatusResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** Result of updating eventbus consumer meta status */
|
||||
data?: MqAppConsumerMetaResult;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* 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 CreateFilterPluginsRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
name?: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** zip file binary */
|
||||
zip_file?: CreateFilterPluginsRequestZipFileMessage2;
|
||||
/** Size of the zip file in bytes */
|
||||
zip_file_size?: number;
|
||||
}
|
||||
|
||||
export interface CreateFilterPluginsRequestZipFileMessage2 {}
|
||||
|
||||
export interface CreateFilterPluginsResponse {
|
||||
code?: number;
|
||||
data?: FilterPlugin;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeleteFilterPluginsRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** id */
|
||||
filter_plugin_id: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface DeleteFilterPluginsResponse {
|
||||
code?: number;
|
||||
data?: FilterPlugin;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DownloadFilterPluginsRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** id */
|
||||
filter_plugin_id: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface DownloadFilterPluginsResponse {
|
||||
code?: number;
|
||||
data?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface FilterPlugin {
|
||||
/** Time when the filter plugin was created */
|
||||
created_at?: string;
|
||||
/** Size of the filter plugin file in MB */
|
||||
file_size_mb?: number;
|
||||
/** ID of the function associated with the plugin */
|
||||
function_id?: string;
|
||||
/** Unique identifier for the filter plugin */
|
||||
id?: string;
|
||||
/** Name of the filter plugin */
|
||||
name?: string;
|
||||
/** Source location or URI of the plugin */
|
||||
source?: string;
|
||||
/** Type of the source */
|
||||
source_type?: string;
|
||||
/** Time when the filter plugin was last updated */
|
||||
updated_at?: string;
|
||||
/** User who last updated the plugin */
|
||||
updated_user?: string;
|
||||
}
|
||||
|
||||
export interface GetFilterPluginsDetailRequest {
|
||||
/** Name of the cluster */
|
||||
cluster: string;
|
||||
/** ID of the filter plugin */
|
||||
filter_plugin_id: string;
|
||||
/** Name of the region */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetFilterPluginsDetailResponse {
|
||||
code?: number;
|
||||
data?: FilterPlugin;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetFilterPluginsRequest {
|
||||
/** Name of the cluster */
|
||||
cluster: string;
|
||||
/** Name of the region */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Pagination offset */
|
||||
offset?: number;
|
||||
/** Pagination limit */
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface GetFilterPluginsResponse {
|
||||
code?: number;
|
||||
data?: Array<FilterPlugin>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateFilterPluginsRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** filter plugin id */
|
||||
filter_plugin_id: string;
|
||||
/** Name of the filter plugin */
|
||||
name?: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** zip file binary */
|
||||
zip_file?: UpdateFilterPluginsRequestZipFileMessage2;
|
||||
/** Size of the zip file in bytes */
|
||||
zip_file_size?: number;
|
||||
}
|
||||
|
||||
export interface UpdateFilterPluginsRequestZipFileMessage2 {}
|
||||
|
||||
export interface UpdateFilterPluginsResponse {
|
||||
code?: number;
|
||||
data?: FilterPlugin;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CreateHttpTriggerRequest {
|
||||
/** Whether to disable ByteFaas error response */
|
||||
bytefaas_error_response_disabled?: boolean;
|
||||
/** Whether to disable ByteFaas response header */
|
||||
bytefaas_response_header_disabled?: boolean;
|
||||
/** Name of the cluster for the service */
|
||||
cluster: string;
|
||||
/** Description of the HTTP trigger */
|
||||
description?: string;
|
||||
/** Whether the HTTP trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Name of the HTTP trigger */
|
||||
name?: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** URL prefix for the trigger */
|
||||
url_prefix?: string;
|
||||
/** Type of version */
|
||||
version_type?: string;
|
||||
/** Value for the version type */
|
||||
version_value?: string;
|
||||
/** Runtime environment for the trigger */
|
||||
runtime?: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface CreateHttpTriggerResponse {
|
||||
code?: number;
|
||||
data?: common.HttpTriggerResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeleteHttpTriggerRequest {
|
||||
/** cluster of service */
|
||||
cluster: string;
|
||||
/** region of service */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** ID of trigger */
|
||||
trigger_id: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface DeleteHttpTriggerResponse {
|
||||
code?: number;
|
||||
data?: common.HttpTriggerResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetHttpTriggerRequest {
|
||||
/** cluster of service */
|
||||
cluster: string;
|
||||
/** region of service */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** ID of trigger */
|
||||
trigger_id: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetHttpTriggerResponse {
|
||||
code?: number;
|
||||
data?: common.HttpTriggerResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetHttpTriggersRequest {
|
||||
/** cluster of service */
|
||||
cluster: string;
|
||||
/** region of service */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetHttpTriggersResponse {
|
||||
code?: number;
|
||||
data?: Array<common.HttpTriggerResponse>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface PatchHttpTriggerRequest {
|
||||
/** Whether to disable ByteFaas error response */
|
||||
bytefaas_error_response_disabled?: boolean;
|
||||
/** Whether to disable ByteFaas response header */
|
||||
bytefaas_response_header_disabled?: boolean;
|
||||
/** Name of the cluster for the service */
|
||||
cluster: string;
|
||||
/** Description of the HTTP trigger */
|
||||
description?: string;
|
||||
/** Whether the HTTP trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Name of the HTTP trigger */
|
||||
name?: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** ID of the trigger */
|
||||
trigger_id: string;
|
||||
/** URL prefix for the trigger */
|
||||
url_prefix?: string;
|
||||
/** Type of version (e.g., 'revision' or 'alias') */
|
||||
version_type?: string;
|
||||
/** Value for the version type (e.g., revision ID if type is 'revision') */
|
||||
version_value?: string;
|
||||
}
|
||||
|
||||
export interface PatchHttpTriggerResponse {
|
||||
code?: number;
|
||||
data?: common.HttpTriggerResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateHttpTriggerRequest {
|
||||
/** Whether to disable ByteFaas error response */
|
||||
bytefaas_error_response_disabled?: boolean;
|
||||
/** Whether to disable ByteFaas response header */
|
||||
bytefaas_response_header_disabled?: boolean;
|
||||
/** Name of the cluster for the service */
|
||||
cluster: string;
|
||||
/** Description of the HTTP trigger */
|
||||
description?: string;
|
||||
/** Whether the HTTP trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Name of the HTTP trigger */
|
||||
name?: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** ID of the trigger */
|
||||
trigger_id: string;
|
||||
/** URL prefix for the trigger */
|
||||
url_prefix?: string;
|
||||
/** Type of version (e.g., 'revision' or 'alias') */
|
||||
version_type?: string;
|
||||
/** Value for the version type (e.g., revision ID if type is 'revision') */
|
||||
version_value?: string;
|
||||
/** Runtime environment for the trigger */
|
||||
runtime?: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface UpdateHttpTriggerResponse {
|
||||
code?: number;
|
||||
/** Updated HTTP trigger data */
|
||||
data?: common.HttpTriggerResponse;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* 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 AddImageCICDRecordsRequest {
|
||||
/** User who created the record */
|
||||
create_by?: string;
|
||||
/** Type of the image */
|
||||
image_type?: string;
|
||||
/** Application environment */
|
||||
app_env?: string;
|
||||
/** New values for the record */
|
||||
value?: Array<TargetSetting>;
|
||||
/** Old values for the record */
|
||||
old_record_value?: Array<TargetSetting>;
|
||||
/** Description of the CICD record */
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface AddImageCICDRecordsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: AddImageCICDRecordsResponseData;
|
||||
}
|
||||
|
||||
export interface AddImageCICDRecordsResponseData {
|
||||
/** Unique identifier for the CICD record */
|
||||
id?: string;
|
||||
/** User who created the record */
|
||||
created_by?: string;
|
||||
/** Time when the record was created */
|
||||
created_at?: string;
|
||||
/** Type of the image */
|
||||
image_type?: string;
|
||||
/** Application environment */
|
||||
app_env?: string;
|
||||
/** List of differences in the record */
|
||||
record_diff?: Array<RecordDiff>;
|
||||
/** Description of the CICD record */
|
||||
description?: string;
|
||||
/** Rollback record ID if applicable */
|
||||
rollback_id?: string;
|
||||
/** Source of the CICD record */
|
||||
source?: string;
|
||||
}
|
||||
|
||||
export interface CheckImagesVersionRequest {
|
||||
/** Key for the image */
|
||||
key?: string;
|
||||
/** SCM version string */
|
||||
scm_version?: string;
|
||||
}
|
||||
|
||||
export interface CheckImagesVersionResponse {
|
||||
status?: string;
|
||||
message?: string;
|
||||
data?: scmVersion;
|
||||
}
|
||||
|
||||
export interface GrayConfig {
|
||||
/** Gray configuration for PSMs */
|
||||
psms?: GrayKeys;
|
||||
/** Gray configuration for clusters */
|
||||
clusters?: GrayKeys;
|
||||
/** Gray configuration for data centers */
|
||||
dcs?: GrayKeys;
|
||||
/** Gray configuration for stages */
|
||||
stages?: GrayKeys;
|
||||
}
|
||||
|
||||
export interface GrayKeys {
|
||||
/** Whether to gray all keys */
|
||||
gray_all?: boolean;
|
||||
/** List of keys to gray */
|
||||
keys?: Array<string>;
|
||||
}
|
||||
|
||||
export interface PreUpdateBaseImagesRequest {
|
||||
/** Key for the base image */
|
||||
key?: string;
|
||||
/** Additional data for pre-updating base images */
|
||||
data?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface PreUpdateBaseImagesResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface RecordDiff {
|
||||
/** Key of the record that changed */
|
||||
key?: string;
|
||||
/** Old value before the change */
|
||||
old_value?: string;
|
||||
/** New value after the change */
|
||||
new_value?: string;
|
||||
}
|
||||
|
||||
export interface scmVersion {
|
||||
/** Branch name */
|
||||
branch?: string;
|
||||
/** Commit hash */
|
||||
commit_hash?: string;
|
||||
/** Repository ID */
|
||||
repo_id?: number;
|
||||
/** Type of SCM */
|
||||
scm_type?: string;
|
||||
/** Version string for the SCM */
|
||||
version_version?: string;
|
||||
}
|
||||
|
||||
export interface Setting {
|
||||
/** Name of the setting */
|
||||
name?: string;
|
||||
/** Value of the setting */
|
||||
value?: string;
|
||||
/** Region for the setting */
|
||||
region?: string;
|
||||
/** Tag for the setting */
|
||||
tag?: string;
|
||||
/** Time when the setting was last updated */
|
||||
updated_at?: string;
|
||||
/** User who last updated the setting */
|
||||
updated_by?: string;
|
||||
/** Whether the setting is deleted */
|
||||
is_deleted?: boolean;
|
||||
/** Time when the setting was deleted */
|
||||
deleted_at?: string;
|
||||
/** User who deleted the setting */
|
||||
deleted_by?: string;
|
||||
/** Whether the metadata is synced */
|
||||
meta_synced?: boolean;
|
||||
/** Time when the metadata was synced */
|
||||
meta_synced_at?: string;
|
||||
/** Cell for the setting */
|
||||
cell?: string;
|
||||
/** Gray value for the setting */
|
||||
gray_value?: string;
|
||||
/** Whether gray is needed */
|
||||
need_gray?: boolean;
|
||||
/** Gray configuration for the setting */
|
||||
gray_conf?: GrayConfig;
|
||||
/** Description of the setting */
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface TargetSetting {
|
||||
/** Key for the target setting */
|
||||
key?: string;
|
||||
/** Value for the target setting */
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export interface UpdateBaseImagesRequest {
|
||||
/** Key for the base image */
|
||||
key?: string;
|
||||
/** Header value used to trigger base image update */
|
||||
UpdateBaseImages?: string;
|
||||
}
|
||||
|
||||
export interface UpdateBaseImagesResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Record<string, string>;
|
||||
/** Status of the update operation */
|
||||
status?: string;
|
||||
/** Message describing the update result */
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export interface UpdateImageScmVersionRequest {
|
||||
/** Version to update */
|
||||
version?: string;
|
||||
/** Git commit hash */
|
||||
git_commit?: string;
|
||||
/** Key for the image */
|
||||
key?: string;
|
||||
}
|
||||
|
||||
export interface UpdateImageScmVersionResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Setting;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,614 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface ActiveFunctionFrozenInstanceRequest {
|
||||
/** Cluster name where the pod is running */
|
||||
cluster: string;
|
||||
/** Pod name to activate */
|
||||
podname: string;
|
||||
/** Region name where the pod is running */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Zone where the pod is running */
|
||||
zone: string;
|
||||
}
|
||||
|
||||
export interface ActiveFunctionFrozenInstanceResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Empty object for activation response data */
|
||||
data?: common.EmptyObject;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface ContainerInfo {
|
||||
/** Container ID */
|
||||
containerID?: string;
|
||||
/** Image used by the container */
|
||||
image?: string;
|
||||
/** Environment variables for the container */
|
||||
env?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface DataMessage130 {
|
||||
/** Link to the webshell for the MQ trigger instance */
|
||||
webshell_link?: string;
|
||||
}
|
||||
|
||||
export interface DataMessage199 {
|
||||
/** Link to the webshell for the instance */
|
||||
webshell_link?: string;
|
||||
}
|
||||
|
||||
export interface EsLog {
|
||||
/** Log content */
|
||||
content?: string;
|
||||
/** Log timestamp */
|
||||
datetime?: string;
|
||||
/** Function ID associated with the log */
|
||||
function_id?: string;
|
||||
/** Log class/category */
|
||||
log_class?: string;
|
||||
/** Log type */
|
||||
log_type?: string;
|
||||
/** Pod IP address */
|
||||
pod_ip?: string;
|
||||
/** Pod name */
|
||||
pod_name?: string;
|
||||
/** Revision ID associated with the log */
|
||||
revision_id?: string;
|
||||
}
|
||||
|
||||
export interface GetClusterAllMqTriggerInstancesRequest {
|
||||
/** Cluster name where the MQ triggers are running */
|
||||
cluster: string;
|
||||
/** Region name where the MQ triggers are running */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetClusterAllMqTriggerInstancesResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Map of trigger ID to list of MQ trigger instances */
|
||||
data?: Record<string, Array<MqTriggerInstance>>;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesLogsRequest {
|
||||
/** Cluster name where the pod is running */
|
||||
cluster: string;
|
||||
/** Pod name to fetch logs for */
|
||||
podname: string;
|
||||
/** Region name where the pod is running */
|
||||
region: string;
|
||||
/** Revision ID of the function (optional) */
|
||||
revision_id?: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Zone where the pod is running */
|
||||
zone: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesLogsResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Log data as a string */
|
||||
data?: string;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesPodInfoRequest {
|
||||
/** Pod name to fetch info for */
|
||||
podname: string;
|
||||
/** Region name where the pod is running */
|
||||
region: string;
|
||||
/** Zone where the pod is running */
|
||||
zone: string;
|
||||
/** Cell name (optional) */
|
||||
cell?: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesPodInfoResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Pod information returned in the response */
|
||||
data?: PodInfo;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesRequest {
|
||||
/** Cluster name where the instances are running */
|
||||
cluster: string;
|
||||
/** Region name where the instances are running */
|
||||
region: string;
|
||||
/** ID of the service to query instances for */
|
||||
service_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of function instances returned in the response */
|
||||
data?: Array<Instance>;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesStageRequest {
|
||||
/** Cluster name where the pod is running */
|
||||
cluster: string;
|
||||
/** Pod name to fetch stage info for */
|
||||
podname: string;
|
||||
/** Region name where the pod is running */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Zone of the pod */
|
||||
zone: string;
|
||||
/** Revision ID of the function (optional) */
|
||||
revision_id?: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesStageResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of instance stages returned in the response */
|
||||
data?: Array<InstanceStages>;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesWebshellRequest {
|
||||
/** Cluster name where the pod is running */
|
||||
cluster: string;
|
||||
/** Pod name to open webshell for */
|
||||
podname: string;
|
||||
/** Region name where the pod is running */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Zone where the pod is running */
|
||||
zone: string;
|
||||
}
|
||||
|
||||
export interface GetInstancesWebshellResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Data containing the webshell link */
|
||||
data?: DataMessage199;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetLogsRequest {
|
||||
/** Whether to use advanced log search */
|
||||
advanced?: boolean;
|
||||
/** Whether to sort logs in ascending order */
|
||||
ascend?: boolean;
|
||||
/** Cluster name where the logs are collected */
|
||||
cluster: string;
|
||||
/** Start time for log search (ISO8601 or timestamp) */
|
||||
from?: string;
|
||||
/** Whether to include system logs */
|
||||
include_system?: boolean;
|
||||
/** Log type to filter */
|
||||
log_type: string;
|
||||
/** Pod IP address to filter logs */
|
||||
pod_ip?: string;
|
||||
/** Pod name to filter logs */
|
||||
pod_name?: string;
|
||||
/** Region name where the logs are collected */
|
||||
region: string;
|
||||
/** Revision ID to filter logs */
|
||||
revision_id?: string;
|
||||
/** Search keyword or pattern */
|
||||
search?: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Number of log entries to return */
|
||||
size?: number;
|
||||
/** End time for log search (ISO8601 or timestamp) */
|
||||
to?: string;
|
||||
}
|
||||
|
||||
export interface GetLogsResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of log entries returned in the response */
|
||||
data?: Array<EsLog>;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetMqTriggerInstancesRequest {
|
||||
/** Cluster name where the MQ trigger is running */
|
||||
cluster: string;
|
||||
/** Region name where the MQ trigger is running */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** MQ trigger ID */
|
||||
trigger_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetMqTriggerInstancesResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of MQ trigger instances returned in the response */
|
||||
data?: Array<MqTriggerInstance>;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetMqTriggerInstancesWebshellRequest {
|
||||
/** Cluster name where the MQ trigger is running */
|
||||
cluster: string;
|
||||
/** Pod name to open webshell for */
|
||||
podname: string;
|
||||
/** Region name where the MQ trigger is running */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** MQ trigger ID */
|
||||
trigger_id: string;
|
||||
/** Zone where the MQ trigger is running */
|
||||
zone: string;
|
||||
}
|
||||
|
||||
export interface GetMqTriggerInstancesWebshellResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Data containing the webshell link */
|
||||
data?: DataMessage130;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface Instance {
|
||||
/** Function ID associated with the instance */
|
||||
function_id?: string;
|
||||
/** Revision ID of the function */
|
||||
revision_id?: string;
|
||||
/** Name of the pod running the instance */
|
||||
pod_name?: string;
|
||||
/** Unique identifier for the pod */
|
||||
pod_uid?: string;
|
||||
/** List of container IDs in the pod */
|
||||
container_ids?: Array<string>;
|
||||
/** Host node where the pod is running */
|
||||
host?: string;
|
||||
/** IPv6 address of the pod */
|
||||
ipv6?: string;
|
||||
/** IPv4 address of the pod */
|
||||
pod_ip?: string;
|
||||
/** Main port exposed by the pod */
|
||||
port?: string;
|
||||
/** Debug port for the runtime container */
|
||||
runtime_debug_port?: string;
|
||||
/** List of other runtime ports exposed by the pod */
|
||||
runtime_other_ports?: Array<OtherRoutes>;
|
||||
/** Deployment environment */
|
||||
deploy_env?: string;
|
||||
/** Region where the instance is running */
|
||||
region?: string;
|
||||
/** Zone within the region */
|
||||
zone?: string;
|
||||
/** Status of the instance */
|
||||
status?: string;
|
||||
/** Status or error message for the instance */
|
||||
message?: string;
|
||||
/** CPU usage of the instance */
|
||||
cpu?: number;
|
||||
/** Memory usage of the instance */
|
||||
memory?: number;
|
||||
/** Creation timestamp of the instance */
|
||||
created_at?: string;
|
||||
/** Type of the instance */
|
||||
instance_type?: string;
|
||||
/** Link to instance metrics dashboard */
|
||||
instance_metric_link?: string;
|
||||
/** Link to host metrics dashboard */
|
||||
host_metric_link?: string;
|
||||
/** Link to lidar profile for the instance */
|
||||
lidar_profile_link?: string;
|
||||
/** Whether service discovery is disabled for this instance */
|
||||
sd_disabled?: boolean;
|
||||
/** List of dependencies for the revision */
|
||||
revision_dependency?: Array<common.Dependency>;
|
||||
/** Runtime container port as string */
|
||||
runtime_container_port?: string;
|
||||
/** Status category for the instance */
|
||||
status_category?: string;
|
||||
}
|
||||
|
||||
export interface InstanceStages {
|
||||
/** Name of the stage */
|
||||
name?: string;
|
||||
/** Status of the stage */
|
||||
status?: string;
|
||||
/** List of logs for this stage */
|
||||
logs?: Array<StageLog>;
|
||||
}
|
||||
|
||||
export interface MigrateInstancesRequest {
|
||||
/** Cluster name where the pod is running */
|
||||
cluster: string;
|
||||
/** Pod name to migrate */
|
||||
podname: string;
|
||||
/** Region name where the pod is running */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Zone where the pod is running */
|
||||
zone: string;
|
||||
/** Environment name (optional) */
|
||||
env?: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface MigrateInstancesResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Empty object for migration response data */
|
||||
data?: common.EmptyObject;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface MigrateMqTriggerInstanceRequest {
|
||||
/** Cluster name where the MQ trigger is running */
|
||||
cluster: string;
|
||||
/** Pod name to migrate */
|
||||
podname: string;
|
||||
/** Region name where the MQ trigger is running */
|
||||
region: string;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** MQ trigger ID */
|
||||
trigger_id: string;
|
||||
/** Zone where the MQ trigger is running */
|
||||
zone: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface MigrateMqTriggerInstanceResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Empty object for migration response data */
|
||||
data?: common.EmptyObject;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface MigrationRecord {
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Service ID associated with the migration */
|
||||
service_id?: string;
|
||||
/** Cluster ID where the migration occurred */
|
||||
cluster_id?: string;
|
||||
/** Pod IP address involved in the migration */
|
||||
pod_ip?: string;
|
||||
/** Pod IPv6 address involved in the migration */
|
||||
pod_ipv6?: string;
|
||||
/** Pod port involved in the migration */
|
||||
pod_port?: string;
|
||||
/** Pod status at the time of migration */
|
||||
pod_status?: string;
|
||||
/** Zone where the migration occurred */
|
||||
zone?: string;
|
||||
/** Region where the migration occurred */
|
||||
region?: string;
|
||||
/** Deletion timestamp (epoch milliseconds) */
|
||||
delete_time?: Int64;
|
||||
/** User who deleted the pod */
|
||||
delete_by?: string;
|
||||
/** Result of the migration */
|
||||
migration_result?: string;
|
||||
/** Report message for the migration */
|
||||
report_message?: string;
|
||||
/** Cluster name where the migration occurred */
|
||||
cluster_name?: string;
|
||||
/** Pod name involved in the migration */
|
||||
pod_name?: string;
|
||||
/** Detector that triggered the migration */
|
||||
detector?: string;
|
||||
/** Type of migration */
|
||||
migration_type?: string;
|
||||
/** Environment name for the migration */
|
||||
env?: string;
|
||||
}
|
||||
|
||||
export interface MigrationRecordsRequest {
|
||||
/** Region to filter migration records */
|
||||
region?: string;
|
||||
/** Cluster to filter migration records */
|
||||
cluster?: string;
|
||||
/** User who deleted the pod */
|
||||
delete_by?: string;
|
||||
/** Pod name to filter migration records */
|
||||
pod_name?: string;
|
||||
/** Service ID to filter migration records */
|
||||
service_id: string;
|
||||
/** Page size for pagination */
|
||||
page_size?: number;
|
||||
/** Page number for pagination */
|
||||
page_num?: number;
|
||||
/** Start time for filtering (epoch milliseconds) */
|
||||
start?: Int64;
|
||||
/** End time for filtering (epoch milliseconds) */
|
||||
end?: Int64;
|
||||
/** Detector to filter migration records */
|
||||
detector?: string;
|
||||
/** Zone to filter migration records */
|
||||
zone?: string;
|
||||
/** IP address to filter migration records */
|
||||
ip?: string;
|
||||
/** Pod type to filter migration records, (e.g. "mqevent", "function") */
|
||||
pod_type?: string;
|
||||
}
|
||||
|
||||
export interface MigrationRecordsResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of migration records returned in the response */
|
||||
data?: Array<MigrationRecord>;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface MqTriggerInstance {
|
||||
/** CPU usage of the MQ trigger instance */
|
||||
cpu?: number;
|
||||
/** Creation timestamp of the instance */
|
||||
created_at?: string;
|
||||
/** Function ID associated with the instance */
|
||||
function_id?: string;
|
||||
/** Host node where the instance is running */
|
||||
host?: string;
|
||||
/** IPv6 address of the host */
|
||||
host_ipv6?: string;
|
||||
/** Link to host metrics dashboard */
|
||||
host_metric_link?: string;
|
||||
/** Link to instance log dashboard */
|
||||
instance_log_link?: string;
|
||||
/** Link to instance metrics dashboard */
|
||||
instance_metric_link?: string;
|
||||
/** Memory usage of the instance */
|
||||
memory?: number;
|
||||
/** Status or error message for the instance */
|
||||
message?: string;
|
||||
/** MQ event agent port */
|
||||
mqevent_agent_port?: string;
|
||||
/** MQ event ID associated with the instance */
|
||||
mqevent_id?: string;
|
||||
/** Pod IP address */
|
||||
pod_ip?: string;
|
||||
/** Pod IPv6 address */
|
||||
pod_ipv6?: string;
|
||||
/** Pod name */
|
||||
pod_name?: string;
|
||||
/** Main port exposed by the instance */
|
||||
port?: string;
|
||||
/** Link to instance profile */
|
||||
profile_link?: string;
|
||||
/** Region where the instance is running */
|
||||
region?: string;
|
||||
/** Status of the instance */
|
||||
status?: string;
|
||||
/** Zone where the instance is running */
|
||||
zone?: string;
|
||||
/** Plugin function version used by the instance */
|
||||
plugin_function_version?: string;
|
||||
/** Container IDs associated with the instance (comma-separated) */
|
||||
container_ids?: string;
|
||||
}
|
||||
|
||||
export interface OtherRoutes {
|
||||
/** Access port for the route */
|
||||
access_port?: string;
|
||||
/** Service port for the route */
|
||||
service_port?: string;
|
||||
}
|
||||
|
||||
export interface PodInfo {
|
||||
/** Pod name */
|
||||
podName?: string;
|
||||
/** Namespace of the pod */
|
||||
namespace?: string;
|
||||
/** Labels assigned to the pod */
|
||||
labels?: Record<string, string>;
|
||||
/** Pod creation time */
|
||||
creatTime?: string;
|
||||
/** Node IP where the pod is scheduled */
|
||||
node?: string;
|
||||
/** Pod IP address */
|
||||
podIp?: string;
|
||||
/** Phase of the pod */
|
||||
podPhase?: string;
|
||||
/** Unique identifier for the pod */
|
||||
uid?: string;
|
||||
/** Whether the pod is not ready */
|
||||
podNotReady?: boolean;
|
||||
/** Whether the pod is not scheduled */
|
||||
podNotScheduled?: boolean;
|
||||
/** Whether the pod is deleted */
|
||||
deleted?: boolean;
|
||||
/** Container information for each container in the pod */
|
||||
containerInfos?: Record<string, ContainerInfo>;
|
||||
}
|
||||
|
||||
export interface StageLog {
|
||||
/** Log level */
|
||||
level?: string;
|
||||
/** Log message content */
|
||||
message?: string;
|
||||
/** Timestamp of the log entry */
|
||||
time?: string;
|
||||
/** Phase of the stage */
|
||||
phase?: string;
|
||||
/** Component name generating the log */
|
||||
component?: string;
|
||||
}
|
||||
|
||||
export interface UpdateFunctionInstanceServiceDiscoveryRequest {
|
||||
/** Whether to disable service discovery for the instance */
|
||||
disabled: boolean;
|
||||
/** ID of the service */
|
||||
service_id: string;
|
||||
/** Region name where the instance is running */
|
||||
region: string;
|
||||
/** Cluster name where the instance is running */
|
||||
cluster: string;
|
||||
/** Zone where the instance is running */
|
||||
zone: string;
|
||||
/** Pod name to update service discovery for */
|
||||
podname: string;
|
||||
}
|
||||
|
||||
export interface UpdateFunctionInstanceServiceDiscoveryResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Empty object for update response data */
|
||||
data?: common.EmptyObject;
|
||||
/** Error message if the request failed */
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,450 @@
|
||||
/*
|
||||
* 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 CreateMcpServerAclBpmTicketRequest {
|
||||
/** MCP server ID for which to create the BPM ticket */
|
||||
server_id: string;
|
||||
/** List of PSMs to add to the ACL */
|
||||
add_psms?: Array<string>;
|
||||
/** List of PSMs to remove from the ACL */
|
||||
remove_psms?: Array<string>;
|
||||
/** Reason for the ACL change */
|
||||
reason?: string;
|
||||
/** Whether to disable authentication for the server */
|
||||
disable_auth?: boolean;
|
||||
}
|
||||
|
||||
export interface CreateMcpServerAclBpmTicketResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** BPM ticket response data for ACL changes */
|
||||
data?: CreateMcpServerAclBpmTicketResponseData;
|
||||
}
|
||||
|
||||
export interface CreateMcpServerAclBpmTicketResponseData {
|
||||
/** Link to the BPM ticket for ACL changes */
|
||||
bpm_link: string;
|
||||
}
|
||||
|
||||
export interface CreateMcpServerRequest {
|
||||
/** PSM name */
|
||||
psm: string;
|
||||
/** Name of the MCP server */
|
||||
name: string;
|
||||
/** Description of the MCP server */
|
||||
description?: string;
|
||||
/** Owner of the MCP server */
|
||||
owner?: string;
|
||||
/** Parent PSM ID */
|
||||
psm_parent_id: number;
|
||||
/** Global configuration key-value pairs */
|
||||
global_config?: Array<KeyValue>;
|
||||
/** List of admin users (comma-separated) */
|
||||
admins?: string;
|
||||
/** List of authorizer users (comma-separated) */
|
||||
authorizers?: string;
|
||||
/** Service level (optional) */
|
||||
service_level?: string;
|
||||
/** Purpose of the service (optional) */
|
||||
service_purpose?: string;
|
||||
/** Whether authentication is enabled */
|
||||
auth_enabled?: boolean;
|
||||
/** List of allowed PSMs */
|
||||
allowed_psms?: Array<string>;
|
||||
/** List of meta parameters */
|
||||
meta_params?: Array<MetaParam>;
|
||||
}
|
||||
|
||||
export interface CreateMcpServerResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: McpServer;
|
||||
}
|
||||
|
||||
export interface CustomHandler {
|
||||
/** Handler type */
|
||||
type?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Service ID */
|
||||
service_id?: string;
|
||||
}
|
||||
|
||||
export interface DeleteMcpServerRequest {
|
||||
/** MCP server ID to delete */
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface FaasToolConfig {
|
||||
/** Tool type */
|
||||
type: string;
|
||||
/** PSM name */
|
||||
psm: string;
|
||||
/** Method to invoke */
|
||||
method: string;
|
||||
/** List of HTTP headers as key-value pairs */
|
||||
headers?: Array<KeyValue>;
|
||||
/** Schema for the request body (optional) */
|
||||
request_schema?: string;
|
||||
/** Schema for the response body (optional) */
|
||||
response_schema?: string;
|
||||
/** Whether to force parsing the response as JSON */
|
||||
force_parse_response_as_json?: boolean;
|
||||
/** Secret for service account authentication (optional) */
|
||||
service_account_secret?: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Path for the function (optional) */
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export interface GenerateMcpServerSseTokenRequest {
|
||||
/** MCP server ID to generate SSE token for */
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface GenerateMcpServerSseTokenResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** SSE token data for MCP server */
|
||||
data?: McpServerSseToken;
|
||||
}
|
||||
|
||||
export interface GetMcpServerAclRequest {
|
||||
/** MCP server ID to get ACL for */
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface GetMcpServerAclResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** MCP server ACL data */
|
||||
data?: McpServerAcl;
|
||||
}
|
||||
|
||||
export interface GetMcpServerRequest {
|
||||
/** MCP server ID to retrieve */
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface GetMcpServerResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
/** MCP server data */
|
||||
data?: McpServer;
|
||||
}
|
||||
|
||||
export interface HttpToolConfig {
|
||||
/** URL to send the HTTP request to */
|
||||
url: string;
|
||||
/** HTTP method */
|
||||
method: string;
|
||||
/** List of HTTP headers as key-value pairs */
|
||||
headers?: Array<KeyValue>;
|
||||
/** Schema for the request body (optional) */
|
||||
request_schema?: string;
|
||||
/** Schema for the response body (optional) */
|
||||
response_schema?: string;
|
||||
/** Whether to force parsing the response as JSON */
|
||||
force_parse_response_as_json?: boolean;
|
||||
/** Secret for service account authentication (optional) */
|
||||
service_account_secret?: string;
|
||||
/** PSM name (optional) */
|
||||
psm?: string;
|
||||
/** Cluster name (optional) */
|
||||
cluster?: string;
|
||||
/** Tool connection timeout duration (optional) */
|
||||
connection_timeout?: Int64;
|
||||
/** Tool request timeout duration (optional) */
|
||||
request_timeout?: Int64;
|
||||
}
|
||||
|
||||
export interface IDL {
|
||||
/** Main IDL file content */
|
||||
main_idl?: string;
|
||||
/** Additional IDL files as a map */
|
||||
idls?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface KeyValue {
|
||||
/** Key name */
|
||||
key: string;
|
||||
/** Value associated with the key */
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface ListMcpServersRequest {
|
||||
/** Whether to list all MCP servers (default: false) */
|
||||
all?: string;
|
||||
/** Environment name */
|
||||
env?: string;
|
||||
/** Limit for pagination */
|
||||
limit?: number;
|
||||
/** Filter by server name */
|
||||
name?: string;
|
||||
/** Offset for pagination */
|
||||
offset?: number;
|
||||
/** Filter by owner */
|
||||
owner?: string;
|
||||
/** Prefix search for multiple fields */
|
||||
search?: string;
|
||||
/** Search type: all/admin/own/subscribe */
|
||||
search_type?: string;
|
||||
/** Sort by field in MCP server model */
|
||||
sort_by?: string;
|
||||
/** Supported search fields: server_id/name/psm */
|
||||
search_fields?: string;
|
||||
}
|
||||
|
||||
export interface ListMcpServersResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: Array<McpServer>;
|
||||
}
|
||||
|
||||
export interface McpRateLimitRule {
|
||||
/** mcp rate limit rate */
|
||||
rate: Int64;
|
||||
/** mcp rate limit unit */
|
||||
unit?: Int64;
|
||||
}
|
||||
|
||||
export interface McpServer {
|
||||
/** Unique identifier for the MCP server */
|
||||
server_id: string;
|
||||
/** PSM name */
|
||||
psm: string;
|
||||
/** Environment name */
|
||||
env_name: string;
|
||||
/** Name of the MCP server */
|
||||
name: string;
|
||||
/** Description of the MCP server */
|
||||
description?: string;
|
||||
/** Owner of the MCP server */
|
||||
owner?: string;
|
||||
/** List of subscribers to the MCP server */
|
||||
subscribers?: Array<string>;
|
||||
/** Global configuration key-value pairs */
|
||||
global_config?: Array<KeyValue>;
|
||||
/** Parent PSM ID */
|
||||
psm_parent_id?: number;
|
||||
/** Creation timestamp */
|
||||
created_at?: string;
|
||||
/** Last update timestamp */
|
||||
updated_at?: string;
|
||||
/** Current revision ID */
|
||||
current_revision_id?: string;
|
||||
/** List of admin users (comma-separated) */
|
||||
admins?: string;
|
||||
/** List of authorizer users (comma-separated) */
|
||||
authorizers?: string;
|
||||
/** Whether authentication is enabled */
|
||||
auth_enabled?: boolean;
|
||||
/** List of allowed PSMs */
|
||||
allowed_psms?: Array<string>;
|
||||
/** Custom handler configuration */
|
||||
custom_handler?: CustomHandler;
|
||||
/** Whether sensitive data is redacted */
|
||||
redacted?: boolean;
|
||||
/** List of meta parameters */
|
||||
meta_params?: Array<MetaParam>;
|
||||
}
|
||||
|
||||
export interface McpServerAcl {
|
||||
/** List of admin users for the MCP server */
|
||||
admins?: Array<string>;
|
||||
/** List of authorizer users for the MCP server */
|
||||
authorizers?: Array<string>;
|
||||
/** List of invoker users for the MCP server */
|
||||
invokers?: Array<string>;
|
||||
/** List of allowed Product Service Modules (PSMs) */
|
||||
allowed_psms?: Array<string>;
|
||||
}
|
||||
|
||||
export interface McpServerRevision {
|
||||
/** Unique identifier for the revision */
|
||||
revision_id: string;
|
||||
/** Associated MCP server ID */
|
||||
server_id: string;
|
||||
/** PSM name */
|
||||
psm: string;
|
||||
/** Environment name */
|
||||
env_name: string;
|
||||
/** Name of the revision (optional) */
|
||||
name?: string;
|
||||
/** Description of the revision (optional) */
|
||||
description?: string;
|
||||
/** Owner of the revision (optional) */
|
||||
owner?: string;
|
||||
/** List of tools included in the revision */
|
||||
tools?: Array<McpTool>;
|
||||
/** Global configuration key-value pairs */
|
||||
global_config?: Array<KeyValue>;
|
||||
/** Creation timestamp */
|
||||
created_at?: string;
|
||||
/** Last update timestamp */
|
||||
updated_at?: string;
|
||||
/** List of meta parameters */
|
||||
meta_params?: Array<MetaParam>;
|
||||
}
|
||||
|
||||
export interface McpServerSseToken {
|
||||
/** SSE token string for MCP server */
|
||||
token: string;
|
||||
}
|
||||
|
||||
export interface McpTool {
|
||||
/** Unique identifier for the tool */
|
||||
tool_id: string;
|
||||
/** Associated MCP server ID */
|
||||
server_id: string;
|
||||
/** Name of the tool */
|
||||
name: string;
|
||||
/** Tool name (may duplicate 'name' for compatibility) */
|
||||
tool_name: string;
|
||||
/** Description of the tool (optional) */
|
||||
tool_description?: string;
|
||||
/** Input schema for the tool */
|
||||
tool_input_schema: string;
|
||||
/** Type of the tool */
|
||||
tool_type: string;
|
||||
/** Tool configuration details */
|
||||
tool_config: McpToolConfig;
|
||||
/** Creation timestamp */
|
||||
created_at?: string;
|
||||
/** Last update timestamp */
|
||||
updated_at?: string;
|
||||
/** Rate limit rule for the tool (optional) */
|
||||
generic_rate_limit_rule?: McpRateLimitRule;
|
||||
}
|
||||
|
||||
export interface McpToolConfig {
|
||||
/** HTTP tool configuration (optional) */
|
||||
http?: HttpToolConfig;
|
||||
/** FaaS tool configuration (optional) */
|
||||
faas?: FaasToolConfig;
|
||||
/** RPC tool configuration (optional) */
|
||||
rpc?: RPCToolConfig;
|
||||
}
|
||||
|
||||
export interface MetaParam {
|
||||
/** Name of the parameter */
|
||||
name: string;
|
||||
/** Description of the parameter */
|
||||
description: string;
|
||||
/** Whether the parameter is required */
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
export interface ReleaseMcpServerRequest {
|
||||
/** MCP server ID to release */
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface ReleaseMcpServerResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** MCP server revision data */
|
||||
data?: McpServerRevision;
|
||||
}
|
||||
|
||||
export interface RPCToolConfig {
|
||||
/** PSM name */
|
||||
psm: string;
|
||||
/** RPC method name */
|
||||
method: string;
|
||||
/** Cluster name (optional) */
|
||||
cluster?: string;
|
||||
/** IDC (Internet Data Center) name (optional) */
|
||||
idc?: string;
|
||||
/** Schema for the request body (optional) */
|
||||
request_schema?: string;
|
||||
/** Schema for the response body (optional) */
|
||||
response_schema?: string;
|
||||
/** IDL configuration (optional) */
|
||||
idl?: IDL;
|
||||
/** BAM endpoint ID (optional) */
|
||||
bam_endpoint_id?: number;
|
||||
/** BAM IDL version (optional) */
|
||||
bam_idl_version?: string;
|
||||
/** Connection timeout duration (optional) */
|
||||
connection_timeout?: Int64;
|
||||
/** Request timeout duration (optional) */
|
||||
request_timeout?: Int64;
|
||||
/** Whether to enable independent PSM authentication */
|
||||
enable_independent_psm_auth?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateMcpServerAclRequest {
|
||||
/** MCP server ID to update ACL for */
|
||||
server_id: string;
|
||||
/** List of PSMs to add to the ACL */
|
||||
add_psms?: Array<string>;
|
||||
/** List of PSMs to remove from the ACL */
|
||||
remove_psms?: Array<string>;
|
||||
/** Whether to disable authentication for the server */
|
||||
disable_auth?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateMcpServerRequest {
|
||||
/** MCP server ID to update */
|
||||
server_id: string;
|
||||
/** New name for the MCP server */
|
||||
name?: string;
|
||||
/** New description for the MCP server */
|
||||
description?: string;
|
||||
/** Updated global configuration key-value pairs */
|
||||
global_config?: Array<KeyValue>;
|
||||
/** New owner of the MCP server */
|
||||
owner?: string;
|
||||
/** Updated list of admin users (comma-separated) */
|
||||
admins?: string;
|
||||
/** Updated list of authorizer users (comma-separated) */
|
||||
authorizers?: string;
|
||||
/** Updated service level */
|
||||
service_level?: string;
|
||||
/** Updated service purpose */
|
||||
service_purpose?: string;
|
||||
/** Whether authentication is enabled */
|
||||
auth_enabled?: boolean;
|
||||
/** Updated list of allowed PSMs */
|
||||
allowed_psms?: Array<string>;
|
||||
/** Custom handler configuration */
|
||||
custom_handler?: CustomHandler;
|
||||
/** Updated list of meta parameters */
|
||||
meta_params?: Array<MetaParam>;
|
||||
}
|
||||
|
||||
export interface UpdateMcpServerResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
/** Updated MCP server data */
|
||||
data?: McpServer;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,345 @@
|
||||
/*
|
||||
* 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 mcp_server from './mcp_server';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface BamApiListRequest {
|
||||
/** Service name to list APIs for */
|
||||
psm: string;
|
||||
/** Version to filter APIs */
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface BamApiListResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** List of BAM OpenAPI metadata */
|
||||
data?: Array<BamOpenAPIData>;
|
||||
}
|
||||
|
||||
export interface BamApiRequest {
|
||||
/** API ID to retrieve */
|
||||
api_id: string;
|
||||
/** Version to filter API */
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface BamApiResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** MCP API metadata */
|
||||
data?: McpAPIData;
|
||||
}
|
||||
|
||||
/** BAM OpenAPI metadata */
|
||||
export interface BamOpenAPIData {
|
||||
/** API ID */
|
||||
api_id?: number;
|
||||
/** HTTP method */
|
||||
method?: string;
|
||||
/** API path */
|
||||
path?: string;
|
||||
/** API name */
|
||||
name?: string;
|
||||
/** Request serializer */
|
||||
serializer?: string;
|
||||
/** Response serializer */
|
||||
resp_serializer?: string;
|
||||
/** Service name */
|
||||
psm?: string;
|
||||
/** Version */
|
||||
version?: string;
|
||||
/** RPC method name */
|
||||
rpc_method?: string;
|
||||
/** IDL definition */
|
||||
idl?: mcp_server.IDL;
|
||||
}
|
||||
|
||||
export interface BamVersionData {
|
||||
/** Service name */
|
||||
psm?: string;
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Version identifier */
|
||||
version?: string;
|
||||
/** Version note or description */
|
||||
note?: string;
|
||||
/** Whether to skip version check */
|
||||
no_check?: boolean;
|
||||
/** Commit ID for this version */
|
||||
commit_id?: string;
|
||||
/** Commit message for this version */
|
||||
commit_msg?: string;
|
||||
/** Service ID */
|
||||
service_id?: Int64;
|
||||
/** Creation time */
|
||||
ctime?: Int64;
|
||||
/** Status code */
|
||||
status?: Int64;
|
||||
/** IDL source path or identifier */
|
||||
idl_source?: string;
|
||||
/** Git branch name */
|
||||
git_branch?: string;
|
||||
/** Protocol type */
|
||||
protocol?: string;
|
||||
/** Creator of the version */
|
||||
creator?: string;
|
||||
/** Updater of the version */
|
||||
updater?: string;
|
||||
}
|
||||
|
||||
export interface BamVersionListRequest {
|
||||
/** Service name to list versions for */
|
||||
psm: string;
|
||||
}
|
||||
|
||||
export interface BamVersionListResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** List of BAM version metadata */
|
||||
data?: Array<BamVersionData>;
|
||||
}
|
||||
|
||||
export interface CreateMcpRateLimitRuleBpmTicketResponse {
|
||||
/** link to the BPM ticket created for the rate limit rule update */
|
||||
bpm_link: string;
|
||||
}
|
||||
|
||||
export interface CreateMcpToolRequest {
|
||||
/** Server ID to create tool in */
|
||||
server_id: string;
|
||||
/** Display name of the tool */
|
||||
name: string;
|
||||
/** Unique tool name */
|
||||
tool_name: string;
|
||||
/** Description of the tool */
|
||||
tool_description?: string;
|
||||
/** Input schema for the tool */
|
||||
tool_input_schema: string;
|
||||
/** Whether the tool is enabled */
|
||||
enabled?: boolean;
|
||||
/** Type of the tool */
|
||||
tool_type: string;
|
||||
/** Tool configuration */
|
||||
tool_config: mcp_server.McpToolConfig;
|
||||
}
|
||||
|
||||
export interface CreateMcpToolResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** Created MCP tool details */
|
||||
data?: mcp_server.McpTool;
|
||||
}
|
||||
|
||||
export interface DeleteMcpToolRequest {
|
||||
/** MCP server ID the tool belongs to */
|
||||
server_id: string;
|
||||
/** Tool ID to delete */
|
||||
tool_id: string;
|
||||
}
|
||||
|
||||
export interface GetMcpRateLimitRuleBpmTicketRequest {
|
||||
/** Server ID the tool belongs to */
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface GetMcpRateLimitRuleBpmTicketResponse {
|
||||
/** link to the BPM ticket created for the rate limit rule update */
|
||||
bpm_link: string;
|
||||
}
|
||||
|
||||
export interface GetMcpToolRequest {
|
||||
/** Server ID the tool belongs to */
|
||||
server_id: string;
|
||||
/** Tool ID to retrieve */
|
||||
tool_id: string;
|
||||
}
|
||||
|
||||
export interface GetMcpToolResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** MCP tool details */
|
||||
data?: mcp_server.McpTool;
|
||||
}
|
||||
|
||||
export interface GlobalSearchMcpToolsRequest {
|
||||
/** Whether to return all results (default: false) */
|
||||
all?: string;
|
||||
/** Environment name (prod/ppe/boe_feature) */
|
||||
env?: string;
|
||||
/** Maximum number of results to return */
|
||||
limit?: number;
|
||||
/** Filter by tool name */
|
||||
name?: string;
|
||||
/** Pagination offset */
|
||||
offset?: number;
|
||||
/** Filter by owner */
|
||||
owner?: string;
|
||||
/** Prefix search for multiple fields */
|
||||
search?: string;
|
||||
/** Search type: all/admin/own/subscribe */
|
||||
search_type?: string;
|
||||
/** Sort by field in MCP tool model */
|
||||
sort_by?: string;
|
||||
/** Supported search fields: tool_id/tool_name/server_id */
|
||||
search_fields?: string;
|
||||
}
|
||||
|
||||
export interface GlobalSearchMcpToolsResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** List of MCP tools matching the search */
|
||||
data?: Array<mcp_server.McpTool>;
|
||||
}
|
||||
|
||||
export interface ListMcpCustomToolsRequest {
|
||||
/** Server ID to list tools for */
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface ListMcpCustomToolsResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** List of MCP custom tools */
|
||||
data?: ListMcpCustomToolsResponseData;
|
||||
}
|
||||
|
||||
export interface ListMcpCustomToolsResponseData {
|
||||
/** MCP tool details */
|
||||
tools: Array<McpCustomTool>;
|
||||
}
|
||||
|
||||
export interface ListMcpToolsRequest {
|
||||
/** Server ID to list tools for */
|
||||
server_id: string;
|
||||
}
|
||||
|
||||
export interface ListMcpToolsResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** List of MCP tools for the server */
|
||||
data?: Array<mcp_server.McpTool>;
|
||||
}
|
||||
|
||||
/** MCP API metadata */
|
||||
export interface McpAPIData {
|
||||
/** HTTP method */
|
||||
method?: string;
|
||||
/** API path */
|
||||
path?: string;
|
||||
/** API name */
|
||||
name?: string;
|
||||
/** Request serializer */
|
||||
serializer?: string;
|
||||
/** Response serializer */
|
||||
resp_serializer?: string;
|
||||
/** Service name */
|
||||
psm?: string;
|
||||
/** Version */
|
||||
version?: string;
|
||||
/** Input schema */
|
||||
input_schema?: string;
|
||||
/** Request schema */
|
||||
request_schema?: string;
|
||||
/** Response schema */
|
||||
response_schema?: string;
|
||||
/** API ID */
|
||||
api_id?: number;
|
||||
/** RPC method name */
|
||||
rpc_method?: string;
|
||||
/** IDL definition */
|
||||
idl?: mcp_server.IDL;
|
||||
}
|
||||
|
||||
/** MCP custom tool */
|
||||
export interface McpCustomTool {
|
||||
/** Name of the tool */
|
||||
name?: string;
|
||||
/** Description of the tool */
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface UpdateMcpRateLimitRule {
|
||||
/** ID of the tool that this rule applies to */
|
||||
tool_id: string;
|
||||
/** The rate limit rule to apply */
|
||||
generic_rate_limit_rule: mcp_server.McpRateLimitRule;
|
||||
}
|
||||
|
||||
export interface UpdateMcpRateLimitRulesRequest {
|
||||
/** MCP server ID to update rules for */
|
||||
server_id: string;
|
||||
/** The rules to update */
|
||||
rules: Array<UpdateMcpRateLimitRule>;
|
||||
/** reason for the update */
|
||||
reason: string;
|
||||
/** Assignee for the review process */
|
||||
review_assignee: string;
|
||||
}
|
||||
|
||||
export interface UpdateMcpToolRequest {
|
||||
/** MCP server ID the tool belongs to */
|
||||
server_id: string;
|
||||
/** Tool ID to update */
|
||||
tool_id: string;
|
||||
/** Display name of the tool */
|
||||
name?: string;
|
||||
/** Unique tool name (may duplicate 'name' for compatibility) */
|
||||
tool_name?: string;
|
||||
/** Description of the tool */
|
||||
tool_description?: string;
|
||||
/** Input schema for the tool */
|
||||
tool_input_schema?: string;
|
||||
/** Whether the tool is enabled */
|
||||
enabled?: boolean;
|
||||
/** Type of the tool */
|
||||
tool_type?: string;
|
||||
/** Tool configuration */
|
||||
tool_config?: mcp_server.McpToolConfig;
|
||||
}
|
||||
|
||||
export interface UpdateMcpToolResponse {
|
||||
/** Error code */
|
||||
code?: number;
|
||||
/** Error message */
|
||||
error?: string;
|
||||
/** Updated MCP tool details */
|
||||
data?: mcp_server.McpTool;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,989 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
/** Alarm parameters for MQ trigger */
|
||||
export interface AlarmParameters {
|
||||
/** Lag alarm threshold for MQ trigger */
|
||||
lag_alarm_threshold?: number;
|
||||
}
|
||||
|
||||
export interface CreateMqTriggerByTypeRequest {
|
||||
/** Batch size for message consumption */
|
||||
batch_size?: number;
|
||||
/** Batch flush duration in milliseconds */
|
||||
batch_flush_duration_milliseconds?: number;
|
||||
/** Description of the trigger */
|
||||
description?: string;
|
||||
/** Whether the trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Environment variables for the trigger */
|
||||
envs?: Record<string, string>;
|
||||
/** Function ID associated with the trigger */
|
||||
function_id?: string;
|
||||
/** Cell name for the trigger */
|
||||
cell?: string;
|
||||
/** Unique ID for the trigger */
|
||||
id?: string;
|
||||
/** Image version for the trigger */
|
||||
image_version?: string;
|
||||
/** SDK version for the trigger */
|
||||
sdk_version?: string;
|
||||
/** Image alias for the trigger */
|
||||
image_alias?: string;
|
||||
/** List of alarm IDs for monitoring */
|
||||
ms_alarm_id?: Array<string>;
|
||||
/** MQ type for the trigger, enums: kafka, rocketmq, tos, eventbus, abase_binlog, vefaas_async_tos, vefaas_bmq */
|
||||
mq_type?: string;
|
||||
/** Maximum retries from function status */
|
||||
max_retries_from_function_status?: number;
|
||||
/** Message channel length */
|
||||
msg_chan_length?: number;
|
||||
/** Name of the trigger */
|
||||
name?: string;
|
||||
/** Whether auto sharding is needed */
|
||||
need_auto_sharding?: boolean;
|
||||
/** Number of MQ pods to one function pod */
|
||||
num_of_mq_pod_to_one_func_pod?: number;
|
||||
/** Trigger options */
|
||||
options?: common.TriggerOptions;
|
||||
/** QPS limit for the trigger */
|
||||
qps_limit?: number;
|
||||
/** Region for the trigger */
|
||||
region?: string;
|
||||
/** MQ region for the trigger */
|
||||
mq_region?: string;
|
||||
/** Whether to enable runtime agent mode */
|
||||
runtime_agent_mode?: boolean;
|
||||
/** Whether to enable dynamic worker thread */
|
||||
dynamic_worker_thread?: boolean;
|
||||
/** Maximum replica limits per key */
|
||||
replica_max_limit?: Record<string, number>;
|
||||
/** Minimum replica limits per key */
|
||||
replica_min_limit?: Record<string, number>;
|
||||
/** Number of replicas */
|
||||
replicas?: number;
|
||||
/** Resource configuration for the trigger */
|
||||
resource?: common.Resource;
|
||||
/** Whether scaling is enabled */
|
||||
scale_enabled?: boolean;
|
||||
/** Whether vertical scaling is enabled */
|
||||
vertical_scale_enabled?: boolean;
|
||||
/** Whether static membership is enabled */
|
||||
enable_static_membership?: boolean;
|
||||
/** Number of workers per pod */
|
||||
workers_per_pod?: number;
|
||||
/** Alarm parameters for the trigger */
|
||||
alarm_params?: AlarmParameters;
|
||||
/** Request timeout in milliseconds */
|
||||
request_timeout?: number;
|
||||
/** Whether to disable infinite retry for timeout, true means disable */
|
||||
disable_infinite_retry_for_timeout?: boolean;
|
||||
/** Initial offset start position */
|
||||
initial_offset_start_from?: string;
|
||||
/** Whether to enable MQ debug */
|
||||
enable_mq_debug?: boolean;
|
||||
/** MQ logger limit size */
|
||||
mq_logger_limit_size?: number;
|
||||
/** Whether to enable backoff */
|
||||
enable_backoff?: boolean;
|
||||
/** Whether to disable backoff, true means disable */
|
||||
disable_backoff?: boolean;
|
||||
/** Number of worker v2 per half core */
|
||||
worker_v2_num_per_half_core?: number;
|
||||
/** Whether to enable concurrency filter */
|
||||
enable_concurrency_filter?: boolean;
|
||||
/** Whether to enable IPC mode */
|
||||
enable_ipc_mode?: boolean;
|
||||
/** Whether to enable traffic priority scheduling */
|
||||
enable_traffic_priority_scheduling?: boolean;
|
||||
/** Whether to enable pod colocate scheduling */
|
||||
enable_pod_colocate_scheduling?: boolean;
|
||||
/** Whether to enable global rate limiter */
|
||||
enable_global_rate_limiter?: boolean;
|
||||
/** Whether to enable congestion control */
|
||||
enable_congestion_control?: boolean;
|
||||
/** Whether to allow bytesuite debug */
|
||||
allow_bytesuite_debug?: boolean;
|
||||
/** Whether to enable dynamic load balance */
|
||||
enable_dynamic_load_balance?: boolean;
|
||||
/** Whether to disable smooth WRR, true means disable */
|
||||
disable_smooth_wrr?: boolean;
|
||||
/** Type of dynamic load balance, enums: round_robin, smooth_weighted_round_robin, weighted_round_robin */
|
||||
dynamic_load_balance_type?: string;
|
||||
/** Whether replica must meet partition */
|
||||
replica_force_meet_partition?: boolean;
|
||||
/** Scale settings for MQ event */
|
||||
scale_settings?: common.MQEventScaleSettings;
|
||||
/** Whether to enable hot reload */
|
||||
hot_reload?: boolean;
|
||||
/** MQ message type, enums: native (to be deprecated), faas_native, cloudEvent_0_2 */
|
||||
mq_msg_type?: string;
|
||||
/** Status of the trigger, enums: changing, pending, ready, failed, resetting, reset_failed */
|
||||
status?: string;
|
||||
/** Whether the trigger is in releasing state */
|
||||
in_releasing?: boolean;
|
||||
/** Mirror region filter */
|
||||
mirror_region_filter?: string;
|
||||
/** Whether to enable GC tuner */
|
||||
enable_gctuner?: boolean;
|
||||
/** GC tuner percent */
|
||||
gctuner_percent?: number;
|
||||
/** Retry strategy for the trigger, enums: fixed_interval, exponential */
|
||||
retry_strategy?: string;
|
||||
/** Maximum retry time */
|
||||
max_retry_time?: number;
|
||||
/** QPS limit time ranges */
|
||||
qps_limit_time_ranges?: Array<common.QPSLimitTimeRanges>;
|
||||
/** Limit for disaster scenario */
|
||||
limit_disaster_scenario?: number;
|
||||
/** Whether to enable step rate limit */
|
||||
enable_step_rate_limit?: boolean;
|
||||
/** Rate limit step settings */
|
||||
rate_limit_step_settings?: common.RateLimitStepSettings;
|
||||
/** Maximum dwell time in minutes */
|
||||
max_dwell_time_minute?: number;
|
||||
/** QPS auto limit settings */
|
||||
qps_auto_limit?: common.ConsumeMigrateAutoLimit;
|
||||
/** Plugin function parameters */
|
||||
plugin_function_param?: common.PluginFunctionParam;
|
||||
/** Whether to enable plugin function */
|
||||
enable_plugin_function?: boolean;
|
||||
/** Whether to enable canary update */
|
||||
enable_canary_update?: boolean;
|
||||
/** Traffic configuration */
|
||||
traffic_config?: Record<string, number>;
|
||||
/** Whether authentication info is updated */
|
||||
is_auth_info_updated?: boolean;
|
||||
/** Pod type for the trigger */
|
||||
pod_type?: string;
|
||||
/** Package name for the trigger */
|
||||
package?: string;
|
||||
/** Whether to enable filter congestion control */
|
||||
enable_filter_congestion_control?: boolean;
|
||||
/** Whether to enable congestion control cache */
|
||||
enable_congestion_control_cache?: boolean;
|
||||
/** Image version number for the trigger */
|
||||
host_uniq?: common.HostUniq;
|
||||
/** Whether the trigger is in cell migration */
|
||||
in_cell_migration?: boolean;
|
||||
/** Pipeline parameters for the trigger */
|
||||
pipeline_params?: common.PipelineParams;
|
||||
/** Caller identifier in query */
|
||||
caller?: string;
|
||||
/** Service ID in the request path */
|
||||
service_id: string;
|
||||
/** Cluster in the request path */
|
||||
cluster: string;
|
||||
/** Trigger type in the request path,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface CreateMqTriggerByTypeResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Response data for created MQ trigger by type */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface CreateMQTriggerResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Response data for created MQ trigger */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeleteMqTriggerByTypeRequest {
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Region name of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Trigger ID to delete */
|
||||
trigger_id: string;
|
||||
/** Trigger type to delete,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Caller identifier in query */
|
||||
caller?: string;
|
||||
/** Consumer group name in query */
|
||||
consumer_group?: string;
|
||||
/** Event bus name in query */
|
||||
eventbus_name?: string;
|
||||
/** Pipeline template ID for the operation */
|
||||
pipeline_template_id?: string;
|
||||
/** Pipeline template type for the operation */
|
||||
pipeline_template_type?: string;
|
||||
/** User who approved the operation */
|
||||
approved_by?: string;
|
||||
/** User type of the approver. Enums: "person_account","service_account" */
|
||||
approved_by_usertype?: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface DeleteMqTriggerByTypeResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Response data for deleted MQ trigger by type */
|
||||
data?: common.EmptyObject;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetMQeventAdvancedConfigRequest {
|
||||
/** FaaS cluster region in query */
|
||||
region?: string;
|
||||
}
|
||||
|
||||
export interface GetMQeventAdvancedConfigResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
/** List of advanced config data for MQ event */
|
||||
data?: Array<MQEventAdvancedConfigData>;
|
||||
}
|
||||
|
||||
export interface GetMqTriggerByTypeRequest {
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Region name of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Trigger ID to get */
|
||||
trigger_id: string;
|
||||
/** Trigger type to get,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetMqTriggerByTypeResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** MQ trigger response data for the specified type */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetMQTriggerRequest {
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Filter for plugin function enabled triggers */
|
||||
enable_plugin_function?: string;
|
||||
/** Region name of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Filter by plugin function version */
|
||||
plugin_function_version?: string;
|
||||
}
|
||||
|
||||
export interface GetMQTriggerResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of MQ trigger response data */
|
||||
data?: Array<common.GlobalMQEventTriggerResponseData>;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetMQTriggersListWithPaginationRequest {
|
||||
/** Cluster name in query */
|
||||
cluster?: string;
|
||||
/** Limit per page */
|
||||
limit?: number;
|
||||
/** Offset for pagination */
|
||||
offset?: number;
|
||||
/** Region name in query */
|
||||
region?: string;
|
||||
/** Fuzzy search in cluster id and name */
|
||||
search?: string;
|
||||
/** Service ID in path */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetMQTriggersListWithPaginationResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of MQ trigger response data with pagination */
|
||||
data?: Array<common.GlobalMQEventTriggerResponseData>;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Canary update parameters for MQ trigger */
|
||||
export interface MQCanaryUpdateParams {
|
||||
/** Whether canary update is enabled */
|
||||
is_canary_update?: boolean;
|
||||
/** Grey percentage for canary update */
|
||||
grey_percentage?: number;
|
||||
}
|
||||
|
||||
/** Advanced configuration data for MQ event */
|
||||
export interface MQEventAdvancedConfigData {
|
||||
/** 中文名称
|
||||
Name in Chinese */
|
||||
name_zh: string;
|
||||
/** Name in English */
|
||||
name_en: string;
|
||||
/** 中文描述
|
||||
Description in Chinese */
|
||||
des_zh: string;
|
||||
/** Description in English */
|
||||
des_en: string;
|
||||
/** Field name */
|
||||
field: string;
|
||||
/** Value type */
|
||||
value_type: string;
|
||||
/** Expected value map */
|
||||
expect_value: Record<string, string>;
|
||||
/** Show condition */
|
||||
show_condition: string;
|
||||
}
|
||||
|
||||
export interface MQTriggerRestartRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Region name of the service */
|
||||
region: string;
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
/** Maximum surge percent for restart */
|
||||
max_surge_percent?: number;
|
||||
}
|
||||
|
||||
export interface MQTriggerRestartResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Restarted MQ trigger response data */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface PatchMqEventReplicaLimitRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Region name of the service (also in body) */
|
||||
region: string;
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
/** Maximum replica limits per key */
|
||||
replica_max_limit: Record<string, number>;
|
||||
/** Minimum replica limits per key */
|
||||
replica_min_limit: Record<string, number>;
|
||||
}
|
||||
|
||||
export interface PatchMqEventReplicaLimitResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Patched MQ event replica limit response data */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface PatchMqTriggerByTypeRequest {
|
||||
/** Alarm parameters for the trigger */
|
||||
alarm_params?: PatchMqTriggerByTypeRequestAlarmParamsMessage2;
|
||||
/** Whether to allow bytesuite debug */
|
||||
allow_bytesuite_debug?: boolean;
|
||||
/** Batch size for message consumption */
|
||||
batch_size?: number;
|
||||
/** Cell name for the trigger */
|
||||
cell?: string;
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Whether deployment is inactive */
|
||||
deployment_inactive?: boolean;
|
||||
/** Description of the trigger */
|
||||
description?: string;
|
||||
/** Whether to disable backoff, true means disable */
|
||||
disable_backoff?: boolean;
|
||||
/** Whether to disable smooth WRR, true means disable */
|
||||
disable_smooth_wrr?: boolean;
|
||||
/** Type of dynamic load balance, enums: round_robin, smooth_weighted_round_robin, weighted_round_robin */
|
||||
dynamic_load_balance_type?: string;
|
||||
/** Whether to enable dynamic worker thread */
|
||||
dynamic_worker_thread?: boolean;
|
||||
/** Whether to enable backoff */
|
||||
enable_backoff?: boolean;
|
||||
/** Whether to enable concurrency filter */
|
||||
enable_concurrency_filter?: boolean;
|
||||
/** Whether to enable congestion control */
|
||||
enable_congestion_control?: boolean;
|
||||
/** Whether to enable dynamic load balance */
|
||||
enable_dynamic_load_balance?: boolean;
|
||||
/** Whether to enable global rate limiter */
|
||||
enable_global_rate_limiter?: boolean;
|
||||
/** Whether to enable IPC mode */
|
||||
enable_ipc_mode?: boolean;
|
||||
/** Whether to enable MQ debug */
|
||||
enable_mq_debug?: boolean;
|
||||
/** Whether to enable pod colocate scheduling */
|
||||
enable_pod_colocate_scheduling?: boolean;
|
||||
/** Whether to enable static membership */
|
||||
enable_static_membership?: boolean;
|
||||
/** Whether to enable traffic priority scheduling */
|
||||
enable_traffic_priority_scheduling?: boolean;
|
||||
/** Whether the trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Environment variables for the trigger */
|
||||
envs?: Record<string, string>;
|
||||
/** Function ID associated with the trigger */
|
||||
function_id?: string;
|
||||
/** Whether to enable hot reload */
|
||||
hot_reload?: boolean;
|
||||
/** Unique ID for the trigger */
|
||||
id?: string;
|
||||
/** Image alias for the trigger */
|
||||
image_alias?: string;
|
||||
/** Image version for the trigger */
|
||||
image_version?: string;
|
||||
/** Initial offset start position */
|
||||
initial_offset_start_from?: string;
|
||||
/** Whether authentication info is updated */
|
||||
is_auth_info_updated?: boolean;
|
||||
/** Maximum retries from function status */
|
||||
max_retries_from_function_status?: number;
|
||||
/** MQ logger limit size */
|
||||
mq_logger_limit_size?: number;
|
||||
/** MQ message type, enums: native (to be deprecated), faas_native, cloudEvent_0_2 */
|
||||
mq_msg_type?: string;
|
||||
/** MQ region for the trigger */
|
||||
mq_region?: string;
|
||||
/** MQ type for the trigger, enums: kafka, rocketmq, tos, eventbus, abase_binlog, vefaas_async_tos, vefaas_bmq */
|
||||
mq_type?: string;
|
||||
/** List of alarm IDs for monitoring */
|
||||
ms_alarm_id?: Array<string>;
|
||||
/** Message channel length */
|
||||
msg_chan_length?: number;
|
||||
/** Name of the trigger */
|
||||
name?: string;
|
||||
/** Whether auto sharding is needed */
|
||||
need_auto_sharding?: boolean;
|
||||
/** Number of MQ pods to one function pod */
|
||||
num_of_mq_pod_to_one_func_pod?: number;
|
||||
/** Trigger options */
|
||||
options?: common.TriggerOptions;
|
||||
/** Plugin function parameters */
|
||||
plugin_function_param?: common.PluginFunctionParam;
|
||||
/** QPS limit for the trigger */
|
||||
qps_limit?: number;
|
||||
/** Region name of the service */
|
||||
region: string;
|
||||
/** Maximum replica limit */
|
||||
replica_max_limit?: number;
|
||||
/** Minimum replica limit */
|
||||
replica_min_limit?: number;
|
||||
/** Number of replicas */
|
||||
replicas?: number;
|
||||
/** Request timeout in milliseconds */
|
||||
request_timeout?: number;
|
||||
/** Resource limit for the trigger */
|
||||
resource?: common.ResourceLimit;
|
||||
/** Whether to enable runtime agent mode */
|
||||
runtime_agent_mode?: boolean;
|
||||
/** Whether scaling is enabled */
|
||||
scale_enabled?: boolean;
|
||||
/** Scale settings for MQ event */
|
||||
scale_settings?: common.MQEventScaleSettings;
|
||||
/** SDK version for the trigger */
|
||||
sdk_version?: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
/** trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Whether vertical scaling is enabled */
|
||||
vertical_scale_enabled?: boolean;
|
||||
/** Number of worker v2 per half core */
|
||||
worker_v2_num_per_half_core?: number;
|
||||
/** Number of workers per pod */
|
||||
workers_per_pod?: number;
|
||||
/** Whether to enable plugin function */
|
||||
enable_plugin_function?: boolean;
|
||||
/** Whether to disable infinite retry for timeout, true means disable */
|
||||
disable_infinite_retry_for_timeout?: boolean;
|
||||
/** Mirror region filter */
|
||||
mirror_region_filter?: string;
|
||||
/** Whether to enable GC tuner */
|
||||
enable_gctuner?: boolean;
|
||||
/** GC tuner percent */
|
||||
gctuner_percent?: number;
|
||||
/** Retry strategy for the trigger, enums: fixed_interval, exponential */
|
||||
retry_strategy?: string;
|
||||
/** Maximum retry time */
|
||||
max_retry_time?: number;
|
||||
/** QPS limit time ranges */
|
||||
qps_limit_time_ranges?: Array<common.QPSLimitTimeRanges>;
|
||||
/** Rate limit step settings */
|
||||
rate_limit_step_settings?: common.RateLimitStepSettings;
|
||||
/** Whether to enable step rate limit */
|
||||
enable_step_rate_limit?: boolean;
|
||||
/** Whether to enable filter congestion control */
|
||||
enable_filter_congestion_control?: boolean;
|
||||
/** Whether to enable congestion control cache */
|
||||
enable_congestion_control_cache?: boolean;
|
||||
}
|
||||
|
||||
/** Alarm parameters for patching an MQ trigger */
|
||||
export interface PatchMqTriggerByTypeRequestAlarmParamsMessage2 {
|
||||
/** Lag alarm threshold for MQ trigger */
|
||||
lag_alarm_threshold?: number;
|
||||
}
|
||||
|
||||
export interface PatchMqTriggerByTypeResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Patched MQ trigger response data */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface PatchMqTriggerRestrictedMetaByTypeRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Target cluster name for migration */
|
||||
cluster?: string;
|
||||
/** Region name of the function */
|
||||
region: string;
|
||||
}
|
||||
|
||||
export interface SyncMqTriggerDataRequest {
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Region name of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
}
|
||||
|
||||
export interface SyncMqTriggerDataResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Synced MQ trigger response data */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateMqTriggerByTypeRequest {
|
||||
/** Batch size for message consumption */
|
||||
batch_size?: number;
|
||||
/** Batch flush duration in milliseconds */
|
||||
batch_flush_duration_milliseconds?: number;
|
||||
/** Description of the trigger */
|
||||
description?: string;
|
||||
/** Whether the trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Environment variables for the trigger */
|
||||
envs?: Record<string, string>;
|
||||
/** Function ID associated with the trigger */
|
||||
function_id?: string;
|
||||
/** Cell name for the trigger */
|
||||
cell?: string;
|
||||
/** Unique ID for the trigger */
|
||||
id?: string;
|
||||
/** Image version for the trigger */
|
||||
image_version?: string;
|
||||
/** SDK version for the trigger */
|
||||
sdk_version?: string;
|
||||
/** Image alias for the trigger */
|
||||
image_alias?: string;
|
||||
/** List of alarm IDs for monitoring */
|
||||
ms_alarm_id?: Array<string>;
|
||||
/** MQ type for the trigger, enums: kafka, rocketmq, tos, eventbus, abase_binlog, vefaas_async_tos, vefaas_bmq */
|
||||
mq_type?: string;
|
||||
/** Maximum retries from function status */
|
||||
max_retries_from_function_status?: number;
|
||||
/** Message channel length */
|
||||
msg_chan_length?: number;
|
||||
/** Name of the trigger */
|
||||
name?: string;
|
||||
/** Whether auto sharding is needed */
|
||||
need_auto_sharding?: boolean;
|
||||
/** Number of MQ pods to one function pod */
|
||||
num_of_mq_pod_to_one_func_pod?: number;
|
||||
/** Trigger options */
|
||||
options?: common.TriggerOptions;
|
||||
/** QPS limit for the trigger */
|
||||
qps_limit?: number;
|
||||
/** Region for the trigger */
|
||||
region?: string;
|
||||
/** MQ region for the trigger */
|
||||
mq_region?: string;
|
||||
/** Whether to enable runtime agent mode */
|
||||
runtime_agent_mode?: boolean;
|
||||
/** Whether to enable dynamic worker thread */
|
||||
dynamic_worker_thread?: boolean;
|
||||
/** Maximum replica limits per key */
|
||||
replica_max_limit?: Record<string, number>;
|
||||
/** Minimum replica limits per key */
|
||||
replica_min_limit?: Record<string, number>;
|
||||
/** Number of replicas */
|
||||
replicas?: number;
|
||||
/** Resource configuration for the trigger */
|
||||
resource?: common.Resource;
|
||||
/** Whether scaling is enabled */
|
||||
scale_enabled?: boolean;
|
||||
/** Whether vertical scaling is enabled */
|
||||
vertical_scale_enabled?: boolean;
|
||||
/** Whether to enable static membership */
|
||||
enable_static_membership?: boolean;
|
||||
/** Number of workers per pod */
|
||||
workers_per_pod?: number;
|
||||
/** Alarm parameters for the trigger */
|
||||
alarm_params?: AlarmParameters;
|
||||
/** Request timeout in milliseconds */
|
||||
request_timeout?: number;
|
||||
/** Whether to disable infinite retry for timeout, true means disable */
|
||||
disable_infinite_retry_for_timeout?: boolean;
|
||||
/** Initial offset start position */
|
||||
initial_offset_start_from?: string;
|
||||
/** Whether to enable MQ debug mode */
|
||||
enable_mq_debug?: boolean;
|
||||
/** MQ logger limit size */
|
||||
mq_logger_limit_size?: number;
|
||||
/** Whether to enable backoff */
|
||||
enable_backoff?: boolean;
|
||||
/** Whether to disable backoff, true means disable */
|
||||
disable_backoff?: boolean;
|
||||
/** Number of worker v2 per half core */
|
||||
worker_v2_num_per_half_core?: number;
|
||||
/** Whether to enable concurrency filter */
|
||||
enable_concurrency_filter?: boolean;
|
||||
/** Whether to enable IPC mode */
|
||||
enable_ipc_mode?: boolean;
|
||||
/** Whether to enable traffic priority scheduling */
|
||||
enable_traffic_priority_scheduling?: boolean;
|
||||
/** Whether to enable pod colocate scheduling */
|
||||
enable_pod_colocate_scheduling?: boolean;
|
||||
/** Whether to enable global rate limiter */
|
||||
enable_global_rate_limiter?: boolean;
|
||||
/** Whether to enable congestion control */
|
||||
enable_congestion_control?: boolean;
|
||||
/** Whether to allow bytesuite debug mode */
|
||||
allow_bytesuite_debug?: boolean;
|
||||
/** Whether to enable dynamic load balancing */
|
||||
enable_dynamic_load_balance?: boolean;
|
||||
/** Whether to disable smooth weighted round robin, true means disable */
|
||||
disable_smooth_wrr?: boolean;
|
||||
/** Type of dynamic load balancing, enums: round_robin, smooth_weighted_round_robin, weighted_round_robin */
|
||||
dynamic_load_balance_type?: string;
|
||||
/** Whether replica must meet partition requirement */
|
||||
replica_force_meet_partition?: boolean;
|
||||
/** Scale settings for MQ event */
|
||||
scale_settings?: common.MQEventScaleSettings;
|
||||
/** Whether to enable hot reload */
|
||||
hot_reload?: boolean;
|
||||
/** MQ message type, enums: native (to be deprecated), faas_native, cloudEvent_0_2 */
|
||||
mq_msg_type?: string;
|
||||
/** Status of the trigger, enums: changing, pending, ready, failed, resetting, reset_failed */
|
||||
status?: string;
|
||||
/** Whether the trigger is in releasing state */
|
||||
in_releasing?: boolean;
|
||||
/** Mirror region filter */
|
||||
mirror_region_filter?: string;
|
||||
/** Whether to enable GC tuner */
|
||||
enable_gctuner?: boolean;
|
||||
/** GC tuner percent */
|
||||
gctuner_percent?: number;
|
||||
/** Retry strategy for the trigger, enums: fixed_interval, exponential */
|
||||
retry_strategy?: string;
|
||||
/** Maximum retry time */
|
||||
max_retry_time?: number;
|
||||
/** QPS limit time ranges */
|
||||
qps_limit_time_ranges?: Array<common.QPSLimitTimeRanges>;
|
||||
/** Limit for disaster scenario */
|
||||
limit_disaster_scenario?: number;
|
||||
/** Whether to enable step rate limit */
|
||||
enable_step_rate_limit?: boolean;
|
||||
/** Rate limit step settings */
|
||||
rate_limit_step_settings?: common.RateLimitStepSettings;
|
||||
/** Maximum dwell time in minutes */
|
||||
max_dwell_time_minute?: number;
|
||||
/** QPS auto limit settings for consumption migration */
|
||||
qps_auto_limit?: common.ConsumeMigrateAutoLimit;
|
||||
/** Plugin function parameters */
|
||||
plugin_function_param?: common.PluginFunctionParam;
|
||||
/** Whether to enable plugin function */
|
||||
enable_plugin_function?: boolean;
|
||||
/** Whether to enable canary update */
|
||||
enable_canary_update?: boolean;
|
||||
/** Traffic configuration mapping */
|
||||
traffic_config?: Record<string, number>;
|
||||
/** Whether authentication info is updated */
|
||||
is_auth_info_updated?: boolean;
|
||||
/** Pod type for the trigger */
|
||||
pod_type?: string;
|
||||
/** Package name for the trigger */
|
||||
package?: string;
|
||||
/** Whether to enable filter congestion control */
|
||||
enable_filter_congestion_control?: boolean;
|
||||
/** Whether to enable congestion control cache */
|
||||
enable_congestion_control_cache?: boolean;
|
||||
/** Image version number for the trigger */
|
||||
image_version_number?: string;
|
||||
/** Host unique identifier */
|
||||
host_uniq?: common.HostUniq;
|
||||
/** Whether the trigger is in cell migration */
|
||||
in_cell_migration?: boolean;
|
||||
/** Canary update parameters for the MQ trigger */
|
||||
mq_canary_update_params?: MQCanaryUpdateParams;
|
||||
/** Pipeline parameters for the trigger */
|
||||
pipeline_params?: common.PipelineParams;
|
||||
/** Service ID in path */
|
||||
service_id: string;
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Whether to skip image upgrade */
|
||||
skip_image_upgrade?: string;
|
||||
/** Caller identifier */
|
||||
caller?: string;
|
||||
/** Whether to skip alarm updates */
|
||||
not_update_alarm?: string;
|
||||
/** Whether migration was triggered by CLI */
|
||||
migrated_by_cli?: string;
|
||||
/** Check parameter for validation */
|
||||
check?: string;
|
||||
/** Force update flag for MQ event */
|
||||
'X-Bytefaas-Mqevent-Force-Update'?: string;
|
||||
/** Confirmation parameter */
|
||||
confirm?: string;
|
||||
/** Flag to update MQ image */
|
||||
'X-ByteFaas-Update-MQ-Image'?: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface UpdateMqTriggerByTypeResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Updated MQ trigger response data by type */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateMQTriggerRequest {
|
||||
/** Alarm parameters for the MQ trigger */
|
||||
alarm_params?: UpdateMQTriggerRequestAlarmParamsMessage2;
|
||||
/** Whether to allow bytesuite debug mode */
|
||||
allow_bytesuite_debug?: boolean;
|
||||
/** Batch size for message consumption */
|
||||
batch_size?: number;
|
||||
/** Cell name for the trigger */
|
||||
cell?: string;
|
||||
/** Cluster name of the service */
|
||||
cluster: string;
|
||||
/** Whether the deployment is inactive */
|
||||
deployment_inactive?: boolean;
|
||||
/** Description of the trigger */
|
||||
description?: string;
|
||||
/** Whether to disable backoff, true means disable */
|
||||
disable_backoff?: boolean;
|
||||
/** Whether to disable smooth weighted round robin, true means disable */
|
||||
disable_smooth_wrr?: boolean;
|
||||
/** Type of dynamic load balancing, enums: round_robin, smooth_weighted_round_robin, weighted_round_robin */
|
||||
dynamic_load_balance_type?: string;
|
||||
/** Whether to enable dynamic worker thread */
|
||||
dynamic_worker_thread?: boolean;
|
||||
/** Whether to enable backoff */
|
||||
enable_backoff?: boolean;
|
||||
/** Whether to enable concurrency filter */
|
||||
enable_concurrency_filter?: boolean;
|
||||
/** Whether to enable congestion control */
|
||||
enable_congestion_control?: boolean;
|
||||
/** Whether to enable dynamic load balancing */
|
||||
enable_dynamic_load_balance?: boolean;
|
||||
/** Whether to enable global rate limiter */
|
||||
enable_global_rate_limiter?: boolean;
|
||||
/** Whether to enable IPC mode */
|
||||
enable_ipc_mode?: boolean;
|
||||
/** Whether to enable MQ debug mode */
|
||||
enable_mq_debug?: boolean;
|
||||
/** Whether to enable pod colocate scheduling */
|
||||
enable_pod_colocate_scheduling?: boolean;
|
||||
/** Whether to enable static membership */
|
||||
enable_static_membership?: boolean;
|
||||
/** Whether to enable traffic priority scheduling */
|
||||
enable_traffic_priority_scheduling?: boolean;
|
||||
/** Whether the trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Environment variables for the trigger */
|
||||
envs?: Record<string, string>;
|
||||
/** Function ID associated with the trigger */
|
||||
function_id?: string;
|
||||
/** Whether to enable hot reload */
|
||||
hot_reload?: boolean;
|
||||
/** Unique ID for the trigger */
|
||||
id?: string;
|
||||
/** Image alias for the trigger */
|
||||
image_alias?: string;
|
||||
/** Image version for the trigger */
|
||||
image_version?: string;
|
||||
/** Initial offset start position */
|
||||
initial_offset_start_from?: string;
|
||||
/** Whether authentication info is updated */
|
||||
is_auth_info_updated?: boolean;
|
||||
/** Maximum retries from function status */
|
||||
max_retries_from_function_status?: number;
|
||||
/** MQ logger limit size */
|
||||
mq_logger_limit_size?: number;
|
||||
/** MQ message type, enums: native (to be deprecated), faas_native, cloudEvent_0_2 */
|
||||
mq_msg_type?: string;
|
||||
/** MQ region for the trigger */
|
||||
mq_region?: string;
|
||||
/** MQ type for the trigger, enums: kafka, rocketmq, tos, eventbus, abase_binlog, vefaas_async_tos, vefaas_bmq */
|
||||
mq_type?: string;
|
||||
/** List of alarm IDs for monitoring */
|
||||
ms_alarm_id?: Array<string>;
|
||||
/** Message channel length */
|
||||
msg_chan_length?: number;
|
||||
/** Name of the trigger */
|
||||
name?: string;
|
||||
/** Whether auto sharding is needed */
|
||||
need_auto_sharding?: boolean;
|
||||
/** Number of MQ pods to one function pod */
|
||||
num_of_mq_pod_to_one_func_pod?: number;
|
||||
/** Trigger options */
|
||||
options?: common.TriggerOptions;
|
||||
/** Plugin function parameters */
|
||||
plugin_function_param?: common.PluginFunctionParam;
|
||||
/** QPS limit for the trigger */
|
||||
qps_limit?: number;
|
||||
/** Region name of the service */
|
||||
region: string;
|
||||
/** Maximum replica limit */
|
||||
replica_max_limit?: number;
|
||||
/** Minimum replica limit */
|
||||
replica_min_limit?: number;
|
||||
/** Number of replicas */
|
||||
replicas?: number;
|
||||
/** Request timeout in milliseconds */
|
||||
request_timeout?: number;
|
||||
/** Resource limit for the trigger */
|
||||
resource?: common.ResourceLimit;
|
||||
/** Whether to enable runtime agent mode */
|
||||
runtime_agent_mode?: boolean;
|
||||
/** Whether scaling is enabled */
|
||||
scale_enabled?: boolean;
|
||||
/** Scale settings for MQ event */
|
||||
scale_settings?: common.MQEventScaleSettings;
|
||||
/** SDK version for the trigger */
|
||||
sdk_version?: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** MQ trigger ID */
|
||||
trigger_id: string;
|
||||
/** Whether vertical scaling is enabled */
|
||||
vertical_scale_enabled?: boolean;
|
||||
/** Number of worker v2 per half core */
|
||||
worker_v2_num_per_half_core?: number;
|
||||
/** Number of workers per pod */
|
||||
workers_per_pod?: number;
|
||||
/** Whether to enable plugin function */
|
||||
enable_plugin_function?: boolean;
|
||||
/** Whether to disable infinite retry for timeout, true means disable */
|
||||
disable_infinite_retry_for_timeout?: boolean;
|
||||
/** Mirror region filter */
|
||||
mirror_region_filter?: string;
|
||||
/** Whether to enable GC tuner */
|
||||
enable_gctuner?: boolean;
|
||||
/** GC tuner percent */
|
||||
gctuner_percent?: number;
|
||||
/** Retry strategy for the trigger, enums: fixed_interval, exponential */
|
||||
retry_strategy?: string;
|
||||
/** Maximum retry time */
|
||||
max_retry_time?: number;
|
||||
/** QPS limit time ranges */
|
||||
qps_limit_time_ranges?: Array<common.QPSLimitTimeRanges>;
|
||||
/** Rate limit step settings */
|
||||
rate_limit_step_settings?: common.RateLimitStepSettings;
|
||||
/** Whether to enable step rate limit */
|
||||
enable_step_rate_limit?: boolean;
|
||||
/** Whether to enable filter congestion control */
|
||||
enable_filter_congestion_control?: boolean;
|
||||
/** Whether to enable congestion control cache */
|
||||
enable_congestion_control_cache?: boolean;
|
||||
/** Image version number for the trigger */
|
||||
image_version_number?: string;
|
||||
/** Host unique identifier */
|
||||
host_uniq?: common.HostUniq;
|
||||
/** Whether the trigger is in cell migration */
|
||||
in_cell_migration?: boolean;
|
||||
/** Canary update parameters for the MQ trigger */
|
||||
mq_canary_update_params?: MQCanaryUpdateParams;
|
||||
/** Pipeline parameters for the trigger */
|
||||
pipeline_params?: common.PipelineParams;
|
||||
}
|
||||
|
||||
/** Alarm parameters for updating MQ trigger */
|
||||
export interface UpdateMQTriggerRequestAlarmParamsMessage2 {
|
||||
/** Lag alarm threshold for MQ trigger */
|
||||
lag_alarm_threshold?: number;
|
||||
}
|
||||
|
||||
export interface UpdateMQTriggerResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Updated MQ trigger response data */
|
||||
data?: common.GlobalMQEventTriggerResponseData;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export enum ChargeItemType {
|
||||
ChargeItemTypeNew = 1,
|
||||
ChargeItemTypeExpand = 2,
|
||||
ChargeItemTypeShrink = 3,
|
||||
ChargeItemTypeUpgrade = 4,
|
||||
ChargeItemTypeDowngrade = 5,
|
||||
ChargeItemTypeRemove = 6,
|
||||
}
|
||||
|
||||
export interface ByteTree {
|
||||
/** 必填
|
||||
rds传_read/_write两个psm,其他产品传一个 */
|
||||
PSMs?: Array<string>;
|
||||
/** TreeOperationCreate/TreeOperationDelete 时必填
|
||||
服务树provider */
|
||||
Provider?: string;
|
||||
/** 需要挂载的服务树的位置 */
|
||||
ParentNodeID?: Int64;
|
||||
/** 租户ID,用于选账号逻辑 */
|
||||
TenantID?: string;
|
||||
/** 环境:boe/prod/ppe */
|
||||
Env?: string;
|
||||
/** 对应的region,比如cn */
|
||||
Region?: string;
|
||||
/** 对应的partition,比如cn */
|
||||
Partition?: string;
|
||||
/** TreeOperationCreate 时必填
|
||||
控制面对应资源的链接 */
|
||||
ResourceLink?: ResourceLink;
|
||||
/** 挂树操作人 */
|
||||
OpUser?: string;
|
||||
/** TreeOperationCreate 时选填
|
||||
服务树描述 */
|
||||
Description?: string;
|
||||
/** 该资源初始化时候IAM的owner的个人账号 */
|
||||
OwnerList?: Array<string>;
|
||||
/** 该资源初始化时候IAM的owner的服务账号 */
|
||||
ServiceAccountList?: Array<string>;
|
||||
/** 服务树标签 */
|
||||
Tags?: Record<string, string>;
|
||||
/** 仅MQ挂载group的时候需要 */
|
||||
GroupName?: string;
|
||||
/** 仅MQ挂载topic的时候需要 */
|
||||
TopicName?: string;
|
||||
}
|
||||
|
||||
/** 配置单 */
|
||||
export interface ChargeItem {
|
||||
Flavor: string;
|
||||
BeforeValue: number;
|
||||
AfterValue: number;
|
||||
ChargeItemType: ChargeItemType;
|
||||
/** 根据业务是否按VDC分配quota而定 */
|
||||
VDC?: string;
|
||||
/** babi售卖区,有的计费项比较奇怪,这里支持直接传值 */
|
||||
SalesArea?: string;
|
||||
IsForPrice?: boolean;
|
||||
}
|
||||
|
||||
export interface DataMessage18 {}
|
||||
|
||||
export interface DataMessage20 {
|
||||
format_regions_backend?: Array<DataMessage20FormatRegionsBackendMessage>;
|
||||
}
|
||||
|
||||
export interface DataMessage20FormatRegionsBackendMessage {
|
||||
backend?: boolean;
|
||||
frontend?: boolean;
|
||||
region?: string;
|
||||
}
|
||||
|
||||
export interface Error {
|
||||
CodeN: Int64;
|
||||
Code: string;
|
||||
Message: string;
|
||||
}
|
||||
|
||||
export interface GetOrderConfigRequest {
|
||||
env: string;
|
||||
function_id: string;
|
||||
parent_node_id: Int64;
|
||||
psm: string;
|
||||
service_id: string;
|
||||
region: string;
|
||||
cluster?: OrderConfigCluster;
|
||||
mq_event?: OrderConfigMqEvent;
|
||||
}
|
||||
|
||||
export interface GetOrderConfigResp {
|
||||
ResponseMetaData: ResponseMetaData;
|
||||
/** 用于挂树预检查和选火山账号使用 */
|
||||
ByteTree: ByteTree;
|
||||
/** 10: optional ark.ArkData ArkData
|
||||
99: optional list<OrderConfig> OrderConfigs // 兼容tce等组件可以跨region下单 */
|
||||
OrderConfig?: OrderConfig;
|
||||
}
|
||||
|
||||
export interface getRegionsEnabledRequest {}
|
||||
|
||||
export interface GetRegionsEnabledResponse {
|
||||
code?: number;
|
||||
data?: DataMessage20;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface getRegionZonesRequest {}
|
||||
|
||||
export interface GetRegionZonesResponse {
|
||||
code?: number;
|
||||
data?: Record<string, Array<string>>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface getRuntimeRequest {}
|
||||
|
||||
export interface GetRuntimeResponse {
|
||||
code?: number;
|
||||
/** region will be key name */
|
||||
data?: Record<string, Array<Runtime>>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface OrderConfig {
|
||||
PID: string;
|
||||
ProductID: string;
|
||||
Region: string;
|
||||
NeedConvertToInnerChargeItem?: boolean;
|
||||
ChargeItems: Array<ChargeItem>;
|
||||
}
|
||||
|
||||
export interface OrderConfigCluster {
|
||||
http_trigger_disable?: boolean;
|
||||
pod_type: string;
|
||||
replica_limit: Record<string, common.PodReplicaLimit>;
|
||||
resource_limit: common.Resource;
|
||||
}
|
||||
|
||||
export interface OrderConfigMqEvent {
|
||||
resource: common.Resource;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface PrescanRequest {
|
||||
hours: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** zone */
|
||||
zone: string;
|
||||
}
|
||||
|
||||
export interface PrescanResponse {
|
||||
code?: number;
|
||||
data?: DataMessage18;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface ResourceLink {
|
||||
Schema?: string;
|
||||
Action?: string;
|
||||
/** 在Thrift中没有完全直接对应的any原生类型 */
|
||||
Params?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ResponseMetaData {
|
||||
RequestId: string;
|
||||
Service: string;
|
||||
Error: Error;
|
||||
}
|
||||
|
||||
export interface Runtime {
|
||||
category?: string;
|
||||
default_template?: string;
|
||||
function_type?: string;
|
||||
key?: string;
|
||||
name?: string;
|
||||
show?: boolean;
|
||||
supported_protocols?: Array<string>;
|
||||
supported_domains?: Array<string>;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface GetFunctionResourcePackagesRequest {
|
||||
/** Whether the function is a plugin function */
|
||||
is_plugin_function?: boolean;
|
||||
/** Whether the function is a worker */
|
||||
is_worker?: boolean;
|
||||
/** Runtime type to filter packages */
|
||||
runtime?: string;
|
||||
/** Region to query packages for */
|
||||
region?: string;
|
||||
/** Whether the function is triggered by MQ event */
|
||||
is_mq_event_trigger?: boolean;
|
||||
/** Function category */
|
||||
category?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Parent PSM ID */
|
||||
psm_parent_id?: Int64;
|
||||
}
|
||||
|
||||
export interface GetFunctionResourcePackagesResponse {
|
||||
code: number;
|
||||
data: Array<common.ResourceLimitWithAlias>;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface GetPackageListRequest {
|
||||
/** Region to query packages for */
|
||||
region: string;
|
||||
}
|
||||
|
||||
export interface GetPackageListResponse {
|
||||
code: number;
|
||||
data: Array<Package>;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface Package {
|
||||
/** Package name */
|
||||
name: string;
|
||||
/** Resource limits and alias for the package */
|
||||
resource_limit: common.ResourceLimitWithAlias;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,280 @@
|
||||
/*
|
||||
* 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 CreatePipelineTemplateRequest {
|
||||
/** template name, for display purpose */
|
||||
name: string;
|
||||
/** pipeline type, e.g. MultiClusterNormalRelease */
|
||||
type: string;
|
||||
/** template description */
|
||||
description: string;
|
||||
/** whether the template is a system template, only Faas admin can set this */
|
||||
system_template: boolean;
|
||||
/** whether the template is disabled, can be used to create draft template */
|
||||
disabled: boolean;
|
||||
stages: Array<CreatePipelineTemplateStageData>;
|
||||
/** template match rules */
|
||||
match_rules: PipelineTemplateMatchRules;
|
||||
/** whether the template is a default template */
|
||||
default_template?: boolean;
|
||||
/** template admins */
|
||||
admins?: Array<string>;
|
||||
}
|
||||
|
||||
export interface CreatePipelineTemplateResponse {
|
||||
/** response code */
|
||||
code: number;
|
||||
/** error message, if any */
|
||||
error?: string;
|
||||
/** updated template */
|
||||
data: PipelineTemplate;
|
||||
}
|
||||
|
||||
export interface CreatePipelineTemplateStageData {
|
||||
/** stage type */
|
||||
type: string;
|
||||
/** stage group */
|
||||
group: string;
|
||||
/** stage parameters, json encoded in base64. e.g {"rolling_interval": 10} */
|
||||
parameters: string;
|
||||
}
|
||||
|
||||
export interface DeletePipelineTemplateRequest {
|
||||
/** template id to delete */
|
||||
template_id: string;
|
||||
}
|
||||
|
||||
export interface DeletePipelineTemplateResponse {}
|
||||
|
||||
export interface GetPipelineTemplateRequest {
|
||||
/** template id */
|
||||
template_id: string;
|
||||
}
|
||||
|
||||
export interface GetPipelineTemplateResponse {
|
||||
/** response code */
|
||||
code: number;
|
||||
/** error message, if any */
|
||||
error?: string;
|
||||
/** pipeline template */
|
||||
data?: PipelineTemplate;
|
||||
}
|
||||
|
||||
export interface GetServiceDefaultPipelineTemplateRequest {
|
||||
/** service id */
|
||||
service_id: string;
|
||||
/** pipeline operation type, available: [release, release_lego] */
|
||||
operation: string;
|
||||
}
|
||||
|
||||
export interface GetServiceDefaultPipelineTemplateResponse {
|
||||
/** response code */
|
||||
code: number;
|
||||
/** error message, if any */
|
||||
error?: string;
|
||||
/** selected pipeline template, can be null if no default template is found */
|
||||
data?: PipelineTemplate;
|
||||
}
|
||||
|
||||
export interface GetServicePipelineTemplateRequest {
|
||||
/** service id */
|
||||
service_id: string;
|
||||
/** pipeline operation type, available: [release, release_lego] */
|
||||
operation?: string;
|
||||
/** whether to include system template */
|
||||
include_system_template?: boolean;
|
||||
/** whether to include disabled template */
|
||||
include_disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface GetServicePipelineTemplateResponse {
|
||||
/** response code */
|
||||
code: number;
|
||||
/** error message, if any */
|
||||
error?: string;
|
||||
/** list of pipeline templates */
|
||||
data?: Array<PipelineTemplate>;
|
||||
}
|
||||
|
||||
export interface ListPipelineStageRequest {
|
||||
/** filter by system stage */
|
||||
system_stage?: boolean;
|
||||
}
|
||||
|
||||
export interface ListPipelineStageResponse {
|
||||
/** response code */
|
||||
code: number;
|
||||
/** error message, if any */
|
||||
error?: string;
|
||||
/** updated template */
|
||||
data: Array<PipelineStageDefinition>;
|
||||
}
|
||||
|
||||
export interface ListPipelineTemplateRequest {
|
||||
/** filter by base template */
|
||||
base_template?: boolean;
|
||||
/** filter by system template */
|
||||
system_template?: boolean;
|
||||
/** filter by service id */
|
||||
service_id?: string;
|
||||
/** filter by bytetree id */
|
||||
bytetree_id?: string;
|
||||
/** query result limit */
|
||||
limit?: number;
|
||||
/** query result offset */
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface ListPipelineTemplateResponse {
|
||||
/** response code */
|
||||
code: number;
|
||||
/** error message, if any */
|
||||
error?: string;
|
||||
/** list of pipeline templates */
|
||||
data?: Array<PipelineTemplate>;
|
||||
}
|
||||
|
||||
export interface PipelineStage {
|
||||
/** stage id, unique for all stages even with the same stage type */
|
||||
id: string;
|
||||
/** stage type */
|
||||
type: string;
|
||||
/** stage group, for frontend display purpose only */
|
||||
group: string;
|
||||
/** whether the stage's parameters are editable */
|
||||
editable: boolean;
|
||||
/** whether the stage can be removed from a template */
|
||||
deletable: boolean;
|
||||
/** stage parameters, json encoded in base64. e.g {"rolling_interval": 10} */
|
||||
parameters: string;
|
||||
}
|
||||
|
||||
export interface PipelineStageDefinition {
|
||||
/** stage Chinese name */
|
||||
name_cn: string;
|
||||
/** stage English name */
|
||||
name_en: string;
|
||||
/** stage type */
|
||||
type: string;
|
||||
/** whether the stage is a system stage, system stage can't be added to a template by user */
|
||||
system_stage: boolean;
|
||||
/** defines stage parameter's properties such as type and display name, object key is the field name */
|
||||
parameter_properties: Record<string, PipelineStageParameterProperty>;
|
||||
}
|
||||
|
||||
export interface PipelineStageParameterProperty {
|
||||
/** field name in Chinese */
|
||||
title_cn: string;
|
||||
/** field name in English */
|
||||
title_en: string;
|
||||
/** field type, [string, number, enum] */
|
||||
type: string;
|
||||
/** whether the field is required */
|
||||
required: boolean;
|
||||
/** default value */
|
||||
default: string;
|
||||
/** field name in Chinese */
|
||||
description_cn: string;
|
||||
/** field name in English */
|
||||
description_en: string;
|
||||
}
|
||||
|
||||
export interface PipelineTemplate {
|
||||
/** template id */
|
||||
id: string;
|
||||
/** template name */
|
||||
name: string;
|
||||
/** pipeline type */
|
||||
type: string;
|
||||
/** template description */
|
||||
description: string;
|
||||
/** whether the template is disabled */
|
||||
disabled: boolean;
|
||||
/** pipeline operation type, available: [release, release_lego] */
|
||||
operation_type: string;
|
||||
/** pipeline stages */
|
||||
stages: Array<PipelineStage>;
|
||||
/** whether the template is a system template, system template will be available to all services */
|
||||
system_template: boolean;
|
||||
/** whether the template is a base template, base templates are used to create a new template */
|
||||
base_template: boolean;
|
||||
/** template created by user */
|
||||
created_by: string;
|
||||
/** template updated by user */
|
||||
updated_by: string;
|
||||
/** template created at */
|
||||
created_at: string;
|
||||
/** template updated at */
|
||||
updated_at: string;
|
||||
/** template match rules */
|
||||
match_rules: PipelineTemplateMatchRules;
|
||||
/** whether the template is a default template */
|
||||
default_template?: boolean;
|
||||
/** template admins */
|
||||
admins?: Array<string>;
|
||||
}
|
||||
|
||||
export interface PipelineTemplateMatchRules {
|
||||
/** match by service ids */
|
||||
service_ids?: Array<string>;
|
||||
/** match by bytetree ids */
|
||||
bytetree_ids?: Array<Int64>;
|
||||
}
|
||||
|
||||
export interface UpdatePipelineTemplateRequest {
|
||||
/** template name, for display purpose */
|
||||
name: string;
|
||||
/** template description */
|
||||
description: string;
|
||||
/** whether the template is disabled, can be used to create draft template */
|
||||
disabled: string;
|
||||
/** template stages */
|
||||
stages: Array<UpdatePipelineTemplateStageData>;
|
||||
/** template match rules */
|
||||
match_rules: PipelineTemplateMatchRules;
|
||||
/** whether the template is a default template */
|
||||
default_template?: boolean;
|
||||
/** template admins */
|
||||
admins?: Array<string>;
|
||||
/** template created by, for paas service account only */
|
||||
created_by?: string;
|
||||
/** template id */
|
||||
template_id: string;
|
||||
}
|
||||
|
||||
export interface UpdatePipelineTemplateResponse {
|
||||
/** response code */
|
||||
code: number;
|
||||
/** error message, if any */
|
||||
error?: string;
|
||||
/** updated template */
|
||||
data: PipelineTemplate;
|
||||
}
|
||||
|
||||
export interface UpdatePipelineTemplateStageData {
|
||||
/** stage group */
|
||||
group: string;
|
||||
/** stage parameters, json encoded in base64. e.g {"rolling_interval": 10} */
|
||||
parameters: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,278 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CreatePluginFunctionReleaseRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Plugin function ID */
|
||||
id: string;
|
||||
/** List of MQ event IDs */
|
||||
mqevent_ids?: Array<string>;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface CreatePluginFunctionReleaseResponse {
|
||||
code?: number;
|
||||
data?: common.ApiResponseDataMessage2;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface CreatePluginFunctionRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Description of the plugin function */
|
||||
description?: string;
|
||||
/** Environments for the plugin */
|
||||
environments?: Record<string, string>;
|
||||
/** Timeout for plugin initialization */
|
||||
init_timeout?: number;
|
||||
/** Name of the plugin used */
|
||||
plugin_name?: string;
|
||||
/** Version of the plugin used */
|
||||
plugin_version?: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Timeout for plugin requests */
|
||||
request_timeout?: number;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface CreatePluginFunctionRevisionResponse {
|
||||
code?: number;
|
||||
data?: PluginFunctionRevision;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeletePluginFunctionRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Plugin function ID */
|
||||
id: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface DeletePluginFunctionRevisionResponse {
|
||||
code?: number;
|
||||
data?: PluginFunctionRevision;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetGlobalPluginFunctionsRequest {
|
||||
/** Pagination limit */
|
||||
limit?: number;
|
||||
/** Pagination offset */
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface GetGlobalPluginVersionsRequest {
|
||||
/** Pagination limit */
|
||||
limit?: number;
|
||||
/** Pagination offset */
|
||||
offset?: number;
|
||||
/** Plugin name */
|
||||
plugin_name: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetPluginFunctionRevisionDetailRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Plugin function ID */
|
||||
id: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetPluginFunctionRevisionDetailResponse {
|
||||
code?: number;
|
||||
data?: PluginFunctionRevisionDetail;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetPluginFunctionRevisionsRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Pagination limit */
|
||||
limit?: number;
|
||||
/** Pagination offset */
|
||||
offset?: number;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetPluginFunctionRevisionsResponse {
|
||||
code?: number;
|
||||
data?: Array<PluginFunctionRevision>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetPluginFunctionsRequest {
|
||||
/** Pagination limit */
|
||||
limit?: number;
|
||||
/** Pagination offset */
|
||||
offset?: number;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetPluginFunctionsResponse {
|
||||
code?: number;
|
||||
data?: Array<PluginFunction>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetPluginVersionsRequest {
|
||||
/** Pagination limit */
|
||||
limit?: number;
|
||||
/** Pagination offset */
|
||||
offset?: number;
|
||||
/** Plugin name */
|
||||
plugin_name: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetPluginVersionsResponse {
|
||||
code?: number;
|
||||
data?: Array<PluginVersion>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Plugin function definition */
|
||||
export interface PluginFunction {
|
||||
/** Plugin name */
|
||||
plugin_name?: string;
|
||||
/** Regions where the plugin is available */
|
||||
regions?: Array<string>;
|
||||
/** SCM name of the plugin */
|
||||
scm_name?: string;
|
||||
}
|
||||
|
||||
/** Plugin function configuration */
|
||||
export interface PluginFunctionConfig {
|
||||
/** Description of the plugin function */
|
||||
description?: string;
|
||||
/** Environments for the plugin */
|
||||
environments?: Record<string, string>;
|
||||
/** Timeout for plugin initialization */
|
||||
init_timeout?: number;
|
||||
/** Name of the plugin used */
|
||||
plugin_name?: string;
|
||||
/** Version of the plugin used */
|
||||
plugin_version?: string;
|
||||
/** Timeout for plugin requests */
|
||||
request_timeout?: number;
|
||||
}
|
||||
|
||||
/** Plugin function revision */
|
||||
export interface PluginFunctionRevision {
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Creation time */
|
||||
created_at?: string;
|
||||
/** Creator */
|
||||
created_by?: string;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** Plugin function ID */
|
||||
id?: string;
|
||||
/** Revision number */
|
||||
number?: number;
|
||||
/** Plugin function configuration */
|
||||
plugin_function_config?: PluginFunctionConfig;
|
||||
/** Region name */
|
||||
region?: string;
|
||||
/** Release status */
|
||||
release_status?: string;
|
||||
/** Release ticket link */
|
||||
release_ticket_link?: string;
|
||||
/** Number of released MQ events */
|
||||
released_mq_number?: number;
|
||||
/** Service ID */
|
||||
service_id?: string;
|
||||
}
|
||||
|
||||
/** Plugin function revision detail */
|
||||
export interface PluginFunctionRevisionDetail {
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Creation time */
|
||||
created_at?: string;
|
||||
/** Creator */
|
||||
created_by?: string;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** Plugin function ID */
|
||||
id?: string;
|
||||
/** Revision number */
|
||||
number?: number;
|
||||
/** Plugin function configuration */
|
||||
plugin_function_config?: PluginFunctionConfig;
|
||||
/** Region name */
|
||||
region?: string;
|
||||
/** Release status */
|
||||
release_status?: string;
|
||||
/** Release ticket link */
|
||||
release_ticket_link?: string;
|
||||
/** Number of released MQ events */
|
||||
released_mq_number?: number;
|
||||
/** Service ID */
|
||||
service_id?: string;
|
||||
/** List of released MQ triggers */
|
||||
released_mq_triggers?: Array<common.GlobalMQEventTriggerResponseData>;
|
||||
}
|
||||
|
||||
/** Plugin version information */
|
||||
export interface PluginVersion {
|
||||
/** Branch name */
|
||||
branch_name?: string;
|
||||
/** Commit hash */
|
||||
commit_hash?: string;
|
||||
/** Commit message */
|
||||
message?: string;
|
||||
/** Plugin name */
|
||||
plugin_name?: string;
|
||||
/** Plugin status */
|
||||
status?: string;
|
||||
/** Plugin version */
|
||||
version?: string;
|
||||
/** SCM version */
|
||||
scm_version?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,615 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
import * as admin from './admin';
|
||||
import * as ticket from './ticket';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface GetRegionalMetaRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** jwt token */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetRegionalMetaResponse {
|
||||
code?: number;
|
||||
data?: RegionalMetaResponseData;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface RegionalMeta {
|
||||
/** Region name */
|
||||
region?: string;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** Service ID */
|
||||
service_id?: string;
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Function name */
|
||||
function_name?: string;
|
||||
/** Revision ID */
|
||||
revision_id?: string;
|
||||
/** Owner of the function */
|
||||
owner?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Cell name */
|
||||
cell?: string;
|
||||
/** Disabled status for each zone */
|
||||
is_this_zone_disabled?: Record<string, boolean>;
|
||||
/** Throttle log bytes per second for each zone */
|
||||
zone_throttle_log_bytes_per_sec?: Record<string, number>;
|
||||
/** Enable GDPR compliance */
|
||||
gdpr_enable?: boolean;
|
||||
/** Disable cold start, ture means disable */
|
||||
cold_start_disabled?: boolean;
|
||||
/** Enable exclusive mode */
|
||||
exclusive_mode?: boolean;
|
||||
/** Enable async mode */
|
||||
async_mode?: boolean;
|
||||
/** Enable online mode */
|
||||
online_mode?: boolean;
|
||||
/** Enable authentication */
|
||||
auth_enable?: boolean;
|
||||
/** Enable CORS */
|
||||
cors_enable?: boolean;
|
||||
/** Enable tracing */
|
||||
trace_enable?: boolean;
|
||||
/** Enable gateway route */
|
||||
gateway_route_enable?: boolean;
|
||||
/** Enable IPv6 only */
|
||||
is_ipv6_only?: boolean;
|
||||
/** Enable ZTI */
|
||||
zti_enable?: boolean;
|
||||
/** Disable HTTP trigger,true means disable */
|
||||
http_trigger_disable?: boolean;
|
||||
/** Aliases for the function */
|
||||
aliases?: Record<string, common.Alias>;
|
||||
/** Runtime environment */
|
||||
runtime?: string;
|
||||
/** Environment name */
|
||||
env_name?: string;
|
||||
/** List of global KV namespace IDs */
|
||||
global_kv_namespace_ids?: Array<string>;
|
||||
/** List of local cache namespace IDs */
|
||||
local_cache_namespace_ids?: Array<string>;
|
||||
/** Protocol type */
|
||||
protocol?: string;
|
||||
/** Latency in seconds */
|
||||
latency_sec?: number;
|
||||
/** Network class ID */
|
||||
net_class_id?: number;
|
||||
/** Environment variables (nested map) */
|
||||
envs?: Record<string, Record<string, string>>;
|
||||
/** In releasing state */
|
||||
in_releasing?: boolean;
|
||||
/** Enable reserved DP */
|
||||
reserved_dp_enabled?: boolean;
|
||||
/** Routing strategy, enums:prefer_reserved, prefer_elastic. */
|
||||
routing_strategy?: string;
|
||||
/** Disable ByteFaaS error response */
|
||||
bytefaas_error_response_disabled?: boolean;
|
||||
/** Disable ByteFaaS response header */
|
||||
bytefaas_response_header_disabled?: boolean;
|
||||
/** Enable colocate scheduling */
|
||||
enable_colocate_scheduling?: boolean;
|
||||
/** Network mode */
|
||||
network_mode?: string;
|
||||
/** Enable dynamic load balancing data report */
|
||||
dynamic_load_balancing_data_report_enabled?: boolean;
|
||||
/** Enable dynamic load balancing weight */
|
||||
dynamic_load_balancing_weight_enabled?: boolean;
|
||||
/** List of enabled VDCs for dynamic load balancing */
|
||||
dynamic_load_balancing_enabled_vdcs?: Array<string>;
|
||||
/** Type of dynamic load balancing, enums: round_robin, smooth_weighted_round_robin, weighted_round_robin */
|
||||
dynamic_load_balance_type?: string;
|
||||
/** Deployment inactive status */
|
||||
deployment_inactive?: boolean;
|
||||
/** Deployment inactive status for each zone */
|
||||
is_this_zone_deployment_inactive?: Record<string, boolean>;
|
||||
/** Package name */
|
||||
package?: string;
|
||||
/** Pod type */
|
||||
pod_type?: string;
|
||||
/** Plugin name */
|
||||
plugin_name?: string;
|
||||
/** Allow cold start instance */
|
||||
allow_cold_start_instance?: boolean;
|
||||
/** Elastic preferred cluster mapping */
|
||||
elastic_prefer_cluster?: Record<string, string>;
|
||||
/** Reserved preferred cluster mapping */
|
||||
reserved_prefer_cluster?: Record<string, string>;
|
||||
/** Elastic user preferred cluster mapping */
|
||||
elastic_user_preferred_cluster?: Record<string, string>;
|
||||
/** Reserved user preferred cluster mapping */
|
||||
reserved_user_preferred_cluster?: Record<string, string>;
|
||||
/** Elastic auto preferred cluster mapping */
|
||||
elastic_auto_preferred_cluster?: Record<string, string>;
|
||||
/** Reserved auto preferred cluster mapping */
|
||||
reserved_auto_preferred_cluster?: Record<string, string>;
|
||||
/** Temporary preferred cluster mapping */
|
||||
temp_preferred_cluster?: Record<string, string>;
|
||||
/** Formatted elastic preferred cluster list */
|
||||
formatted_elastic_prefer_cluster?: Array<common.FormattedPreferCluster>;
|
||||
/** Formatted reserved preferred cluster list */
|
||||
formatted_reserved_prefer_cluster?: Array<common.FormattedPreferCluster>;
|
||||
/** Runtime log writers */
|
||||
runtime_log_writers?: string;
|
||||
/** System log writers */
|
||||
system_log_writers?: string;
|
||||
/** Enable runtime JSON log */
|
||||
enable_runtime_json_log?: boolean;
|
||||
/** Is BytePaaS elastic cluster */
|
||||
is_bytepaas_elastic_cluster?: boolean;
|
||||
/** Disable service discovery,true means disable */
|
||||
disable_service_discovery?: boolean;
|
||||
/** Enable resource guarantee */
|
||||
resource_guarantee?: boolean;
|
||||
/** Disable cgroup v2 */
|
||||
disable_cgroup_v2?: boolean;
|
||||
/** Enable async result emit event bridge */
|
||||
async_result_emit_event_bridge?: boolean;
|
||||
/** Runtime stream log bytes per second */
|
||||
runtime_stream_log_bytes_per_sec?: number;
|
||||
/** System stream log bytes per second */
|
||||
system_stream_log_bytes_per_sec?: number;
|
||||
/** Throttle log bytes per second */
|
||||
throttle_log_bytes_per_sec?: number;
|
||||
/** Throttle stdout log bytes per second */
|
||||
throttle_stdout_log_bytes_per_sec?: number;
|
||||
/** Throttle stderr log bytes per second */
|
||||
throttle_stderr_log_bytes_per_sec?: number;
|
||||
/** Enable scaling */
|
||||
scale_enabled?: boolean;
|
||||
/** Scale threshold */
|
||||
scale_threshold?: number;
|
||||
/** Scale type */
|
||||
scale_type?: number;
|
||||
/** Scale settings */
|
||||
scale_settings?: admin.FuncScaleSettings;
|
||||
/** Pod replica limits */
|
||||
replica_limit?: Record<string, common.PodReplicaLimit>;
|
||||
/** Reserved frozen replicas for each zone */
|
||||
zone_reserved_frozen_replicas?: Record<string, number>;
|
||||
/** Container runtime */
|
||||
container_runtime?: string;
|
||||
/** Enable scale optimization */
|
||||
enable_scale_optimise?: boolean;
|
||||
/** Schedule strategy */
|
||||
schedule_strategy?: string;
|
||||
/** Dynamic overcommit settings */
|
||||
dynamic_overcommit_settings?: Record<
|
||||
string,
|
||||
ticket.DynamicOvercommitSettings
|
||||
>;
|
||||
/** Enable overload protection */
|
||||
overload_protect_enabled?: boolean;
|
||||
/** Frozen CPU milli value */
|
||||
frozen_cpu_milli?: number;
|
||||
/** Enable federated on-demand resource */
|
||||
enable_fed_on_demand_resource?: Record<string, boolean>;
|
||||
/** Frozen priority class */
|
||||
frozen_priority_class?: string;
|
||||
/** Host-unique scheduling config */
|
||||
host_uniq?: common.HostUniq;
|
||||
/** In cell migration state */
|
||||
in_cell_migration?: boolean;
|
||||
/** Canary replica limit for each zone */
|
||||
zone_canary_replica_limit?: Record<string, number>;
|
||||
/** Enable frozen scale */
|
||||
frozen_scale_enabled?: boolean;
|
||||
/** enable privileged in pod */
|
||||
privileged?: boolean;
|
||||
}
|
||||
|
||||
/** Regional metadata response data */
|
||||
export interface RegionalMetaResponseData {
|
||||
/** Region name */
|
||||
region?: string;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** Service ID */
|
||||
service_id?: string;
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Function name */
|
||||
function_name?: string;
|
||||
/** Revision ID */
|
||||
revision_id?: string;
|
||||
/** Owner of the function */
|
||||
owner?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Cell name */
|
||||
cell?: string;
|
||||
/** Disabled status for each zone */
|
||||
is_this_zone_disabled?: Record<string, boolean>;
|
||||
/** Throttle log bytes per second for each zone */
|
||||
zone_throttle_log_bytes_per_sec?: Record<string, number>;
|
||||
/** Enable GDPR compliance */
|
||||
gdpr_enable?: boolean;
|
||||
/** Disable cold start, ture means disable */
|
||||
cold_start_disabled?: boolean;
|
||||
/** Enable exclusive mode */
|
||||
exclusive_mode?: boolean;
|
||||
/** Enable async mode */
|
||||
async_mode?: boolean;
|
||||
/** Enable online mode */
|
||||
online_mode?: boolean;
|
||||
/** Enable authentication */
|
||||
auth_enable?: boolean;
|
||||
/** Enable CORS */
|
||||
cors_enable?: boolean;
|
||||
/** Enable tracing */
|
||||
trace_enable?: boolean;
|
||||
/** Enable gateway route */
|
||||
gateway_route_enable?: boolean;
|
||||
/** Enable IPv6 only */
|
||||
is_ipv6_only?: boolean;
|
||||
/** Enable ZTI */
|
||||
zti_enable?: boolean;
|
||||
/** Disable HTTP trigger,true means disable */
|
||||
http_trigger_disable?: boolean;
|
||||
/** Aliases for the function */
|
||||
aliases?: Record<string, common.Alias>;
|
||||
/** Runtime environment */
|
||||
runtime?: string;
|
||||
/** Environment name */
|
||||
env_name?: string;
|
||||
/** List of global KV namespace IDs */
|
||||
global_kv_namespace_ids?: Array<string>;
|
||||
/** List of local cache namespace IDs */
|
||||
local_cache_namespace_ids?: Array<string>;
|
||||
/** Protocol type */
|
||||
protocol?: string;
|
||||
/** Latency in seconds */
|
||||
latency_sec?: number;
|
||||
/** Network class ID */
|
||||
net_class_id?: number;
|
||||
/** Environment variables (nested map) */
|
||||
envs?: Record<string, Record<string, string>>;
|
||||
/** In releasing state */
|
||||
in_releasing?: boolean;
|
||||
/** Enable reserved DP */
|
||||
reserved_dp_enabled?: boolean;
|
||||
/** Routing strategy, enums:prefer_reserved, prefer_elastic. */
|
||||
routing_strategy?: string;
|
||||
/** Disable ByteFaaS error response */
|
||||
bytefaas_error_response_disabled?: boolean;
|
||||
/** Disable ByteFaaS response header */
|
||||
bytefaas_response_header_disabled?: boolean;
|
||||
/** Enable colocate scheduling */
|
||||
enable_colocate_scheduling?: boolean;
|
||||
/** Network mode */
|
||||
network_mode?: string;
|
||||
/** Enable dynamic load balancing data report */
|
||||
dynamic_load_balancing_data_report_enabled?: boolean;
|
||||
/** Enable dynamic load balancing weight */
|
||||
dynamic_load_balancing_weight_enabled?: boolean;
|
||||
/** List of enabled VDCs for dynamic load balancing */
|
||||
dynamic_load_balancing_enabled_vdcs?: Array<string>;
|
||||
/** Type of dynamic load balancing, enums: round_robin, smooth_weighted_round_robin, weighted_round_robin */
|
||||
dynamic_load_balance_type?: string;
|
||||
/** Deployment inactive status */
|
||||
deployment_inactive?: boolean;
|
||||
/** Deployment inactive status for each zone */
|
||||
is_this_zone_deployment_inactive?: Record<string, boolean>;
|
||||
/** Package name */
|
||||
package?: string;
|
||||
/** Pod type */
|
||||
pod_type?: string;
|
||||
/** Plugin name */
|
||||
plugin_name?: string;
|
||||
/** Allow cold start instance */
|
||||
allow_cold_start_instance?: boolean;
|
||||
/** Elastic preferred cluster mapping */
|
||||
elastic_prefer_cluster?: Record<string, string>;
|
||||
/** Reserved preferred cluster mapping */
|
||||
reserved_prefer_cluster?: Record<string, string>;
|
||||
/** Elastic user preferred cluster mapping */
|
||||
elastic_user_preferred_cluster?: Record<string, string>;
|
||||
/** Reserved user preferred cluster mapping */
|
||||
reserved_user_preferred_cluster?: Record<string, string>;
|
||||
/** Elastic auto preferred cluster mapping */
|
||||
elastic_auto_preferred_cluster?: Record<string, string>;
|
||||
/** Reserved auto preferred cluster mapping */
|
||||
reserved_auto_preferred_cluster?: Record<string, string>;
|
||||
/** Temporary preferred cluster mapping */
|
||||
temp_preferred_cluster?: Record<string, string>;
|
||||
/** Formatted elastic preferred cluster list */
|
||||
formatted_elastic_prefer_cluster?: Array<common.FormattedPreferCluster>;
|
||||
/** Formatted reserved preferred cluster list */
|
||||
formatted_reserved_prefer_cluster?: Array<common.FormattedPreferCluster>;
|
||||
/** Runtime log writers */
|
||||
runtime_log_writers?: string;
|
||||
/** System log writers */
|
||||
system_log_writers?: string;
|
||||
/** Enable runtime JSON log */
|
||||
enable_runtime_json_log?: boolean;
|
||||
/** Is BytePaaS elastic cluster */
|
||||
is_bytepaas_elastic_cluster?: boolean;
|
||||
/** Disable service discovery,true means disable */
|
||||
disable_service_discovery?: boolean;
|
||||
/** Enable resource guarantee */
|
||||
resource_guarantee?: boolean;
|
||||
/** Disable cgroup v2 */
|
||||
disable_cgroup_v2?: boolean;
|
||||
/** Enable async result emit event bridge */
|
||||
async_result_emit_event_bridge?: boolean;
|
||||
/** Runtime stream log bytes per second */
|
||||
runtime_stream_log_bytes_per_sec?: number;
|
||||
/** System stream log bytes per second */
|
||||
system_stream_log_bytes_per_sec?: number;
|
||||
/** Throttle log bytes per second */
|
||||
throttle_log_bytes_per_sec?: number;
|
||||
/** Throttle stdout log bytes per second */
|
||||
throttle_stdout_log_bytes_per_sec?: number;
|
||||
/** Throttle stderr log bytes per second */
|
||||
throttle_stderr_log_bytes_per_sec?: number;
|
||||
/** Enable scaling */
|
||||
scale_enabled?: boolean;
|
||||
/** Scale threshold */
|
||||
scale_threshold?: number;
|
||||
/** Scale type */
|
||||
scale_type?: number;
|
||||
/** Scale settings */
|
||||
scale_settings?: admin.FuncScaleSettings;
|
||||
/** Pod replica limits */
|
||||
replica_limit?: Record<string, common.PodReplicaLimit>;
|
||||
/** Reserved frozen replicas for each zone */
|
||||
zone_reserved_frozen_replicas?: Record<string, number>;
|
||||
/** Container runtime */
|
||||
container_runtime?: string;
|
||||
/** Enable scale optimization */
|
||||
enable_scale_optimise?: boolean;
|
||||
/** Schedule strategy */
|
||||
schedule_strategy?: string;
|
||||
/** Dynamic overcommit settings */
|
||||
dynamic_overcommit_settings?: Record<
|
||||
string,
|
||||
ticket.DynamicOvercommitSettings
|
||||
>;
|
||||
/** Enable overload protection */
|
||||
overload_protect_enabled?: boolean;
|
||||
/** Frozen CPU milli value */
|
||||
frozen_cpu_milli?: number;
|
||||
/** Enable federated on-demand resource */
|
||||
enable_fed_on_demand_resource?: Record<string, boolean>;
|
||||
/** Frozen priority class */
|
||||
frozen_priority_class?: string;
|
||||
/** Enable frozen scale */
|
||||
frozen_scale_enabled?: boolean;
|
||||
/** Log link */
|
||||
log_link?: string;
|
||||
/** Stream log link */
|
||||
stream_log_link?: string;
|
||||
/** Argos link */
|
||||
argos_link?: string;
|
||||
/** Grafana link */
|
||||
grafana_link?: string;
|
||||
/** List of metrics links */
|
||||
metrics_links?: Array<string>;
|
||||
/** Host unique identifier */
|
||||
host_uniq?: common.HostUniq;
|
||||
/** In cell migration state */
|
||||
in_cell_migration?: boolean;
|
||||
/** Canary replica limit for each zone */
|
||||
zone_canary_replica_limit?: Record<string, number>;
|
||||
/** enable privileged in pod */
|
||||
privileged?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateRegionalMetaRequest {
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** Function name */
|
||||
function_name?: string;
|
||||
/** Revision ID */
|
||||
revision_id?: string;
|
||||
/** Owner of the function */
|
||||
owner?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Cell name */
|
||||
cell?: string;
|
||||
/** Disabled status for each zone */
|
||||
is_this_zone_disabled?: Record<string, boolean>;
|
||||
/** Throttle log bytes per second for each zone */
|
||||
zone_throttle_log_bytes_per_sec?: Record<string, number>;
|
||||
/** Enable GDPR compliance */
|
||||
gdpr_enable?: boolean;
|
||||
/** Disable cold start */
|
||||
cold_start_disabled?: boolean;
|
||||
/** Enable exclusive mode */
|
||||
exclusive_mode?: boolean;
|
||||
/** Enable async mode */
|
||||
async_mode?: boolean;
|
||||
/** Enable online mode */
|
||||
online_mode?: boolean;
|
||||
/** Enable authentication */
|
||||
auth_enable?: boolean;
|
||||
/** Enable CORS */
|
||||
cors_enable?: boolean;
|
||||
/** Enable tracing */
|
||||
trace_enable?: boolean;
|
||||
/** Enable gateway route */
|
||||
gateway_route_enable?: boolean;
|
||||
/** Enable IPv6 only */
|
||||
is_ipv6_only?: boolean;
|
||||
/** Enable ZTI */
|
||||
zti_enable?: boolean;
|
||||
/** Disable HTTP trigger,true means disable */
|
||||
http_trigger_disable?: boolean;
|
||||
/** Aliases for the function */
|
||||
aliases?: Record<string, common.Alias>;
|
||||
/** Runtime environment */
|
||||
runtime?: string;
|
||||
/** Environment name */
|
||||
env_name?: string;
|
||||
/** List of global KV namespace IDs */
|
||||
global_kv_namespace_ids?: Array<string>;
|
||||
/** List of local cache namespace IDs */
|
||||
local_cache_namespace_ids?: Array<string>;
|
||||
/** Protocol type */
|
||||
protocol?: string;
|
||||
/** Latency in seconds */
|
||||
latency_sec?: number;
|
||||
/** Network class ID */
|
||||
net_class_id?: number;
|
||||
/** Environment variables (nested map) */
|
||||
envs?: Record<string, Record<string, string>>;
|
||||
/** In releasing state */
|
||||
in_releasing?: boolean;
|
||||
/** Enable reserved DP */
|
||||
reserved_dp_enabled?: boolean;
|
||||
/** Routing strategy, enums:prefer_reserved, prefer_elastic. */
|
||||
routing_strategy?: string;
|
||||
/** Disable ByteFaaS error response */
|
||||
bytefaas_error_response_disabled?: boolean;
|
||||
/** Disable ByteFaaS response header */
|
||||
bytefaas_response_header_disabled?: boolean;
|
||||
/** Enable colocate scheduling */
|
||||
enable_colocate_scheduling?: boolean;
|
||||
/** Network mode */
|
||||
network_mode?: string;
|
||||
/** Enable dynamic load balancing data report */
|
||||
dynamic_load_balancing_data_report_enabled?: boolean;
|
||||
/** Enable dynamic load balancing weight */
|
||||
dynamic_load_balancing_weight_enabled?: boolean;
|
||||
/** List of enabled VDCs for dynamic load balancing */
|
||||
dynamic_load_balancing_enabled_vdcs?: Array<string>;
|
||||
/** Type of dynamic load balancing, enums: round_robin, smooth_weighted_round_robin, weighted_round_robin */
|
||||
dynamic_load_balance_type?: string;
|
||||
/** Deployment inactive status */
|
||||
deployment_inactive?: boolean;
|
||||
/** Deployment inactive status for each zone */
|
||||
is_this_zone_deployment_inactive?: Record<string, boolean>;
|
||||
/** Package name */
|
||||
package?: string;
|
||||
/** Pod type */
|
||||
pod_type?: string;
|
||||
/** Plugin name */
|
||||
plugin_name?: string;
|
||||
/** Allow cold start instance */
|
||||
allow_cold_start_instance?: boolean;
|
||||
/** Elastic preferred cluster mapping */
|
||||
elastic_prefer_cluster?: Record<string, string>;
|
||||
/** Reserved preferred cluster mapping */
|
||||
reserved_prefer_cluster?: Record<string, string>;
|
||||
/** Elastic user preferred cluster mapping */
|
||||
elastic_user_preferred_cluster?: Record<string, string>;
|
||||
/** Reserved user preferred cluster mapping */
|
||||
reserved_user_preferred_cluster?: Record<string, string>;
|
||||
/** Elastic auto preferred cluster mapping */
|
||||
elastic_auto_preferred_cluster?: Record<string, string>;
|
||||
/** Reserved auto preferred cluster mapping */
|
||||
reserved_auto_preferred_cluster?: Record<string, string>;
|
||||
/** Temporary preferred cluster mapping */
|
||||
temp_preferred_cluster?: Record<string, string>;
|
||||
/** Formatted elastic preferred cluster list */
|
||||
formatted_elastic_prefer_cluster?: Array<common.FormattedPreferCluster>;
|
||||
/** Formatted reserved preferred cluster list */
|
||||
formatted_reserved_prefer_cluster?: Array<common.FormattedPreferCluster>;
|
||||
/** Runtime log writers */
|
||||
runtime_log_writers?: string;
|
||||
/** System log writers */
|
||||
system_log_writers?: string;
|
||||
/** Enable runtime JSON log */
|
||||
is_bytepaas_elastic_cluster?: boolean;
|
||||
/** Disable service discovery,true means disable */
|
||||
disable_service_discovery?: boolean;
|
||||
/** Enable resource guarantee */
|
||||
resource_guarantee?: boolean;
|
||||
/** Disable cgroup v2 */
|
||||
disable_cgroup_v2?: boolean;
|
||||
/** Enable async result emit event bridge */
|
||||
async_result_emit_event_bridge?: boolean;
|
||||
/** Runtime stream log bytes per second */
|
||||
runtime_stream_log_bytes_per_sec?: number;
|
||||
/** System stream log bytes per second */
|
||||
system_stream_log_bytes_per_sec?: number;
|
||||
/** Throttle log bytes per second */
|
||||
throttle_log_bytes_per_sec?: number;
|
||||
/** Throttle stdout log bytes per second */
|
||||
throttle_stdout_log_bytes_per_sec?: number;
|
||||
/** Throttle stderr log bytes per second */
|
||||
throttle_stderr_log_bytes_per_sec?: number;
|
||||
/** Enable scaling */
|
||||
scale_enabled?: boolean;
|
||||
/** Scale threshold */
|
||||
scale_threshold?: number;
|
||||
/** Scale type */
|
||||
scale_type?: number;
|
||||
/** Scale settings */
|
||||
scale_settings?: admin.FuncScaleSettings;
|
||||
/** Pod replica limits */
|
||||
replica_limit?: Record<string, common.PodReplicaLimit>;
|
||||
/** Reserved frozen replicas for each zone */
|
||||
zone_reserved_frozen_replicas?: Record<string, number>;
|
||||
/** Container runtime */
|
||||
container_runtime?: string;
|
||||
/** Enable scale optimization */
|
||||
enable_scale_optimise?: boolean;
|
||||
/** Schedule strategy */
|
||||
schedule_strategy?: string;
|
||||
/** Dynamic overcommit settings */
|
||||
dynamic_overcommit_settings?: Record<
|
||||
string,
|
||||
ticket.DynamicOvercommitSettings
|
||||
>;
|
||||
/** Enable overload protection */
|
||||
overload_protect_enabled?: boolean;
|
||||
/** Frozen CPU milli value */
|
||||
frozen_cpu_milli?: number;
|
||||
/** Enable federated on-demand resource */
|
||||
enable_fed_on_demand_resource?: Record<string, boolean>;
|
||||
/** Frozen priority class */
|
||||
frozen_priority_class?: string;
|
||||
/** Enable frozen scale */
|
||||
host_uniq?: common.HostUniq;
|
||||
/** Canary replica limit for each zone */
|
||||
zone_canary_replica_limit?: Record<string, number>;
|
||||
/** Enable frozen scale */
|
||||
frozen_scale_enabled?: boolean;
|
||||
/** enable privileged in pod */
|
||||
privileged?: boolean;
|
||||
/** In cell migration state */
|
||||
in_cell_migration?: boolean;
|
||||
region?: string;
|
||||
service_id?: string;
|
||||
cluster?: string;
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface UpdateRegionalMetaResponse {
|
||||
code?: number;
|
||||
data?: RegionalMeta;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,731 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
/** Options for canceling a release */
|
||||
export interface CancelOptions {
|
||||
/** Type of cancel operation */
|
||||
type?: number;
|
||||
}
|
||||
|
||||
export interface CreateReleaseRequest {
|
||||
/** must be `default` for now */
|
||||
alias_name?: string;
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** the ratio of traffic of each rolling from old revision to new one */
|
||||
rolling_step?: number;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** container one/two revision, the key is revision id, value is the traffic ratio, [A: 20, B: 80] for example */
|
||||
target_traffic_config?: Record<string, number>;
|
||||
/** zone level traffic setting */
|
||||
zone_traffic_config?: Record<string, common.MapMessage>;
|
||||
/** jwt token */
|
||||
'X-Jwt-Token'?: string;
|
||||
/** 0 - 先杀后起, 1 - 先起后杀 */
|
||||
rolling_strategy?: number;
|
||||
/** 滚动间隔,单位(s) */
|
||||
rolling_interval?: number;
|
||||
/** 滚动完成判断条件 1:最少百分之 N 的容器创建;数值范围(1-100) */
|
||||
min_created_percentage?: number;
|
||||
/** 滚动完成判断条件 2:最少百分之 N 的容器启动完成;数值范围(1-100) */
|
||||
min_ready_percentage?: number;
|
||||
}
|
||||
|
||||
export interface CreateReleaseResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of release response data */
|
||||
data?: Array<ReleaseResponseData>;
|
||||
/** Error message if present */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface CreateTicketRequest {
|
||||
/** approved user. 审核人 */
|
||||
approved_by?: string;
|
||||
/** type of approved user. 审核用户类型。Enums: "person_account","service_account" */
|
||||
approved_by_usertype?: string;
|
||||
/** release cluster, use default cluster when without it. 发布的集群, 不填则为默认集群 */
|
||||
cluster?: string;
|
||||
/** ID of used code revision, lower priority than use_latest_code_revision. 代码版本 ID, 用指定代码版本进行发布 */
|
||||
code_revision_id?: string;
|
||||
/** description of this release. 发布描述 */
|
||||
description?: string;
|
||||
/** release region. 发布的 region */
|
||||
region: string;
|
||||
/** release type, enums: runtime_update、runtime_release. 发布类型 */
|
||||
release_type?: string;
|
||||
/** replica limit. 实例数,只用作第一次发布时需要。 */
|
||||
replica_limit?: Record<string, common.EmptyObject>;
|
||||
/** ID of revision, only works when rollback is true, lower priority than code_revision_id. 版本 ID, 回滚至某一个 revision */
|
||||
revision_id?: string;
|
||||
/** create ticket of rollback action. 回滚 */
|
||||
rollback?: boolean;
|
||||
/** rolling step. 滚动比例 */
|
||||
rolling_step?: number;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** use latest code revision. 使用最新的代码版本进行发布 */
|
||||
use_latest_code_revision?: boolean;
|
||||
/** grey mqevent config. 灰度触发器配置 */
|
||||
grey_mqevent_config?: Array<common.GreyMQEvent>;
|
||||
/** the code config. 发布的代码配置 */
|
||||
code_source?: string;
|
||||
/** the mqevent release type, enums: hot_load, deployment_rolling. 触发器发布类型配置 */
|
||||
mqevent_release_type?: string;
|
||||
/** whether use pipeline to drive this ticket execution */
|
||||
is_pipeline_ticket?: boolean;
|
||||
/** pipeline template type, enums: NormalRelease, IdcRelease, MultiClusterGrayNormalRelease, MultiClusterGrayIdcRelease, MultiClusterNormalRelease, MultiClusterIdcRelease, ClusterUpdate, ClusterCreate, ClusterDelete, LegoRelease, LegoIdcRelease, MultiClusterLegoGrayNormalRelease, MultiClusterLegoGrayIdcRelease, MultiClusterLegoNormalRelease, MultiClusterLegoIdcRelease, MultiClusterLegoAMLRelease, MqCanaryRelease */
|
||||
pipeline_template_type?: string;
|
||||
/** pipeline template id */
|
||||
pipeline_template_id?: string;
|
||||
/** 0 - 先杀后起, 1 - 先起后杀 */
|
||||
rolling_strategy?: number;
|
||||
/** 滚动间隔,单位(s) */
|
||||
rolling_interval?: number;
|
||||
/** 滚动完成判断条件 1:最少百分之 N 的容器创建;数值范围(1-100) */
|
||||
min_created_percentage?: number;
|
||||
/** 滚动完成判断条件 2:最少百分之 N 的容器启动完成;数值范围(1-100) */
|
||||
min_ready_percentage?: number;
|
||||
}
|
||||
|
||||
/** Message structure for formatted target traffic configuration in ticket request */
|
||||
export interface CreateTicketRequestFormatTargetTrafficConfigMessage {
|
||||
/** filled with revision ID, default to $LATEST */
|
||||
revision_id?: string;
|
||||
/** Traffic value for the revision */
|
||||
traffic_value?: number;
|
||||
}
|
||||
|
||||
/** Message structure for zone traffic configuration in ticket request */
|
||||
export interface CreateTicketRequestFormatZoneTrafficConfigMessage {
|
||||
/** Zone name */
|
||||
zone?: string;
|
||||
/** List of traffic configurations for the zone */
|
||||
zone_traffic_config?: Array<CreateTicketRequestFormatZoneTrafficConfigMessageZoneTrafficConfigMessage>;
|
||||
}
|
||||
|
||||
/** Message structure for formatted zone traffic configuration in ticket request */
|
||||
export interface CreateTicketRequestFormatZoneTrafficConfigMessageZoneTrafficConfigMessage {
|
||||
/** filled with code revision ID, default to $LATEST */
|
||||
revision_id?: string;
|
||||
/** Traffic value for the zone revision */
|
||||
traffic_value?: number;
|
||||
}
|
||||
|
||||
export interface GetLatestReleaseRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** JWT token */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetLatestReleaseResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Data of the latest release */
|
||||
data?: ReleaseResponseData;
|
||||
/** Error message if present */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetReleaseByIDRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** release ID */
|
||||
release_id: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** jwt token */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetReleaseByIDResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Data of the release */
|
||||
data?: ReleaseResponseData;
|
||||
/** Error message if present */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetReleaseRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetReleaseResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of release records */
|
||||
data?: Array<ReleaseRecord>;
|
||||
/** Error message if present */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetReleaseStartInfoByIDRequest {
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** release ID */
|
||||
release_id: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** ID of revision */
|
||||
revision_id?: string;
|
||||
}
|
||||
|
||||
export interface GetReleaseStartInfoByIDResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of pod start information */
|
||||
data?: Array<PodStartInfo>;
|
||||
/** Error message if present */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetServiceTicketByIDRequest {
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** ID of ticket */
|
||||
ticket_id: string;
|
||||
}
|
||||
|
||||
export interface GetServiceTicketByIDResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Ticket data */
|
||||
data?: common.Ticket;
|
||||
/** Error message if present */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetTicketsRequest {
|
||||
/** Ticket category */
|
||||
category?: string;
|
||||
/** Change type of the ticket, enums: "create","update","delete" */
|
||||
change_type?: string;
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Ticket ID */
|
||||
id?: string;
|
||||
/** Maximum create time for the ticket */
|
||||
max_create_time?: string;
|
||||
/** Minimum create time for the ticket */
|
||||
min_create_time?: string;
|
||||
/** Region of the ticket */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** Status of the ticket. enums: pending, running, building, canceling, failed, success, canceled, aborting, aborted, rollbacked */
|
||||
status?: string;
|
||||
/** Trigger ID for the ticket */
|
||||
trigger_id?: string;
|
||||
/** Trigger type for the ticket,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type?: string;
|
||||
/** type of tickets */
|
||||
type?: string;
|
||||
/** Whether the ticket contains multiple clusters */
|
||||
contains_multi_clusters?: boolean;
|
||||
/** Offset for pagination */
|
||||
offset?: number;
|
||||
/** Limit for pagination */
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface GetTicketsResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of tickets */
|
||||
data?: Array<common.Ticket>;
|
||||
/** Error message if present */
|
||||
error?: string;
|
||||
/** Count of tickets */
|
||||
count?: number;
|
||||
}
|
||||
|
||||
/** Log item structure */
|
||||
export interface LogItem {
|
||||
/** Log content */
|
||||
content?: string;
|
||||
/** Log category */
|
||||
category?: string;
|
||||
/** Log level */
|
||||
level?: string;
|
||||
}
|
||||
|
||||
/** Information about a multi-cluster release */
|
||||
export interface MultiCusterReleaseInfo {
|
||||
/** Region of the cluster */
|
||||
region?: string;
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Rolling step value */
|
||||
rolling_step?: number;
|
||||
/** Replica limit configuration */
|
||||
replica_limit?: Record<string, common.EmptyObject>;
|
||||
/** Formatted target traffic configuration */
|
||||
format_traffic_config: Array<CreateTicketRequestFormatTargetTrafficConfigMessage>;
|
||||
/** Formatted zone traffic configuration */
|
||||
format_zone_traffic_config?: Array<CreateTicketRequestFormatZoneTrafficConfigMessage>;
|
||||
/** Grey MQ event configuration */
|
||||
grey_mqevent_config?: Array<common.GreyMQEvent>;
|
||||
/** 0 - 先杀后起, 1 - 先起后杀 */
|
||||
rolling_strategy?: number;
|
||||
/** 滚动间隔,单位(s) */
|
||||
rolling_interval?: number;
|
||||
/** 滚动完成判断条件 1:最少百分之 N 的容器创建;数值范围(1-100) */
|
||||
min_created_percentage?: number;
|
||||
/** 滚动完成判断条件 2:最少百分之 N 的容器启动完成;数值范围(1-100) */
|
||||
min_ready_percentage?: number;
|
||||
}
|
||||
|
||||
export interface MultiCusterReleaseTicketRequest {
|
||||
/** approved user. 审核人 */
|
||||
approved_by?: string;
|
||||
/** type of approved user. 审核用户类型。Enums: "person_account","service_account" */
|
||||
approved_by_usertype?: string;
|
||||
/** ID of used code revision, lower priority than use_latest_code_revision. 代码版本 ID, 用指定代码版本进行发布 */
|
||||
code_revision_id?: string;
|
||||
/** description of this release. 发布描述 */
|
||||
description?: string;
|
||||
/** create ticket of rollback action. 回滚 */
|
||||
rollback?: boolean;
|
||||
/** use latest code revision. 使用最新的代码版本进行发布 */
|
||||
use_latest_code_revision?: boolean;
|
||||
/** the code config. 发布的代码配置 */
|
||||
code_source?: string;
|
||||
/** the mqevent release type, enums: hot_load, deployment_rolling. 触发器发布类型配置 */
|
||||
mqevent_release_type?: string;
|
||||
/** pipeline template type, enums: NormalRelease, IdcRelease, MultiClusterGrayNormalRelease, MultiClusterGrayIdcRelease, MultiClusterNormalRelease, MultiClusterIdcRelease, ClusterUpdate, ClusterCreate, ClusterDelete, LegoRelease, LegoIdcRelease, MultiClusterLegoGrayNormalRelease, MultiClusterLegoGrayIdcRelease, MultiClusterLegoNormalRelease, MultiClusterLegoIdcRelease, MultiClusterLegoAMLRelease, MqCanaryRelease */
|
||||
pipeline_template_type?: string;
|
||||
/** details of clusters for the release */
|
||||
clusters?: Array<MultiCusterReleaseInfo>;
|
||||
/** details of revisions to roll back */
|
||||
rollback_revisions?: Array<RollbackRevisions>;
|
||||
/** ID of service */
|
||||
service_id?: string;
|
||||
/** pipeline template id */
|
||||
pipeline_template_id?: string;
|
||||
/** insert quality check stages to system-defined pipeline templates */
|
||||
insert_quality_check_stages?: boolean;
|
||||
/** dry run release cluster */
|
||||
dry_run?: boolean;
|
||||
/** as user header, for internal use only */
|
||||
'x-bytefaas-as-user'?: string;
|
||||
/** is global cp ticket, for internal use only */
|
||||
'X-Bytefaas-Globalcp-Ticket'?: string;
|
||||
}
|
||||
|
||||
export interface PatchReleaseRequest {
|
||||
/** Action to be performed */
|
||||
action?: string;
|
||||
/** Alias name of the release */
|
||||
alias_name?: string;
|
||||
/** cluster name */
|
||||
cluster: string;
|
||||
/** Target traffic configuration */
|
||||
format_target_traffic_config?: Array<RevisionTraffic>;
|
||||
/** Zone traffic configuration */
|
||||
format_zone_traffic_config?: Array<PatchReleaseRequestFormatZoneTrafficConfigMessage>;
|
||||
/** region name */
|
||||
region: string;
|
||||
/** release ID */
|
||||
release_id: string;
|
||||
/** Rolling step value */
|
||||
rolling_step?: number;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** Target traffic configuration */
|
||||
target_traffic_config?: Record<string, number>;
|
||||
/** Zone traffic configuration */
|
||||
zone_traffic_config?: Record<string, common.MapMessage>;
|
||||
/** JWT token */
|
||||
'X-Jwt-Token'?: string;
|
||||
/** 0 - 先杀后起, 1 - 先起后杀 */
|
||||
rolling_strategy?: number;
|
||||
/** 滚动间隔,单位(s) */
|
||||
rolling_interval?: number;
|
||||
/** 滚动完成判断条件 1:最少百分之 N 的容器创建;数值范围(1-100) */
|
||||
min_created_percentage?: number;
|
||||
/** 滚动完成判断条件 2:最少百分之 N 的容器启动完成;数值范围(1-100) */
|
||||
min_ready_percentage?: number;
|
||||
}
|
||||
|
||||
/** Message structure for zone traffic configuration in patch release request */
|
||||
export interface PatchReleaseRequestFormatZoneTrafficConfigMessage {
|
||||
/** Zone name */
|
||||
zone?: string;
|
||||
/** List of traffic configurations for the zone */
|
||||
zone_traffic_config?: Array<RevisionTraffic>;
|
||||
}
|
||||
|
||||
export interface PatchReleaseResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Data of the patched release */
|
||||
data?: ReleaseResponseData;
|
||||
/** Error message if present */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Pod start information structure */
|
||||
export interface PodStartInfo {
|
||||
/** Pod ID */
|
||||
id?: string;
|
||||
/** Pod status */
|
||||
status?: string;
|
||||
/** Function ID associated with the pod */
|
||||
function_id?: string;
|
||||
/** Region of the pod */
|
||||
region?: string;
|
||||
/** Revision ID of the pod */
|
||||
revision_id?: string;
|
||||
/** Release record ID associated with the pod */
|
||||
release_record_id?: string;
|
||||
/** Log content for the pod start */
|
||||
content?: string;
|
||||
/** Pod name */
|
||||
pod?: string;
|
||||
/** Zone of the pod */
|
||||
zone?: string;
|
||||
/** Time when the pod was created */
|
||||
created_at?: string;
|
||||
/** Time when the pod was last updated */
|
||||
updated_at?: string;
|
||||
/** Start logs for the pod */
|
||||
start_logs?: StartLogs;
|
||||
}
|
||||
|
||||
/** Detailed information about a release record */
|
||||
export interface ReleaseRecord {
|
||||
/** Alias name of the release */
|
||||
alias_name?: string;
|
||||
/** Cell name for the release */
|
||||
cell?: string;
|
||||
/** Cold start pod configuration */
|
||||
cold_start_pods?: Record<string, number>;
|
||||
/** Time when the release was created */
|
||||
created_at?: string;
|
||||
/** User who created the release */
|
||||
created_by?: string;
|
||||
/** Current traffic configuration */
|
||||
current_traffic_config?: Record<string, number>;
|
||||
/** Current zone traffic configuration */
|
||||
current_zone_traffic_config?: Record<string, common.MapMessage>;
|
||||
/** Error code if present */
|
||||
error_code?: string;
|
||||
/** Event center ID for the release */
|
||||
event_center_id?: string;
|
||||
/** Logs of failed instances */
|
||||
failed_instance_logs?: string;
|
||||
/** Time when the release was finished */
|
||||
finished_at?: string;
|
||||
/** Formatted current traffic configuration */
|
||||
format_current_traffic_config?: Array<RevisionTraffic>;
|
||||
/** Formatted current zone traffic configuration */
|
||||
format_current_zone_traffic_config?: Array<ReleaseRecordFormatCurrentZoneTrafficConfigMessage>;
|
||||
/** Formatted pre-traffic configuration */
|
||||
format_pre_traffic_config?: Array<RevisionTraffic>;
|
||||
/** Formatted pre-zone traffic configuration */
|
||||
format_pre_zone_traffic_config?: Array<ReleaseRecordFormatPreZoneTrafficConfigMessage>;
|
||||
/** Formatted target traffic configuration */
|
||||
format_target_traffic_config?: Array<RevisionTraffic>;
|
||||
/** Formatted target zone traffic configuration */
|
||||
format_target_zone_traffic_config?: Array<ReleaseRecordFormatTargetZoneTrafficConfigMessage>;
|
||||
/** Function ID associated with the release */
|
||||
function_id?: string;
|
||||
/** the id of release record, which can be used to get the release status, with /latest_release api */
|
||||
id?: string;
|
||||
/** Pre-traffic configuration */
|
||||
pre_traffic_config?: Record<string, number>;
|
||||
/** Pre-zone traffic configuration */
|
||||
pre_zone_traffic_config?: Record<string, common.MapMessage>;
|
||||
/** Region of the release */
|
||||
region?: string;
|
||||
/** Platform where the release is deployed */
|
||||
release_platform?: string;
|
||||
/** Request ID for the release */
|
||||
request_id?: string;
|
||||
/** Rolling step value */
|
||||
rolling_step?: number;
|
||||
/** ID of service */
|
||||
service_id?: string;
|
||||
/** Source revision ID */
|
||||
source_revision?: string;
|
||||
/** Statistics for the source revision */
|
||||
source_revision_stat?: ReleaseRecordSourceRevisionStatMessage2;
|
||||
/** Current status of the release */
|
||||
status?: string;
|
||||
/** Status message for the release */
|
||||
status_message?: string;
|
||||
/** Target revision ID */
|
||||
target_revision?: string;
|
||||
/** Statistics for the target revision */
|
||||
target_revision_stat?: ReleaseRecordTargetRevisionStatMessage2;
|
||||
/** Target traffic configuration */
|
||||
target_traffic_config?: Record<string, number>;
|
||||
/** Target zone traffic configuration */
|
||||
target_zone_traffic_config?: Record<string, common.MapMessage>;
|
||||
/** Time when the release was last updated */
|
||||
updated_at?: string;
|
||||
/** 0 - 先杀后起, 1 - 先起后杀 */
|
||||
rolling_strategy?: number;
|
||||
/** 滚动间隔,单位(s) */
|
||||
rolling_interval?: number;
|
||||
/** 滚动完成判断条件 1:最少百分之 N 的容器创建;数值范围(1-100) */
|
||||
min_created_percentage?: number;
|
||||
/** 滚动完成判断条件 2:最少百分之 N 的容器启动完成;数值范围(1-100) */
|
||||
min_ready_percentage?: number;
|
||||
}
|
||||
|
||||
/** Message structure for current zone traffic configuration in release record */
|
||||
export interface ReleaseRecordFormatCurrentZoneTrafficConfigMessage {
|
||||
/** Zone name */
|
||||
zone?: string;
|
||||
/** List of traffic configurations for the zone */
|
||||
zone_traffic_config?: Array<RevisionTraffic>;
|
||||
}
|
||||
|
||||
/** Message structure for pre-zone traffic configuration in release record */
|
||||
export interface ReleaseRecordFormatPreZoneTrafficConfigMessage {
|
||||
/** Zone name */
|
||||
zone?: string;
|
||||
/** List of traffic configurations for the zone */
|
||||
zone_traffic_config?: Array<RevisionTraffic>;
|
||||
}
|
||||
|
||||
/** Message structure for target zone traffic configuration in release record */
|
||||
export interface ReleaseRecordFormatTargetZoneTrafficConfigMessage {
|
||||
/** Zone name */
|
||||
zone?: string;
|
||||
/** List of traffic configurations for the zone */
|
||||
zone_traffic_config?: Array<RevisionTraffic>;
|
||||
}
|
||||
|
||||
/** Statistics for the source revision in a release record */
|
||||
export interface ReleaseRecordSourceRevisionStatMessage2 {
|
||||
/** Revision ID */
|
||||
id?: string;
|
||||
/** Revision name */
|
||||
name?: string;
|
||||
/** Revision number */
|
||||
number?: number;
|
||||
/** Source of the revision */
|
||||
source?: string;
|
||||
/** Source type of the revision */
|
||||
source_type?: string;
|
||||
}
|
||||
|
||||
/** Statistics for the target revision in a release record */
|
||||
export interface ReleaseRecordTargetRevisionStatMessage2 {
|
||||
/** Revision ID */
|
||||
id?: string;
|
||||
/** Revision name */
|
||||
name?: string;
|
||||
/** Revision number */
|
||||
number?: number;
|
||||
/** Source of the revision */
|
||||
source?: string;
|
||||
/** Source type of the revision */
|
||||
source_type?: string;
|
||||
}
|
||||
|
||||
/** Data for a release response */
|
||||
export interface ReleaseResponseData {
|
||||
/** Release ID */
|
||||
id?: string;
|
||||
/** Function ID associated with the release */
|
||||
function_id?: string;
|
||||
/** Service ID associated with the release */
|
||||
service_id?: string;
|
||||
/** Region of the release */
|
||||
region?: string;
|
||||
/** Cell name for the release */
|
||||
cell?: string;
|
||||
/** Alias name for the release */
|
||||
alias_name?: string;
|
||||
/** Rolling step value */
|
||||
rolling_step?: number;
|
||||
/** Rolling interval in seconds */
|
||||
rolling_interval?: number;
|
||||
/** Rolling strategy type */
|
||||
rolling_strategy?: number;
|
||||
/** Minimum ready percentage for rolling */
|
||||
min_ready_percentage?: number;
|
||||
/** Minimum created percentage for rolling */
|
||||
min_created_percentage?: number;
|
||||
/** Target traffic configuration */
|
||||
target_traffic_config?: Record<string, number>;
|
||||
/** Zone level traffic configuration */
|
||||
pre_traffic_config?: Record<string, number>;
|
||||
/** Target zone traffic configuration */
|
||||
target_zone_traffic_config?: Record<string, Record<string, number>>;
|
||||
/** Pre-zone traffic configuration */
|
||||
pre_zone_traffic_config?: Record<string, Record<string, number>>;
|
||||
/** Source revision ID */
|
||||
source_revision?: string;
|
||||
/** Target revision ID */
|
||||
target_revision?: string;
|
||||
/** Current status of the release */
|
||||
status?: string;
|
||||
/** Status message for the release */
|
||||
status_message?: string;
|
||||
/** Options for canceling the release */
|
||||
cancel?: CancelOptions;
|
||||
/** Error code if present */
|
||||
error_code?: string;
|
||||
/** Request ID for the release */
|
||||
request_id?: string;
|
||||
/** Event center ID for the release */
|
||||
event_center_id?: string;
|
||||
/** User who created the release */
|
||||
created_by?: string;
|
||||
/** Time when the release was created */
|
||||
created_at?: string;
|
||||
/** Time when the release was last updated */
|
||||
updated_at?: string;
|
||||
/** Time when the release was finished */
|
||||
finished_at?: string;
|
||||
/** Whether the metadata is synced */
|
||||
meta_synced?: boolean;
|
||||
/** Cold start pod configuration */
|
||||
cold_start_pods?: Record<string, string>;
|
||||
/** Logs of failed instances */
|
||||
failed_instance_logs?: string;
|
||||
/** Platform where the release is deployed */
|
||||
release_platform?: string;
|
||||
/** Snapshots of the release status */
|
||||
status_snapshots?: Array<StatusSnapshot>;
|
||||
/** Ticket ID associated with the release */
|
||||
ticket_id?: string;
|
||||
/** Current traffic configuration */
|
||||
current_traffic_config?: Record<string, number>;
|
||||
/** Current zone traffic configuration */
|
||||
current_zone_traffic_config?: Record<string, Record<string, number>>;
|
||||
/** Statistics for the source revision */
|
||||
source_revision_stat?: ReleaseRevisionStat;
|
||||
/** Statistics for the target revision */
|
||||
target_revision_stat?: ReleaseRevisionStat;
|
||||
/** Whether the release can be rolled back */
|
||||
can_rollback?: boolean;
|
||||
/** Formatted current traffic configuration */
|
||||
format_current_traffic_config?: Array<common.FormatTrafficConfig>;
|
||||
/** Formatted current zone traffic configuration */
|
||||
format_current_zone_traffic_config?: Array<common.FormatZoneTrafficConfig>;
|
||||
/** Formatted pre-traffic configuration */
|
||||
format_pre_traffic_config?: Array<common.FormatTrafficConfig>;
|
||||
/** Formatted pre-zone traffic configuration */
|
||||
format_pre_zone_traffic_config?: Array<common.FormatZoneTrafficConfig>;
|
||||
/** Formatted target traffic configuration */
|
||||
format_target_traffic_config?: Array<common.FormatTrafficConfig>;
|
||||
/** Formatted target zone traffic configuration */
|
||||
format_target_zone_traffic_config?: Array<common.FormatZoneTrafficConfig>;
|
||||
/** Link to the system logs */
|
||||
system_log_link?: string;
|
||||
/** Link to the runtime logs */
|
||||
runtime_log_link?: string;
|
||||
/** Link to the runtime stream logs */
|
||||
runtime_stream_log_link?: string;
|
||||
/** Target canary traffic configuration */
|
||||
target_canary_traffic_config?: Record<string, number>;
|
||||
/** Pre-canary traffic configuration */
|
||||
pre_canary_traffic_config?: Record<string, number>;
|
||||
/** Formatted target canary traffic configuration */
|
||||
format_target_canary_traffic_config?: Array<common.FormatTrafficConfig>;
|
||||
/** Formatted current canary traffic configuration */
|
||||
format_current_canary_traffic_config?: Array<common.FormatTrafficConfig>;
|
||||
/** Formatted pre-canary traffic configuration */
|
||||
format_pre_canary_traffic_config?: Array<common.FormatTrafficConfig>;
|
||||
}
|
||||
|
||||
/** Statistics for a release revision */
|
||||
export interface ReleaseRevisionStat {
|
||||
/** Revision ID */
|
||||
id?: string;
|
||||
/** Revision number */
|
||||
number?: number;
|
||||
/** Revision name */
|
||||
name?: string;
|
||||
/** Source type of the revision */
|
||||
source_type?: string;
|
||||
/** Source of the revision */
|
||||
source?: string;
|
||||
}
|
||||
|
||||
/** Traffic configuration for a revision */
|
||||
export interface RevisionTraffic {
|
||||
/** Revision ID */
|
||||
revision_id: string;
|
||||
/** Traffic value for the revision */
|
||||
traffic_value: number;
|
||||
}
|
||||
|
||||
/** Revisions to be rolled back */
|
||||
export interface RollbackRevisions {
|
||||
/** Region of the cluster */
|
||||
region?: string;
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Revision ID to roll back to */
|
||||
revision_id?: string;
|
||||
}
|
||||
|
||||
/** Start logs structure */
|
||||
export interface StartLogs {
|
||||
/** Logs during the prepare phase */
|
||||
prepare?: Array<LogItem>;
|
||||
/** Logs during the load phase */
|
||||
load?: Array<LogItem>;
|
||||
/** Logs during the initialize phase */
|
||||
initialize?: Array<LogItem>;
|
||||
}
|
||||
|
||||
/** Snapshot of release status at a point in time */
|
||||
export interface StatusSnapshot {
|
||||
/** Status value */
|
||||
status?: string;
|
||||
/** Status message */
|
||||
status_message?: string;
|
||||
/** Error code if present */
|
||||
error_code?: string;
|
||||
/** Time when status changed */
|
||||
changed_at?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,276 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** Data message for resource statistics */
|
||||
export interface DataMessage22 {
|
||||
/** Environment name */
|
||||
env?: string;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Region name */
|
||||
region?: string;
|
||||
/** Resource statistics */
|
||||
resource?: DataMessage22ResourceMessage2;
|
||||
}
|
||||
|
||||
/** Resource statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2 {
|
||||
/** Resource limit statistics */
|
||||
limit?: DataMessage22ResourceMessage2LimitMessage2;
|
||||
/** Resource quota statistics */
|
||||
quota?: DataMessage22ResourceMessage2QuotaMessage2;
|
||||
/** Resource usage statistics */
|
||||
usage?: DataMessage22ResourceMessage2UsageMessage2;
|
||||
}
|
||||
|
||||
/** Resource limit statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2LimitMessage2 {
|
||||
/** CPU limit statistics */
|
||||
cpu?: DataMessage22ResourceMessage2LimitMessage2CpuMessage2;
|
||||
/** Memory limit statistics */
|
||||
mem?: DataMessage22ResourceMessage2LimitMessage2MemMessage2;
|
||||
}
|
||||
|
||||
/** CPU resource limit statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2LimitMessage2CpuMessage2 {
|
||||
/** Average CPU limit */
|
||||
avg?: number;
|
||||
/** Maximum CPU limit */
|
||||
max?: number;
|
||||
/** Minimum CPU limit */
|
||||
min?: number;
|
||||
}
|
||||
|
||||
/** Memory resource limit statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2LimitMessage2MemMessage2 {
|
||||
/** Average memory limit */
|
||||
avg?: number;
|
||||
/** Maximum memory limit */
|
||||
max?: number;
|
||||
/** Minimum memory limit */
|
||||
min?: number;
|
||||
}
|
||||
|
||||
/** Resource quota statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2QuotaMessage2 {
|
||||
/** CPU quota statistics */
|
||||
cpu?: DataMessage22ResourceMessage2QuotaMessage2CpuMessage2;
|
||||
/** Memory quota statistics */
|
||||
mem?: DataMessage22ResourceMessage2QuotaMessage2MemMessage2;
|
||||
}
|
||||
|
||||
/** CPU resource quota statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2QuotaMessage2CpuMessage2 {
|
||||
/** Average CPU quota */
|
||||
avg?: number;
|
||||
/** Maximum CPU quota */
|
||||
max?: number;
|
||||
/** Minimum CPU quota */
|
||||
min?: number;
|
||||
}
|
||||
|
||||
/** Memory resource quota statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2QuotaMessage2MemMessage2 {
|
||||
/** Average memory quota */
|
||||
avg?: number;
|
||||
/** Maximum memory quota */
|
||||
max?: number;
|
||||
/** Minimum memory quota */
|
||||
min?: number;
|
||||
}
|
||||
|
||||
/** Resource usage statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2UsageMessage2 {
|
||||
/** CPU usage statistics */
|
||||
cpu?: DataMessage22ResourceMessage2UsageMessage2CpuMessage2;
|
||||
/** Memory usage statistics */
|
||||
mem?: DataMessage22ResourceMessage2UsageMessage2MemMessage2;
|
||||
}
|
||||
|
||||
/** CPU resource usage statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2UsageMessage2CpuMessage2 {
|
||||
/** Average CPU usage */
|
||||
avg?: number;
|
||||
/** Maximum CPU usage */
|
||||
max?: number;
|
||||
/** Minimum CPU usage */
|
||||
min?: number;
|
||||
}
|
||||
|
||||
/** Memory resource usage statistics for DataMessage22 */
|
||||
export interface DataMessage22ResourceMessage2UsageMessage2MemMessage2 {
|
||||
/** Average memory usage */
|
||||
avg?: number;
|
||||
/** Maximum memory usage */
|
||||
max?: number;
|
||||
/** Minimum memory usage */
|
||||
min?: number;
|
||||
}
|
||||
|
||||
/** Data message for reserved replica threshold */
|
||||
export interface DataMessage24 {
|
||||
/** Reserved replica threshold value */
|
||||
reserved_replica_threshold?: number;
|
||||
/** Resource statistics */
|
||||
resource_statistics?: DataMessage24ResourceStatisticsMessage2;
|
||||
}
|
||||
|
||||
/** Resource statistics for DataMessage24 */
|
||||
export interface DataMessage24ResourceStatisticsMessage2 {
|
||||
/** CPU statistics */
|
||||
cpu?: DataMessage24ResourceStatisticsMessage2CpuMessage2;
|
||||
/** Memory statistics */
|
||||
mem?: DataMessage24ResourceStatisticsMessage2MemMessage2;
|
||||
}
|
||||
|
||||
/** CPU resource statistics for DataMessage24 */
|
||||
export interface DataMessage24ResourceStatisticsMessage2CpuMessage2 {
|
||||
/** Average CPU usage */
|
||||
avg?: number;
|
||||
/** Maximum CPU usage */
|
||||
max?: number;
|
||||
/** Minimum CPU usage */
|
||||
min?: number;
|
||||
}
|
||||
|
||||
/** Memory resource statistics for DataMessage24 */
|
||||
export interface DataMessage24ResourceStatisticsMessage2MemMessage2 {
|
||||
/** Average memory usage */
|
||||
avg?: number;
|
||||
/** Maximum memory usage */
|
||||
max?: number;
|
||||
/** Minimum memory usage */
|
||||
min?: number;
|
||||
}
|
||||
|
||||
export interface GetMQEventResourceRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Target environment name */
|
||||
env?: string;
|
||||
}
|
||||
|
||||
export interface GetRealtimeResourceUsageRequest {
|
||||
/** get all regions */
|
||||
all_region?: boolean;
|
||||
/** Target env name */
|
||||
env?: string;
|
||||
/** psm */
|
||||
psm?: string;
|
||||
/** Target region name */
|
||||
region?: string;
|
||||
}
|
||||
|
||||
export interface GetRealtimeResourceUsageResponse {
|
||||
code?: number;
|
||||
data?: Array<GetResourceRealtimeClusterData>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetReservedReplicaThresholdRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Duration in minutes (only for cron strategy) */
|
||||
duration_minutes?: string;
|
||||
/** Start hours for cron strategy (only for cron strategy) */
|
||||
hours?: string;
|
||||
/** Start minutes for cron strategy (only for cron strategy) */
|
||||
minutes?: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetReservedReplicaThresholdResponse {
|
||||
code?: number;
|
||||
data?: DataMessage24;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Real-time resource statistics for a cluster */
|
||||
export interface GetResourceRealtimeClusterData {
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** List of zone resource statistics */
|
||||
zones?: Array<ResourceRealtimeZoneData>;
|
||||
}
|
||||
|
||||
export interface GetResourceRequest {
|
||||
/** Query all regions */
|
||||
all_region?: boolean;
|
||||
/** Target environment name */
|
||||
env?: string;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Target region name */
|
||||
region?: string;
|
||||
}
|
||||
|
||||
export interface GetResourceResponse {
|
||||
code?: number;
|
||||
data?: DataMessage22;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetTriggerReservedReplicaThresholdRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Duration in minutes (only for cron strategy) */
|
||||
duration_minutes?: string;
|
||||
/** Start hours for cron strategy (only for cron strategy) */
|
||||
hours?: string;
|
||||
/** Start minutes for cron strategy (only for cron strategy) */
|
||||
minutes?: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
}
|
||||
|
||||
export interface GetTriggerReservedReplicaThresholdResponse {
|
||||
code?: number;
|
||||
data?: DataMessage24;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Resource statistics for a zone in real time */
|
||||
export interface ResourceRealtimeZoneData {
|
||||
/** Average CPU usage in the zone */
|
||||
avg_cpu?: number;
|
||||
/** Average memory usage in the zone */
|
||||
avg_mem?: number;
|
||||
/** Number of instances in the zone */
|
||||
instances?: number;
|
||||
/** Zone name */
|
||||
zone?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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 CellGroupResource {
|
||||
/** List of function names in this cell group */
|
||||
function_list: Array<string>;
|
||||
/** Guaranteed CPU allocation for the group */
|
||||
group_guarantee_cpu: number;
|
||||
/** Fallback CPU allocation when guaranteed resources are exceeded */
|
||||
group_fallback_cpu: number;
|
||||
/** Guaranteed memory allocation for the group */
|
||||
group_guarantee_mem: number;
|
||||
/** Fallback memory allocation when guaranteed resources are exceeded */
|
||||
group_fallback_mem: number;
|
||||
}
|
||||
|
||||
export interface GetAllResourceGroupsRequest {
|
||||
/** search by region */
|
||||
region?: string;
|
||||
/** search by zone */
|
||||
zone?: string;
|
||||
}
|
||||
|
||||
export interface GetAllResourceGroupsResponse {
|
||||
code: number;
|
||||
/** Error message if operation failed */
|
||||
error: string;
|
||||
/** List of all resource groups matching the query */
|
||||
data?: Array<ResourceGroup>;
|
||||
}
|
||||
|
||||
export interface GetResourceGroupRequest {
|
||||
/** id of the resource group to get */
|
||||
group_id: string;
|
||||
}
|
||||
|
||||
export interface ResourceGroup {
|
||||
/** Unique identifier for the resource group */
|
||||
group_id: string;
|
||||
/** Name of the resource pool this group belongs to */
|
||||
resource_pool_name: string;
|
||||
/** Region where the resource group is located */
|
||||
region: string;
|
||||
/** Zone within the region where the resource group is located */
|
||||
zone: string;
|
||||
/** List of function names assigned to this resource group */
|
||||
function_list?: Array<string>;
|
||||
/** List of administrator user IDs for this resource group */
|
||||
admins?: Array<string>;
|
||||
/** Map of cell names to their respective resource configurations */
|
||||
cell_group_resource: Record<string, CellGroupResource>;
|
||||
/** Whether resource transfer between quality levels is disabled */
|
||||
disable_transfer?: boolean;
|
||||
/** Timestamp when the resource group was last updated */
|
||||
updated_at: string;
|
||||
/** User ID who last updated the resource group */
|
||||
updated_by: string;
|
||||
}
|
||||
|
||||
export interface ResourceGroupResponse {
|
||||
/** API response code */
|
||||
code: number;
|
||||
/** Error message if operation failed */
|
||||
error: string;
|
||||
/** Resource group data if operation succeeded */
|
||||
data?: ResourceGroup;
|
||||
}
|
||||
|
||||
export interface UpdateResourceGroupRequest {
|
||||
/** id of the resource group to update */
|
||||
group_id: string;
|
||||
/** if disable_transfer is false, when the resources in the resource group are insufficient, the high quality service will preempt the resources of the low quality service */
|
||||
disable_transfer?: boolean;
|
||||
/** operation for the target function list of the resource group, enum value: [ add, remove, replace ] */
|
||||
functions_operation?: string;
|
||||
/** target function list */
|
||||
function_list?: Array<string>;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,401 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CreateRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Code revision number (server generates if empty) */
|
||||
code_revision_number?: string;
|
||||
/** List of code dependencies */
|
||||
dependency?: Array<common.Dependency>;
|
||||
/** Deploy method. Enums: online-edit, scm, command-line, online-edit, image, lego */
|
||||
deploy_method?: string;
|
||||
/** Description of the revision */
|
||||
description?: string;
|
||||
/** Whether to disable build and install, true means disable */
|
||||
disable_build_install?: boolean;
|
||||
/** Environment variables per VRegion */
|
||||
envs?: Record<string, Record<string, string>>;
|
||||
/** Formatted environment variables per VRegion */
|
||||
format_envs?: Record<string, Array<common.FormatEnvs>>;
|
||||
/** Handler function name */
|
||||
handler?: string;
|
||||
/** Initializer function name */
|
||||
initializer?: string;
|
||||
/** Whether to enable lazy loading */
|
||||
lazyload?: boolean;
|
||||
/** Name of the revision */
|
||||
name?: string;
|
||||
/** Network mode (empty string or bridge) */
|
||||
network_mode?: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Command to run */
|
||||
run_cmd?: string;
|
||||
/** Runtime name */
|
||||
runtime?: string;
|
||||
/** Runtime container port */
|
||||
runtime_container_port?: number;
|
||||
/** Runtime debug container port */
|
||||
runtime_debug_container_port?: number;
|
||||
/** ID of function to create revision */
|
||||
service_id: string;
|
||||
/** Source URI of code revision */
|
||||
source?: string;
|
||||
/** Source type of code revision. Enums: url, tos, scm, ceph, image, image-scm, private-tos, lego */
|
||||
source_type?: string;
|
||||
/** Whether to enable image lazy loading */
|
||||
open_image_lazyload?: boolean;
|
||||
/** List of other runtime container ports */
|
||||
runtime_other_container_ports?: Array<number>;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
/** Host unique identifier */
|
||||
host_uniq?: common.HostUniq;
|
||||
/** Whether the revision is in cell migration */
|
||||
in_cell_migration?: boolean;
|
||||
}
|
||||
|
||||
export interface CreateRevisionResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Created revision data */
|
||||
data?: common.Revision;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeleteFunctionRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Revision number */
|
||||
revision_number: number;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface DeleteFunctionRevisionResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Deleted revision data */
|
||||
data?: common.Revision;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DownloadRevisionCodeRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Revision number */
|
||||
revision_number: number;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface DownloadRevisionCodeResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Downloaded code data */
|
||||
data?: string;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetClusterRevisionsRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Description filter */
|
||||
description?: string;
|
||||
/** Whether to format the response */
|
||||
format?: boolean;
|
||||
/** Limit for pagination */
|
||||
limit?: number;
|
||||
/** Offset for pagination */
|
||||
offset?: number;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** ID of function to create revision */
|
||||
service_id: string;
|
||||
/** Whether to include status in response */
|
||||
with_status?: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetClusterRevisionsResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of revision data */
|
||||
data?: Array<common.Revision>;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetFunctionRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Whether to format the response */
|
||||
format: boolean;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Revision number */
|
||||
revision_number: number;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetFunctionRevisionResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Function revision data */
|
||||
data?: common.Revision;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetLatestRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Whether to format the response */
|
||||
format?: boolean;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetLatestRevisionResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of latest revision data */
|
||||
data?: Array<LatestRevisionResponseData>;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetOnlineRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Whether to format the response */
|
||||
format?: boolean;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetOnlineRevisionResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of online revision data */
|
||||
data?: Array<OnlineRevision>;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Data for the latest revision */
|
||||
export interface LatestRevisionResponseData {
|
||||
/** Revision ID */
|
||||
id?: string;
|
||||
/** Revision number */
|
||||
number?: number;
|
||||
/** Region name */
|
||||
region?: string;
|
||||
/** Release time */
|
||||
released_at?: string;
|
||||
}
|
||||
|
||||
/** Online revision details */
|
||||
export interface OnlineRevision {
|
||||
/** Whether adaptive concurrency mode is enabled */
|
||||
adaptive_concurrency_mode?: boolean;
|
||||
/** Whether authentication is enabled */
|
||||
auth_enable?: boolean;
|
||||
/** Base image name */
|
||||
base_image?: string;
|
||||
/** Build description map */
|
||||
build_desc_map?: Record<string, common.BuildDescription>;
|
||||
/** Built region package keys */
|
||||
built_region_package_keys?: Record<string, string>;
|
||||
/** Cluster name */
|
||||
cluster?: string;
|
||||
/** Code revision ID */
|
||||
code_revision_id?: string;
|
||||
/** Code revision number */
|
||||
code_revision_number?: string;
|
||||
/** Whether cold start is disabled, true means disable */
|
||||
cold_start_disabled?: boolean;
|
||||
/** Cold start time in seconds */
|
||||
cold_start_sec?: number;
|
||||
/** Whether CORS is enabled */
|
||||
cors_enable?: boolean;
|
||||
/** Time when the revision was created */
|
||||
created_at?: string;
|
||||
/** User who created the revision */
|
||||
created_by?: string;
|
||||
/** Deploy method. Enums: online-edit, scm, command-line, online-edit, image, lego */
|
||||
deploy_method?: string;
|
||||
/** Description of the revision */
|
||||
description?: string;
|
||||
/** Whether build and install is disabled, true means disable */
|
||||
disable_build_install?: boolean;
|
||||
/** Environment variables */
|
||||
envs?: Record<string, Record<string, string>>;
|
||||
/** Whether exclusive mode is enabled */
|
||||
exclusive_mode?: boolean;
|
||||
/** Formatted environment variables */
|
||||
format_envs?: Record<string, Array<common.FormatEnvs>>;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** Whether GDPR is enabled */
|
||||
gdpr_enable?: boolean;
|
||||
/** Handler function name */
|
||||
handler?: string;
|
||||
/** Revision ID */
|
||||
id?: string;
|
||||
/** Images map */
|
||||
images?: Record<string, string>;
|
||||
/** Initializer function name */
|
||||
initializer?: string;
|
||||
/** Initializer time in seconds */
|
||||
initializer_sec?: number;
|
||||
/** Disabled zones map */
|
||||
is_this_zone_disabled?: Record<string, boolean>;
|
||||
/** Last ticket status */
|
||||
last_ticket_status?: string;
|
||||
/** Latency in seconds */
|
||||
latency_sec?: number;
|
||||
/** Whether lazy loading is enabled */
|
||||
lazyload?: boolean;
|
||||
/** Maximum concurrency */
|
||||
max_concurrency?: number;
|
||||
/** Name of the revision */
|
||||
name?: string;
|
||||
/** Revision number */
|
||||
number?: number;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Resource limit configuration */
|
||||
resource_limit?: common.ResourceLimit;
|
||||
/** Command to run */
|
||||
run_cmd?: string;
|
||||
/** Runtime name */
|
||||
runtime?: string;
|
||||
/** Service ID */
|
||||
service_id?: string;
|
||||
/** Source code */
|
||||
source?: string;
|
||||
/** Source download URL */
|
||||
source_download_url?: string;
|
||||
/** Source type */
|
||||
source_type?: string;
|
||||
/** Throttle log bytes per second */
|
||||
throttle_log_bytes_per_sec?: number;
|
||||
/** Throttle stderr log bytes per second */
|
||||
throttle_stderr_log_bytes_per_sec?: number;
|
||||
/** Throttle stdout log bytes per second */
|
||||
throttle_stdout_log_bytes_per_sec?: number;
|
||||
/** Traffic value */
|
||||
traffic_value?: number;
|
||||
/** Time when the revision was last updated */
|
||||
updated_at?: string;
|
||||
/** Worker built region package keys */
|
||||
worker_built_region_package_keys?: Record<string, common.EmptyObject>;
|
||||
/** Whether online mode is enabled */
|
||||
online_mode?: boolean;
|
||||
/** Whether image lazy loading is enabled */
|
||||
open_image_lazyload?: boolean;
|
||||
/** Whether overload protection is enabled */
|
||||
overload_protect_enabled?: boolean;
|
||||
/** Whether Consul IPv6 register is enabled */
|
||||
enable_consul_ipv6_register?: boolean;
|
||||
/** Whether system mount is enabled */
|
||||
enable_sys_mount?: boolean;
|
||||
/** Whether mounting JWT bundles is disabled, true means disable */
|
||||
disable_mount_jwt_bundles?: boolean;
|
||||
/** Termination grace period in seconds */
|
||||
termination_grace_period_seconds?: number;
|
||||
/** Whether Consul register is enabled */
|
||||
enable_consul_register?: boolean;
|
||||
/** enable privileged in pod */
|
||||
privileged?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateFunctionLatestRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface UpdateFunctionLatestRevisionResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Data for the update operation */
|
||||
data?: string;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateFunctionRevisionRequest {
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Deploy method. Enums: online-edit, scm, command-line, online-edit, image, lego */
|
||||
deploy_method?: string;
|
||||
/** Environment variables */
|
||||
envs?: Record<string, Record<string, string>>;
|
||||
/** Handler function name */
|
||||
handler?: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Revision number */
|
||||
revision_number: number;
|
||||
/** Runtime name */
|
||||
runtime?: string;
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** Source code */
|
||||
source?: string;
|
||||
/** Type of code source */
|
||||
source_type?: string;
|
||||
}
|
||||
|
||||
export interface UpdateFunctionRevisionResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** Updated revision data */
|
||||
data?: common.Revision;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,232 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
/** AI Sandbox */
|
||||
export interface AiSandbox {
|
||||
/** Unique identifier for the sandbox */
|
||||
sandbox_id: string;
|
||||
/** Service ID associated with this sandbox */
|
||||
service_id: string;
|
||||
/** Type of sandbox (code or browser) */
|
||||
type: string;
|
||||
/** PSM identifier for the sandbox */
|
||||
psm: string;
|
||||
/** Environment name where the sandbox runs */
|
||||
env_name?: string;
|
||||
/** Display name of the sandbox */
|
||||
name: string;
|
||||
/** Description of the sandbox purpose */
|
||||
description?: string;
|
||||
/** Owner of the sandbox */
|
||||
owner: string;
|
||||
/** List of users subscribed to this sandbox */
|
||||
subscribers?: Array<string>;
|
||||
/** Timestamp when sandbox was created (Unix timestamp) */
|
||||
created_at: Int64;
|
||||
/** Timestamp when sandbox was last updated (Unix timestamp) */
|
||||
updated_at: Int64;
|
||||
/** Whether the sandbox is deleted */
|
||||
is_deleted: boolean;
|
||||
/** Timestamp when sandbox was deleted (Unix timestamp) */
|
||||
deleted_at: Int64;
|
||||
/** User who deleted the sandbox */
|
||||
deleted_by: string;
|
||||
/** Optional type-specific extras */
|
||||
code_sandbox_extras?: CodeSandboxExtras;
|
||||
/** Browser sandbox specific configuration */
|
||||
browser_sandbox_extras?: BrowserSandboxExtras;
|
||||
/** MCP (Model Context Protocol) server ID */
|
||||
mcp_server_id?: string;
|
||||
/** Current status of the service */
|
||||
service_status?: string;
|
||||
/** List of sandbox administrators */
|
||||
admins?: Array<string>;
|
||||
/** List of users who can authorize sandbox operations */
|
||||
authorizers?: Array<string>;
|
||||
}
|
||||
|
||||
/** AI Sandbox network ACL */
|
||||
export interface AiSandboxAcl {
|
||||
/** list of allowed rules, as regex patterns of urls */
|
||||
allowed_rules?: Array<string>;
|
||||
/** list of blocked rules, as regex patterns of urls */
|
||||
blocked_rules?: Array<string>;
|
||||
}
|
||||
|
||||
/** Currently empty in the implementation */
|
||||
export interface BrowserSandboxExtras {}
|
||||
|
||||
export interface CodeSandboxExtras {}
|
||||
|
||||
export interface CreateAiSandboxAclBpmTicketRequest {
|
||||
/** ID of the sandbox to create BPM ticket for */
|
||||
sandbox_id: string;
|
||||
/** list of allowed rules, as regex patterns of urls */
|
||||
allowed_rules?: Array<string>;
|
||||
/** list of blocked rules, as regex patterns of urls */
|
||||
blocked_rules?: Array<string>;
|
||||
/** reason for the update request */
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export interface CreateAiSandboxAclBpmTicketResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: CreateAiSandboxAclBpmTicketResponseData;
|
||||
}
|
||||
|
||||
export interface CreateAiSandboxAclBpmTicketResponseData {
|
||||
/** link to the BPM ticket for the ACL update request
|
||||
Once approved, BPM will callback to the service to apply the ACL changes */
|
||||
bpm_link: string;
|
||||
}
|
||||
|
||||
export interface CreateAiSandboxRequest {
|
||||
/** PSM identifier for the new sandbox */
|
||||
psm: string;
|
||||
/** Display name for the sandbox */
|
||||
name: string;
|
||||
/** "code" or "browser" */
|
||||
type: string;
|
||||
/** Description of the sandbox purpose */
|
||||
description?: string;
|
||||
/** Parent PSM ID if this is a child service */
|
||||
psm_parent_id?: number;
|
||||
/** Owner of the sandbox */
|
||||
owner: string;
|
||||
/** Region where the sandbox will be deployed */
|
||||
region: string;
|
||||
/** Runtime environment for the sandbox */
|
||||
runtime: string;
|
||||
/** Environment variables for the sandbox */
|
||||
format_envs?: Array<common.FormatEnvs>;
|
||||
/** List of sandbox administrators */
|
||||
admins?: Array<string>;
|
||||
/** List of users who can authorize sandbox operations */
|
||||
authorizers?: Array<string>;
|
||||
/** Service level configuration */
|
||||
service_level?: string;
|
||||
/** Purpose of the service */
|
||||
service_purpose?: string;
|
||||
/** Source type for the sandbox code */
|
||||
source_type: string;
|
||||
/** Source location for the sandbox code */
|
||||
source: string;
|
||||
/** MCP server ID to associate with the sandbox */
|
||||
mcp_server_id?: string;
|
||||
}
|
||||
|
||||
export interface CreateAiSandboxResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** Created sandbox data */
|
||||
data?: AiSandbox;
|
||||
}
|
||||
|
||||
export interface DeleteAiSandboxResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetAiSandboxAclRequest {
|
||||
/** ID of the sandbox to get ACL for */
|
||||
sandbox_id: string;
|
||||
}
|
||||
|
||||
export interface GetAiSandboxAclResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
data?: AiSandboxAcl;
|
||||
}
|
||||
|
||||
export interface GetAiSandboxRequest {
|
||||
/** ID of the sandbox to retrieve */
|
||||
sandbox_id: string;
|
||||
}
|
||||
|
||||
export interface GetAiSandboxResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** Retrieved sandbox data */
|
||||
data?: AiSandbox;
|
||||
}
|
||||
|
||||
export interface ListAiSandboxesRequest {
|
||||
/** search by name */
|
||||
search?: string;
|
||||
/** search by owner */
|
||||
owner?: string;
|
||||
/** search by subscriber */
|
||||
subscriber?: string;
|
||||
/** offset for pagination */
|
||||
offset?: number;
|
||||
/** limit for pagination */
|
||||
limit?: number;
|
||||
/** advanced search by key-value pairs */
|
||||
advanced_search?: Record<string, string>;
|
||||
/** sort by fields */
|
||||
sort_by?: string;
|
||||
/** search type: all/admin/own/subscribe */
|
||||
search_type?: string;
|
||||
/** supported search fields: sandbox_id/name/psm */
|
||||
search_fields?: string;
|
||||
}
|
||||
|
||||
export interface ListAiSandboxesResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** List of AI sandboxes */
|
||||
data: Array<AiSandbox>;
|
||||
}
|
||||
|
||||
export interface UpdateAiSandboxAclRequest {
|
||||
/** ID of the sandbox to update ACL for */
|
||||
sandbox_id: string;
|
||||
/** list of allowed rules, as regex patterns of urls */
|
||||
allowed_rules?: Array<string>;
|
||||
/** list of blocked rules, as regex patterns of urls */
|
||||
blocked_rules?: Array<string>;
|
||||
}
|
||||
|
||||
export interface UpdateAiSandboxRequest {
|
||||
/** ID of the sandbox to update */
|
||||
sandbox_id: string;
|
||||
/** new name for the sandbox */
|
||||
name?: string;
|
||||
/** new description for the sandbox */
|
||||
description?: string;
|
||||
/** new owner for the sandbox */
|
||||
owner?: string;
|
||||
/** new mcp server id for the sandbox */
|
||||
mcp_server_id?: string;
|
||||
}
|
||||
|
||||
export interface UpdateAiSandboxResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** Updated sandbox data */
|
||||
data?: AiSandbox;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** Function scale record item */
|
||||
export interface FunctionScaleRecordListItem {
|
||||
/** Unique scale record ID */
|
||||
record_id: string;
|
||||
/** Request ID for the scaling operation */
|
||||
request_id: string;
|
||||
/** Function ID being scaled */
|
||||
function_id: string;
|
||||
/** Cluster where scaling occurred */
|
||||
cluster: string;
|
||||
/** Region where scaling occurred */
|
||||
region: string;
|
||||
/** Cell where scaling occurred */
|
||||
cell: string;
|
||||
/** Zone where scaling occurred */
|
||||
zone: string;
|
||||
/** Name of the deployment */
|
||||
deploy_name: string;
|
||||
/** Strategy used for scaling */
|
||||
effect_strategy: string;
|
||||
/** Time when scaling took effect */
|
||||
scale_at: string;
|
||||
/** Type of scaling operation */
|
||||
scale_operation: string;
|
||||
/** Number of replicas before scaling */
|
||||
replicas_from: Int64;
|
||||
/** Number of replicas after scaling */
|
||||
replicas_to: Int64;
|
||||
/** Reason for scaling */
|
||||
detail_reason: string;
|
||||
/** Status of the scaling record */
|
||||
status: string;
|
||||
/** Record creation time */
|
||||
created_at: string;
|
||||
/** Record last update time */
|
||||
updated_at: string;
|
||||
/** Environment name */
|
||||
env_name: string;
|
||||
/** PSM of the function */
|
||||
psm: string;
|
||||
/** MQ app replica counts before scaling */
|
||||
mq_app_replicas_from: Record<string, Int64>;
|
||||
/** MQ app replica counts after scaling */
|
||||
mq_app_replicas_to: Record<string, Int64>;
|
||||
}
|
||||
|
||||
export interface GetFunctionScaleRecordListReq {
|
||||
/** Service ID to query scale records for */
|
||||
service_id: string;
|
||||
/** Region to query scale records for */
|
||||
region: string;
|
||||
/** Pagination offset */
|
||||
offset?: string;
|
||||
/** Pagination limit */
|
||||
limit?: string;
|
||||
/** Start time (second level timestamp) */
|
||||
start_time?: string;
|
||||
/** End time (second level timestamp) */
|
||||
end_time?: string;
|
||||
/** Cluster to filter records */
|
||||
cluster?: string;
|
||||
/** Scaling strategy to filter records */
|
||||
strategy?: string;
|
||||
}
|
||||
|
||||
export interface GetFunctionScaleRecordListRes {
|
||||
code: number;
|
||||
data: Array<FunctionScaleRecordListItem>;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface GetMQTriggerScaleRecordListReq {
|
||||
/** Service ID to query scale records for */
|
||||
service_id: string;
|
||||
/** Region to query scale records for */
|
||||
region: string;
|
||||
/** Pagination offset */
|
||||
offset?: string;
|
||||
/** Pagination limit */
|
||||
limit?: string;
|
||||
/** Start time (second level timestamp) */
|
||||
start_time?: string;
|
||||
/** End time (second level timestamp) */
|
||||
end_time?: string;
|
||||
/** Cluster to filter records */
|
||||
cluster?: string;
|
||||
/** Scaling strategy to filter records */
|
||||
strategy?: string;
|
||||
/** Search keyword */
|
||||
search?: string;
|
||||
}
|
||||
|
||||
export interface GetMQTriggerScaleRecordListRes {
|
||||
code: number;
|
||||
data: Array<MQTriggerScaleRecordListItem>;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface MQTriggerScaleRecordListItem {
|
||||
/** Unique scale record ID */
|
||||
record_id: string;
|
||||
/** Request ID for the scaling operation */
|
||||
request_id: string;
|
||||
/** Function ID being scaled */
|
||||
function_id: string;
|
||||
/** Cluster where scaling occurred */
|
||||
cluster: string;
|
||||
/** Region where scaling occurred */
|
||||
region: string;
|
||||
/** Cell where scaling occurred */
|
||||
cell: string;
|
||||
/** MQ event ID */
|
||||
mqevent_id: string;
|
||||
/** Name of the deployment */
|
||||
deploy_name: string;
|
||||
/** Strategy used for scaling */
|
||||
effect_strategy: string;
|
||||
/** Time when scaling took effect */
|
||||
scale_at: string;
|
||||
/** Type of scaling operation */
|
||||
scale_operation: string;
|
||||
/** Replica counts before scaling (per MQ app) */
|
||||
replicas_from: Record<string, Int64>;
|
||||
/** Replica counts after scaling (per MQ app) */
|
||||
replicas_to: Record<string, Int64>;
|
||||
/** Resource allocation before scaling */
|
||||
resource_from: Record<string, Record<string, Int64>>;
|
||||
/** Resource allocation after scaling */
|
||||
resource_to: Record<string, Record<string, Int64>>;
|
||||
/** Reason for scaling */
|
||||
detail_reason: string;
|
||||
/** Status of the scaling record */
|
||||
status: string;
|
||||
/** Record creation time */
|
||||
created_at: string;
|
||||
/** Record last update time */
|
||||
updated_at: string;
|
||||
/** Environment name */
|
||||
env_name: string;
|
||||
/** PSM of the function */
|
||||
psm: string;
|
||||
/** Name of the trigger */
|
||||
trigger_name: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,400 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
/** CPU scale settings for a cluster */
|
||||
export interface ClusterCPUScaleSettings {
|
||||
/** Cluster name */
|
||||
cluster_name?: string;
|
||||
/** CPU scale settings for the cluster */
|
||||
cpu_scale_settings?: common.FuncCPUScaleSettings;
|
||||
/** CPU scale settings for specific zones */
|
||||
zone_scale_settings?: Record<string, common.FuncCPUScaleSettings>;
|
||||
}
|
||||
|
||||
export interface EmergencyScaleRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Minimum replicas during emergency scale */
|
||||
min_replicas: Record<string, number>;
|
||||
/** Scale duration in minutes */
|
||||
scale_duration_minutes: number;
|
||||
}
|
||||
|
||||
export interface EmergencyScaleResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Result of the emergency scale request */
|
||||
data: EmergencyScaleResult;
|
||||
/** Error message, if any */
|
||||
error: string;
|
||||
}
|
||||
|
||||
/** Result for emergency scale request */
|
||||
export interface EmergencyScaleResult {
|
||||
/** Function ID */
|
||||
function_id: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Minimum replicas during emergency scale */
|
||||
min_replicas: Record<string, number>;
|
||||
/** Expected start time for keeping minimum replicas */
|
||||
expect_keep_min_begin_at: string;
|
||||
/** Expected end time for keeping minimum replicas */
|
||||
expect_keep_min_end_at: string;
|
||||
}
|
||||
|
||||
export interface FuncScaleSettingApiResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Response data containing function scale setting */
|
||||
data: FuncScaleSettingResponse;
|
||||
/** Error message, if any */
|
||||
error: string;
|
||||
}
|
||||
|
||||
/** Function scale setting response */
|
||||
export interface FuncScaleSettingResponse {
|
||||
/** Function ID */
|
||||
function_id: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Scale threshold set for the function */
|
||||
scale_threshold_set: ScaleThresholdsSet;
|
||||
/** Lag scale set name */
|
||||
lag_scale_set: string;
|
||||
/** Overload fast scale setting */
|
||||
overload_fast_scale_set: OverloadFastScaleSetting;
|
||||
}
|
||||
|
||||
export interface GetFunctionScaleThresholdsSettingRequest {
|
||||
/** Function ID */
|
||||
service_id: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
}
|
||||
|
||||
export interface GetMQTriggerScaleThresholdSetRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Trigger ID of the MQ Trigger */
|
||||
trigger_id: string;
|
||||
}
|
||||
|
||||
export interface GetMQTriggerScaleThresholdSetResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Data of the MQ Trigger scale threshold set */
|
||||
data: MQTriggerScaleThresholdData;
|
||||
/** Error message, if any */
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface ListFuncScaleSettingApiRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Optional region filter */
|
||||
region?: string;
|
||||
/** Optional cluster filter */
|
||||
cluster?: string;
|
||||
/** Optional offset for pagination */
|
||||
offset?: string;
|
||||
/** Optional limit for pagination */
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface ListFuncScaleSettingApiResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** List of function scale setting results */
|
||||
data: Array<ListFuncScaleSettingResult>;
|
||||
/** Error message, if any */
|
||||
error: string;
|
||||
}
|
||||
|
||||
/** Result for listing function scale settings */
|
||||
export interface ListFuncScaleSettingResult {
|
||||
/** Function ID */
|
||||
function_id: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Scale threshold set for the function */
|
||||
scale_threshold_set: ScaleThresholdsSet;
|
||||
/** Lag scale set name */
|
||||
lag_scale_set: string;
|
||||
/** Overload fast scale setting */
|
||||
overload_fast_scale_set: OverloadFastScaleSetting;
|
||||
/** List of cron scale strategies */
|
||||
cron_scale_strategies: Array<common.ScaleStrategy>;
|
||||
}
|
||||
|
||||
/** Data for listing MQ Trigger scale settings */
|
||||
export interface ListMQTriggerScaleSettingData {
|
||||
/** MQ Trigger ID */
|
||||
mqtrigger_id: string;
|
||||
/** Type of the trigger,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Name of the trigger */
|
||||
trigger_name: string;
|
||||
/** Cluster where the trigger is located */
|
||||
cluster: string;
|
||||
/** Service ID associated with the trigger */
|
||||
service_id: string;
|
||||
/** Function ID associated with the trigger */
|
||||
function_id: string;
|
||||
/** Scale threshold set for the trigger */
|
||||
scale_threshold_set: ScaleThresholdsSet;
|
||||
/** Lag scale set name */
|
||||
lag_scale_set: string;
|
||||
/** Whether vertical scaling is enabled */
|
||||
vertical_scale_enabled: boolean;
|
||||
/** List of cron scale strategies */
|
||||
cron_scale_strategies: Array<common.ScaleStrategy>;
|
||||
/** Region where the trigger is located */
|
||||
region: string;
|
||||
}
|
||||
|
||||
export interface ListMQTriggerScaleThresholdsSettingRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Optional offset for pagination */
|
||||
offset?: string;
|
||||
/** Optional limit for pagination */
|
||||
limit?: string;
|
||||
/** Optional search term */
|
||||
search?: string;
|
||||
/** Optional region filter */
|
||||
region?: string;
|
||||
/** Optional cluster filter */
|
||||
cluster?: string;
|
||||
}
|
||||
|
||||
export interface ListMQTriggerScaleThresholdsSettingResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** List of MQ Trigger scale setting data */
|
||||
data: Array<ListMQTriggerScaleSettingData>;
|
||||
/** Error message, if any */
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface MQTriggerEmergencyScaleRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Trigger ID of the MQ Trigger */
|
||||
trigger_id: string;
|
||||
/** Minimum replicas during emergency scale */
|
||||
min_replicas: Record<string, number>;
|
||||
/** Scale duration in minutes */
|
||||
scale_duration_minutes: number;
|
||||
}
|
||||
|
||||
export interface MQTriggerEmergencyScaleResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Result of the MQ Trigger emergency scale request */
|
||||
data: MQTriggerEmergencyScaleResult;
|
||||
/** Error message, if any */
|
||||
error: string;
|
||||
}
|
||||
|
||||
/** Emergency scale result for MQ Trigger */
|
||||
export interface MQTriggerEmergencyScaleResult {
|
||||
/** Function ID */
|
||||
function_id: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Minimum replicas during emergency scale */
|
||||
min_replicas: Record<string, number>;
|
||||
/** Expected start time for keeping minimum replicas */
|
||||
expect_keep_min_begin_at: string;
|
||||
/** Expected end time for keeping minimum replicas */
|
||||
expect_keep_min_end_at: string;
|
||||
/** MQ Trigger ID */
|
||||
mqtrigger_id: string;
|
||||
}
|
||||
|
||||
/** MQ Trigger scale threshold data */
|
||||
export interface MQTriggerScaleThresholdData {
|
||||
/** MQ Trigger ID */
|
||||
mqtrigger_id: string;
|
||||
/** Type of the trigger,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Name of the trigger */
|
||||
trigger_name: string;
|
||||
/** Cluster where the trigger is located */
|
||||
cluster: string;
|
||||
/** Service ID associated with the trigger */
|
||||
service_id: string;
|
||||
/** Function ID associated with the trigger */
|
||||
function_id: string;
|
||||
/** Scale threshold set for the trigger */
|
||||
scale_threshold_set: ScaleThresholdsSet;
|
||||
/** Lag scale set name */
|
||||
lag_scale_set: string;
|
||||
/** Whether vertical scaling is enabled */
|
||||
vertical_scale_enabled: boolean;
|
||||
/** Region where the trigger is located */
|
||||
region: string;
|
||||
}
|
||||
|
||||
/** Overload fast scale setting */
|
||||
export interface OverloadFastScaleSetting {
|
||||
/** Whether online revision fast scale setting is enabled */
|
||||
online_revision_setting_enabled: boolean;
|
||||
/** Whether latest revision fast scale setting is enabled */
|
||||
latest_setting_enabled: boolean;
|
||||
}
|
||||
|
||||
export interface PatchMQTriggerScaleThresholdSetRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Trigger ID of the MQ Trigger */
|
||||
trigger_id: string;
|
||||
/** Optional scale set name */
|
||||
scale_set_name?: string;
|
||||
/** Optional lag scale set name */
|
||||
lag_scale_set_name?: string;
|
||||
/** Optional vertical scale enable flag */
|
||||
vertical_scale_enabled?: boolean;
|
||||
}
|
||||
|
||||
export interface PatchMQTriggerScaleThresholdSetResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Data of the patched MQ Trigger scale threshold set */
|
||||
data: MQTriggerScaleThresholdData;
|
||||
/** Error message, if any */
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface ScaleThresholdOptionsApiResponse {
|
||||
/** Response code */
|
||||
code: number;
|
||||
/** Response data containing scale threshold options */
|
||||
data: ScaleThresholdOptionsResult;
|
||||
/** Error message, if any */
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface ScaleThresholdOptionsRequest {
|
||||
/** Service ID to query */
|
||||
service_id: string;
|
||||
/** Scale target type (functions/mqtriggers) */
|
||||
target: string;
|
||||
/** MQ trigger ID (if applicable) */
|
||||
mqtrigger_id?: string;
|
||||
}
|
||||
|
||||
export interface ScaleThresholdOptionsRequestV2 {
|
||||
/** Service ID to query */
|
||||
service_id: string;
|
||||
/** Scale target type (functions/mqtriggers) */
|
||||
target: string;
|
||||
/** MQ trigger ID (if applicable) */
|
||||
mqtrigger_id?: string;
|
||||
/** Region to query */
|
||||
region: string;
|
||||
/** Cluster to query */
|
||||
cluster: string;
|
||||
}
|
||||
|
||||
/** Result containing available scale threshold options */
|
||||
export interface ScaleThresholdOptionsResult {
|
||||
/** List of scale threshold options */
|
||||
scale_threshold_options: Array<ScaleThresholdsSet>;
|
||||
/** List of lag scale options */
|
||||
lag_scale_options: Array<string>;
|
||||
}
|
||||
|
||||
/** Scale threshold setting for a function */
|
||||
export interface ScaleThresholdSetting {
|
||||
/** Name of the scaling strategy */
|
||||
strategy_name: string;
|
||||
/** Threshold to scale up */
|
||||
scale_up_threshold: number;
|
||||
/** Target value for scaling */
|
||||
scale_target: number;
|
||||
/** Threshold to scale down */
|
||||
scale_down_threshold: number;
|
||||
}
|
||||
|
||||
/** A set of scale thresholds for a function */
|
||||
export interface ScaleThresholdsSet {
|
||||
/** Name of the scale set */
|
||||
scale_set_name: string;
|
||||
/** List of strategy settings */
|
||||
strategy_settings: Array<ScaleThresholdSetting>;
|
||||
}
|
||||
|
||||
export interface UpdateScaleThresholdSetRequest {
|
||||
/** Function ID */
|
||||
service_id: string;
|
||||
/** Region name */
|
||||
region: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Name of the scale threshold set to update */
|
||||
scale_set_name?: string;
|
||||
/** Whether overload fast scale is enabled */
|
||||
overload_fast_scale_enabled?: boolean;
|
||||
/** Name of the lag scale set */
|
||||
lag_scale_set_name?: string;
|
||||
}
|
||||
|
||||
export interface UpdateServiceScaleSettingsRequest {
|
||||
/** ID of service */
|
||||
service_id: string;
|
||||
/** Optional CPU scale settings for the service */
|
||||
service_cpu_scale_settings?: common.FuncCPUScaleSettings;
|
||||
/** Optional list of cluster CPU scale settings */
|
||||
cluster_cpu_scale_settings?: Array<ClusterCPUScaleSettings>;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CreateScaleStrategyRequest {
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** When the strategy will be effective */
|
||||
effective_time?: string;
|
||||
/** Whether the strategy is enabled */
|
||||
enabled?: boolean;
|
||||
/** When the strategy will expire */
|
||||
expired_time?: string;
|
||||
/** Function ID (not needed for post/patch method) */
|
||||
function_id?: string;
|
||||
/** Inner strategy details */
|
||||
inner_strategy?: common.InnerStrategy;
|
||||
/** Function ID or MQ event ID */
|
||||
item_id?: string;
|
||||
/** Item type: function or mqevent */
|
||||
item_type?: string;
|
||||
/** Region (not needed for post/patch method) */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Strategy ID (not needed for post/patch method) */
|
||||
strategy_id?: string;
|
||||
/** Strategy name */
|
||||
strategy_name?: string;
|
||||
/** Strategy type (only cron for now) */
|
||||
strategy_type?: string;
|
||||
/** Instance type: ReservedInstance or FrozenReservedInstance (default is ReservedInstance) */
|
||||
instance_type?: string;
|
||||
}
|
||||
|
||||
export interface CreateScaleStrategyResponse {
|
||||
code?: number;
|
||||
data?: common.ScaleStrategy;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeleteScaleStrategyRequest {
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Strategy ID to delete */
|
||||
strategy_id: string;
|
||||
}
|
||||
|
||||
export interface DeleteScaleStrategyResponse {
|
||||
code?: number;
|
||||
data?: common.ScaleStrategy;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetScaleStrategiesRequest {
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetScaleStrategiesResponse {
|
||||
code?: number;
|
||||
data?: Array<common.ScaleStrategy>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetScaleStrategyRequest {
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Strategy ID to query */
|
||||
strategy_id: string;
|
||||
}
|
||||
|
||||
export interface GetScaleStrategyResponse {
|
||||
code?: number;
|
||||
data?: common.ScaleStrategy;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface PatchScaleStrategyRequest {
|
||||
/** Required for inner BPM operation */
|
||||
bpm_update_type?: string;
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** When the strategy will be effective */
|
||||
effective_time?: string;
|
||||
/** Whether the strategy is enabled */
|
||||
enabled?: boolean;
|
||||
/** When the strategy will expire */
|
||||
expired_time?: string;
|
||||
/** Function ID (not needed for post/patch method) */
|
||||
function_id?: string;
|
||||
/** Inner strategy details */
|
||||
inner_strategy?: common.InnerStrategy;
|
||||
/** Function ID or MQ event ID */
|
||||
item_id?: string;
|
||||
/** Item type: function or mqevent */
|
||||
item_type?: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Strategy ID to patch */
|
||||
strategy_id: string;
|
||||
/** Strategy name */
|
||||
strategy_name?: string;
|
||||
/** Strategy type (only cron for now) */
|
||||
strategy_type?: string;
|
||||
/** Instance type: ReservedInstance or FrozenReservedInstance (default is ReservedInstance) */
|
||||
instance_type?: string;
|
||||
}
|
||||
|
||||
export interface PatchScaleStrategyResponse {
|
||||
code?: number;
|
||||
data?: common.ScaleStrategy;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,840 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
import * as cluster from './cluster';
|
||||
import * as admin from './admin';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CreateServiceRequest {
|
||||
/** 管理员
|
||||
Administrators of the service (comma-separated user IDs) */
|
||||
admins?: string;
|
||||
/** 仅对管理员开放的受限访问
|
||||
If true, restricts access to administrators only */
|
||||
async_mode?: boolean;
|
||||
/** 授权人
|
||||
Authorizers for the service (comma-separated user IDs) */
|
||||
authorizers?: string;
|
||||
/** 基础镜像
|
||||
Base image used for the service container */
|
||||
base_image?: string;
|
||||
/** 服务类型
|
||||
Category of the service */
|
||||
category: string;
|
||||
/** 仅用于引用结构体类型,值为 JSON 字符串
|
||||
List of dependencies required by the service */
|
||||
dependency?: Array<common.Dependency>;
|
||||
/** 部署方式
|
||||
Deployment method for the service. Enums: online-edit, scm, command-line, online-edit, image, lego */
|
||||
deploy_method?: string;
|
||||
/** 服务描述, 原来的函数描述
|
||||
Description of the service */
|
||||
description: string;
|
||||
/** 多环境标识
|
||||
Environment name */
|
||||
env_name?: string;
|
||||
/** 服务名称, 原来的函数名称
|
||||
Name of the service */
|
||||
name: string;
|
||||
/** 是否需要审核
|
||||
Whether the service requires approval */
|
||||
need_approve?: boolean;
|
||||
/** 服务的来源,除了 faas 也有可能是来自轻服务等
|
||||
Origin of the service */
|
||||
origin?: string;
|
||||
/** 服务的 Owner
|
||||
Owner of the service */
|
||||
owner: string;
|
||||
/** 服务协议,如 TTHeader 等
|
||||
Protocol used by the service */
|
||||
protocol: string;
|
||||
/** 服务唯一标识
|
||||
PSM (Product-Service-Module) unique identifier for the service */
|
||||
psm: string;
|
||||
/** 服务树父节点
|
||||
Parent ID of the PSM, used only during creation */
|
||||
psm_parent_id: number;
|
||||
/** 运行时语言. 可选值: golang/v1,node10/v1,python3/v1,rust1/v1,java8/v1,wasm/v1,v8/v1,native/v1,native-java8/v1
|
||||
Runtime language for the service */
|
||||
runtime?: string;
|
||||
/** 服务等级
|
||||
Service level */
|
||||
service_level: string;
|
||||
/** 服务用途
|
||||
Purpose of the service */
|
||||
service_purpose: string;
|
||||
/** 源码
|
||||
Source code of the service */
|
||||
source?: string;
|
||||
/** 源码类型
|
||||
Type of the source code */
|
||||
source_type?: string;
|
||||
/** 订阅人
|
||||
List of subscribers to the service */
|
||||
subscribers?: Array<string>;
|
||||
/** 基于代码模板创建
|
||||
Template name used to create the service code */
|
||||
template_name?: string;
|
||||
/** 是否为在线模式
|
||||
If true, the service is in online mode */
|
||||
online_mode?: boolean;
|
||||
/** scm 路径信息
|
||||
SCM (Source Code Management) plugin path information */
|
||||
plugin_scm_path?: string;
|
||||
/** 代码包大小, 单位 MB, 需要管理员权限
|
||||
Size of the code file in MB (admin permission required) */
|
||||
code_file_size_mb?: number;
|
||||
/** 泳道函数关闭报警, 默认为 false
|
||||
If true, disables alarm for canary (env) functions */
|
||||
disable_ppe_alarm?: boolean;
|
||||
/** 运行时语言
|
||||
Programming language used by the service when the runtime is wasm/v1. Enums: c++, golang, rust, assemblyscript, javascript */
|
||||
language?: string;
|
||||
/** 运行命令
|
||||
Command to run the service */
|
||||
run_cmd?: string;
|
||||
/** 镜像懒加载
|
||||
If true, enables lazy loading of the image */
|
||||
image_lazy_load?: boolean;
|
||||
/** 插件名称
|
||||
Name of the plugin associated with the service */
|
||||
plugin_name?: string;
|
||||
/** 运行时容器端口
|
||||
Port used by the runtime container */
|
||||
runtime_container_port?: number;
|
||||
/** 运行时调试容器端口
|
||||
Debug port for the runtime container */
|
||||
runtime_debug_container_port?: number;
|
||||
/** 健康检查路径
|
||||
Path used for health checks */
|
||||
health_check_path?: string;
|
||||
/** 健康检查失败阈值
|
||||
Threshold for health check failures */
|
||||
health_check_failure_threshold?: number;
|
||||
/** 健康检查周期
|
||||
Period (in seconds) for health checks */
|
||||
health_check_period?: number;
|
||||
/** 运行时其他容器端口
|
||||
List of additional ports for the runtime container */
|
||||
runtime_other_container_ports?: Array<number>;
|
||||
/** 是否启用过载保护
|
||||
If true, enables overload protection for the service */
|
||||
overload_protect_enabled?: boolean;
|
||||
/** 网络队列
|
||||
Network queue name for the service */
|
||||
net_queue?: string;
|
||||
/** 微服务平台服务元参数
|
||||
Meta parameters for MS platform (not stored in DB) */
|
||||
ms_service_meta_params?: MSServiceMetaParams;
|
||||
/** 挂载信息
|
||||
List of mount information for the service */
|
||||
mount_info?: Array<string>;
|
||||
/** 是否禁用构建安装
|
||||
If true, disables build and install steps */
|
||||
disable_build_install?: boolean;
|
||||
/** 是否启用懒加载
|
||||
If true, enables lazy loading for the service */
|
||||
lazyload?: boolean;
|
||||
/** 审核权限点 [cluster_create, cluster_update, cluster_delete, code_release]
|
||||
List of approval scopes for the service */
|
||||
approval_scope?: Array<string>;
|
||||
/** 消息队列类型
|
||||
Type of message queue used by the service, enums: kafka, rocketmq, tos, eventbus, abase_binlog, vefaas_async_tos, vefaas_bmq */
|
||||
mq_type?: string;
|
||||
/** 是否依赖 GPU,所有集群必须使用 GPU 资源
|
||||
If true, the service depends on GPU resources */
|
||||
use_gpu?: boolean;
|
||||
/** 要创建的 git group
|
||||
Git group to be created for the service */
|
||||
git_group?: string;
|
||||
/** 要创建的 git repo
|
||||
Git repository to be created for the service */
|
||||
git_repo?: string;
|
||||
/** 要创建的 scm repo
|
||||
SCM repository to be created for the service */
|
||||
scm_repo?: string;
|
||||
/** enable privileged in pod */
|
||||
privileged?: boolean;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface CreateServiceResponse {
|
||||
code?: number;
|
||||
data?: cluster.ServiceResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface CrossRegionMigrationMeta {
|
||||
/** PSM
|
||||
PSM (Product-Service-Module) identifier for migration */
|
||||
psm: string;
|
||||
/** 是否启用迁移
|
||||
If true, migration is enabled */
|
||||
migration_enabled: boolean;
|
||||
/** 跨区域 Vefaas 集群列表
|
||||
List of cross-region Vefaas clusters */
|
||||
vefaas_clusters: Array<CrossRegionVefaasCluster>;
|
||||
}
|
||||
|
||||
export interface CrossRegionVefaasCluster {
|
||||
/** 函数 ID
|
||||
Function ID for the cross-region cluster */
|
||||
function_id: string;
|
||||
/** 区域
|
||||
Region of the cluster */
|
||||
region: string;
|
||||
/** 集群名称
|
||||
Name of the cluster */
|
||||
cluster_name: string;
|
||||
}
|
||||
|
||||
export interface DeleteServiceRequest {
|
||||
/** 服务 ID
|
||||
ID of the service to delete */
|
||||
service_id: string;
|
||||
/** 如果为 true,则为软删除
|
||||
If true, perform a soft delete */
|
||||
soft?: boolean;
|
||||
/** 软删除原因
|
||||
Reason for soft deletion */
|
||||
reason?: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface DeleteServiceResponse {
|
||||
code?: number;
|
||||
data?: cluster.ServiceResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface FunctionResponseData {
|
||||
/** 函数 ID
|
||||
Function ID */
|
||||
id?: string;
|
||||
/** 服务 ID
|
||||
Service ID associated with the function */
|
||||
service_id?: string;
|
||||
/** 函数名称
|
||||
Name of the function */
|
||||
name?: string;
|
||||
/** 函数描述
|
||||
Description of the function */
|
||||
description?: string;
|
||||
/** 管理员
|
||||
Administrators of the function (comma-separated user IDs) */
|
||||
admins?: string;
|
||||
/** Owner
|
||||
Owner of the function */
|
||||
owner?: string;
|
||||
/** PSM
|
||||
PSM (Product-Service-Module) identifier */
|
||||
psm?: string;
|
||||
/** 运行时
|
||||
Runtime language of the function */
|
||||
runtime?: string;
|
||||
/** 语言
|
||||
Programming language of the function */
|
||||
language?: string;
|
||||
/** 运行命令
|
||||
Command to run the function */
|
||||
run_cmd?: string;
|
||||
/** 基础镜像
|
||||
Base image for the function */
|
||||
base_image?: string;
|
||||
/** 来源
|
||||
Origin of the function */
|
||||
origin?: string;
|
||||
/** 服务类型
|
||||
Category of the function */
|
||||
category?: string;
|
||||
/** 是否关闭报警
|
||||
If true, disables alarm for the function */
|
||||
disable_ppe_alarm?: boolean;
|
||||
/** 初始化函数耗时(秒)
|
||||
Time taken by the initializer (in seconds) */
|
||||
initializer_sec?: number;
|
||||
/** 延迟(秒)
|
||||
Latency in seconds */
|
||||
latency_sec?: number;
|
||||
/** 冷启动耗时(秒)
|
||||
Cold start time in seconds */
|
||||
cold_start_sec?: number;
|
||||
/** 是否禁用冷启动
|
||||
If true, disables cold start */
|
||||
cold_start_disabled?: boolean;
|
||||
/** 是否需要审核
|
||||
If true, approval is required */
|
||||
need_approve?: boolean;
|
||||
/** 是否启用鉴权
|
||||
If true, authentication is enabled */
|
||||
auth_enable?: boolean;
|
||||
/** 是否启用链路追踪
|
||||
If true, tracing is enabled */
|
||||
trace_enable?: boolean;
|
||||
/** 授权人
|
||||
Authorizers for the function (comma-separated user IDs) */
|
||||
authorizers?: string;
|
||||
/** 订阅人
|
||||
List of subscribers to the function */
|
||||
subscribers?: Array<string>;
|
||||
/** 环境变量
|
||||
Environment variables for the function (key-value pairs) */
|
||||
envs?: Record<string, Record<string, string>>;
|
||||
/** 格式化环境变量
|
||||
Formatted environment variables */
|
||||
format_envs?: Record<string, Array<common.FormatEnvs>>;
|
||||
/** 内存大小(MB)
|
||||
Memory size in MB */
|
||||
memory_mb?: number;
|
||||
/** 代码包大小(MB)
|
||||
Code file size in MB */
|
||||
code_file_size_mb?: number;
|
||||
/** 最大并发数
|
||||
Maximum concurrency allowed */
|
||||
max_concurrency?: number;
|
||||
/** 自适应并发模式
|
||||
Adaptive concurrency mode */
|
||||
adaptive_concurrency_mode?: string;
|
||||
/** 是否独占模式
|
||||
If true, exclusive mode is enabled */
|
||||
exclusive_mode?: boolean;
|
||||
/** 是否异步模式
|
||||
If true, async mode is enabled */
|
||||
async_mode?: boolean;
|
||||
/** 是否启用 CORS
|
||||
If true, CORS is enabled */
|
||||
cors_enable?: boolean;
|
||||
/** 是否禁用构建安装
|
||||
If true, disables build and install steps */
|
||||
disable_build_install?: boolean;
|
||||
/** 最大修订版本号
|
||||
Maximum revision number */
|
||||
max_revision_number?: number;
|
||||
/** 微服务注册是否成功
|
||||
If true, MS registration succeeded */
|
||||
ms_register_suc?: boolean;
|
||||
/** 是否启用运行时文件日志
|
||||
If true, runtime file logging is enabled */
|
||||
enable_runtime_file_log?: boolean;
|
||||
/** 是否启用运行时控制台日志
|
||||
If true, runtime console logging is enabled */
|
||||
enable_runtime_console_log?: boolean;
|
||||
/** 是否启用运行时流日志
|
||||
If true, runtime stream logging is enabled */
|
||||
enable_runtime_stream_log?: boolean;
|
||||
/** 是否启用运行时 ES 日志
|
||||
If true, runtime Elasticsearch logging is enabled */
|
||||
enable_runtime_es_log?: boolean;
|
||||
/** 是否启用运行时 JSON 日志
|
||||
If true, runtime JSON logging is enabled */
|
||||
enable_runtime_json_log?: boolean;
|
||||
/** 是否启用系统流日志
|
||||
If true, system stream logging is enabled */
|
||||
enable_system_stream_log?: boolean;
|
||||
/** 是否启用系统 ES 日志
|
||||
If true, system Elasticsearch logging is enabled */
|
||||
enable_system_es_log?: boolean;
|
||||
/** 运行时流日志速率限制(字节/秒)
|
||||
Runtime stream log bytes per second */
|
||||
runtime_stream_log_bytes_per_sec?: number;
|
||||
/** 系统流日志速率限制(字节/秒)
|
||||
System stream log bytes per second */
|
||||
system_stream_log_bytes_per_sec?: number;
|
||||
/** 日志节流速率(字节/秒)
|
||||
Throttle log bytes per second */
|
||||
throttle_log_bytes_per_sec?: number;
|
||||
/** 标准输出日志节流速率(字节/秒)
|
||||
Throttle stdout log bytes per second */
|
||||
throttle_stdout_log_bytes_per_sec?: number;
|
||||
/** 标准错误日志节流速率(字节/秒)
|
||||
Throttle stderr log bytes per second */
|
||||
throttle_stderr_log_bytes_per_sec?: number;
|
||||
/** 是否启用懒加载
|
||||
If true, lazy loading is enabled */
|
||||
lazyload?: boolean;
|
||||
/** 插件名称
|
||||
Name of the plugin associated with the function */
|
||||
plugin_name?: string;
|
||||
/** 插件 SCM ID
|
||||
Plugin SCM ID */
|
||||
plugin_scm_id?: number;
|
||||
/** 环境名称
|
||||
Environment name */
|
||||
env_name?: string;
|
||||
/** 副本限制
|
||||
Replica limits for the function (per environment/cluster) */
|
||||
replica_limit?: Record<string, Record<string, common.PodReplicaLimit>>;
|
||||
/** 资源限制
|
||||
Resource limits for the function */
|
||||
resource_limit?: common.Resource;
|
||||
/** 是否启用自动伸缩
|
||||
If true, scaling is enabled */
|
||||
scale_enabled?: boolean;
|
||||
/** 伸缩阈值
|
||||
Threshold for scaling */
|
||||
scale_threshold?: number;
|
||||
/** 伸缩类型
|
||||
Type of scaling */
|
||||
scale_type?: number;
|
||||
/** 是否启用伸缩优化
|
||||
If true, scale optimization is enabled */
|
||||
enable_scale_optimise?: boolean;
|
||||
/** 是否启用伸缩策略
|
||||
If true, scale strategy is enabled */
|
||||
enable_scale_strategy?: boolean;
|
||||
/** 源码类型
|
||||
Type of the source code */
|
||||
source_type?: string;
|
||||
/** 源码
|
||||
Source code of the function */
|
||||
source?: string;
|
||||
/** 依赖列表
|
||||
List of dependencies for the function */
|
||||
dependency?: Array<common.Dependency>;
|
||||
/** 全局 KV 命名空间 ID 列表
|
||||
List of global KV namespace IDs */
|
||||
global_kv_namespace_ids?: Array<string>;
|
||||
/** 本地缓存命名空间 ID 列表
|
||||
List of local cache namespace IDs */
|
||||
local_cache_namespace_ids?: Array<string>;
|
||||
/** 协议
|
||||
Protocol used by the function */
|
||||
protocol?: string;
|
||||
/** Argos 链接
|
||||
Argos link for the function */
|
||||
argos_link?: string;
|
||||
/** 创建时间
|
||||
Creation time of the function */
|
||||
created_at?: string;
|
||||
/** 更新时间
|
||||
Last update time of the function */
|
||||
updated_at?: string;
|
||||
/** 修订版本 ID
|
||||
Revision ID of the function */
|
||||
revision_id?: string;
|
||||
/** 网络队列
|
||||
Network queue name */
|
||||
net_queue?: string;
|
||||
/** 挂载信息
|
||||
List of mount information */
|
||||
mount_info?: Array<string>;
|
||||
/** 审核权限点 [cluster_create, cluster_update, cluster_delete, code_release]
|
||||
List of approval scopes for the function */
|
||||
approval_scope?: Array<string>;
|
||||
}
|
||||
|
||||
export interface GetAllServiceByPsmRequest {
|
||||
/** 服务的 PSM
|
||||
PSM (Product-Service-Module) identifier of the service */
|
||||
psm: string;
|
||||
/** 不包含鉴权信息
|
||||
If set, do not include authentication info */
|
||||
no_auth_info?: string;
|
||||
}
|
||||
|
||||
export interface GetAllServiceByPsmResponse {
|
||||
code?: number;
|
||||
data?: Array<cluster.ServiceResponse>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetCrossRegionMigrationRequest {
|
||||
/** PSM
|
||||
PSM (Product-Service-Module) identifier for migration query */
|
||||
psm: string;
|
||||
}
|
||||
|
||||
export interface GetCrossRegionMigrationResponse {
|
||||
code: number;
|
||||
data: CrossRegionMigrationMeta;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface GetServiceByPsmAndEnvRequest {
|
||||
/** 通过 psm 和 env 获取服务信息
|
||||
Environment name to filter the service */
|
||||
env_name: string;
|
||||
/** 服务的 PSM
|
||||
PSM (Product-Service-Module) identifier of the service */
|
||||
psm: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetServiceByPsmAndEnvResponse {
|
||||
code?: number;
|
||||
data?: cluster.ServiceResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetServiceInspectionListRequest {
|
||||
/** 服务 ID
|
||||
ID of the service to inspect */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetServiceInspectionListResponse {
|
||||
code?: number;
|
||||
data?: Array<InspectionResponseData>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetServiceRequest {
|
||||
/** 区域
|
||||
Region of the service */
|
||||
region?: string;
|
||||
/** 服务 ID
|
||||
ID of the service to retrieve */
|
||||
service_id: string;
|
||||
/** 如果为 true,获取详细信息(包括集群信息)
|
||||
If true, include detailed information with clusters */
|
||||
verbose?: boolean;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetServiceResponse {
|
||||
code?: number;
|
||||
data?: cluster.ServiceResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetServicesListRequest {
|
||||
/** 是否获取全部,默认为 false
|
||||
If set, retrieves all services (default: false) */
|
||||
all?: string;
|
||||
/** 环境名称,可选值: prod/ppe/boe_feature
|
||||
Environment name to filter services */
|
||||
env?: string;
|
||||
/** 按服务 ID 搜索
|
||||
Search by service ID */
|
||||
id?: string;
|
||||
/** 分页限制数量
|
||||
Limit for pagination */
|
||||
limit?: number;
|
||||
/** 按名称搜索
|
||||
Search by service name */
|
||||
name?: string;
|
||||
/** 不包含 worker 函数
|
||||
If true, exclude worker functions */
|
||||
no_worker?: boolean;
|
||||
/** 分页偏移量
|
||||
Offset for pagination */
|
||||
offset?: number;
|
||||
/** 按 owner 搜索
|
||||
Search by owner */
|
||||
owner?: string;
|
||||
/** 按 PSM 前缀匹配,仅在 all 不为空时生效
|
||||
Search by PSM prefix (works only if 'all' is set) */
|
||||
psm?: string;
|
||||
/** 多字段前缀搜索,缓存
|
||||
Prefix search across multiple fields */
|
||||
search?: string;
|
||||
/** 搜索类型: all/admin/own/subscribe
|
||||
Type of search */
|
||||
search_type?: string;
|
||||
/** 按服务模型字段排序
|
||||
Field to sort by in the service model */
|
||||
sort_by?: string;
|
||||
/** 支持的搜索字段: cluster_id/id/name/psm
|
||||
Supported search fields (comma-separated) */
|
||||
search_fields?: string;
|
||||
/** 过滤软删除服务
|
||||
If true, filter for soft-deleted services */
|
||||
soft_deleted?: boolean;
|
||||
}
|
||||
|
||||
export interface GetServicesListResponse {
|
||||
code?: number;
|
||||
data?: Array<cluster.ServiceResponse>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface InspectionLabel {
|
||||
/** 服务等级
|
||||
Service level label */
|
||||
service_level?: string;
|
||||
/** 服务 ID
|
||||
Service ID label */
|
||||
service_id?: string;
|
||||
/** PSM
|
||||
PSM label */
|
||||
psm?: string;
|
||||
/** Owner
|
||||
Owner label */
|
||||
owner?: string;
|
||||
/** 集群
|
||||
Cluster label */
|
||||
cluster?: string;
|
||||
/** 区域
|
||||
Region label */
|
||||
region?: string;
|
||||
}
|
||||
|
||||
export interface InspectionResponseData {
|
||||
/** 检查项名称
|
||||
Name of the inspection item */
|
||||
name?: string;
|
||||
/** 标签信息
|
||||
Labels associated with the inspection */
|
||||
labels?: InspectionLabel;
|
||||
/** 检查结果
|
||||
Result of the inspection */
|
||||
result?: string;
|
||||
/** 任务名称
|
||||
Name of the inspection task */
|
||||
task_name?: string;
|
||||
/** 规则名称
|
||||
Name of the rule applied during inspection */
|
||||
rule_name?: string;
|
||||
/** 目标 ID
|
||||
Target ID for the inspection */
|
||||
target_id?: string;
|
||||
/** 目标类型
|
||||
Type of the inspection target */
|
||||
target_type?: string;
|
||||
/** 风险等级
|
||||
Risk level identified during inspection */
|
||||
risk_level?: string;
|
||||
/** 检查值
|
||||
Value found during inspection */
|
||||
value?: string;
|
||||
/** 检查开始时间
|
||||
Start time of the inspection */
|
||||
start_time?: string;
|
||||
/** 检查结束时间
|
||||
End time of the inspection */
|
||||
end_time?: string;
|
||||
/** 创建时间
|
||||
Creation time of the inspection record */
|
||||
created_at?: string;
|
||||
/** 更新时间
|
||||
Last update time of the inspection record */
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/** this params is used to create/update service meta(ms platform), will not store in db */
|
||||
export interface MSServiceMetaParams {
|
||||
/** List of endpoints for the service */
|
||||
endpoints?: Array<string>;
|
||||
/** Framework used by the service */
|
||||
framework?: string;
|
||||
/** Programming language used by the service */
|
||||
language?: string;
|
||||
}
|
||||
|
||||
export interface RecoverDeletedClusterRequest {
|
||||
/** 服务 ID
|
||||
ID of the service whose cluster is to be recovered */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface RecoverDeletedClusterResponse {
|
||||
code?: number;
|
||||
data?: admin.BasicCluster;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface RestoreServiceRequest {
|
||||
/** 服务 ID
|
||||
ID of the service to restore */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface SearchFunctionsBySCMRequest {
|
||||
/** 分页查询,每页数量
|
||||
Limit for pagination (number of items per page) */
|
||||
limit?: number;
|
||||
/** 分页查询,偏移量,默认为 0
|
||||
Offset for pagination (default: 0) */
|
||||
offset?: number;
|
||||
/** 服务引用的 scm 名称
|
||||
SCM name referenced by the service */
|
||||
scm: string;
|
||||
}
|
||||
|
||||
export interface SearchFunctionsBySCMResponse {
|
||||
code?: number;
|
||||
data?: cluster.ServiceResponse;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateCodeByServiceIDRequest {
|
||||
/** 仅用于引用结构体类型,值为 JSON 字符串
|
||||
List of dependencies for the service */
|
||||
dependency?: Array<common.Dependency>;
|
||||
/** 部署方式
|
||||
Deployment method for the service. Enums: online-edit, scm, command-line, online-edit, image, lego */
|
||||
deploy_method?: string;
|
||||
/** 是否禁用构建安装
|
||||
If true, disables build and install steps */
|
||||
disable_build_install?: boolean;
|
||||
/** 入口函数
|
||||
Handler function for the service */
|
||||
handler?: string;
|
||||
/** 初始化函数
|
||||
Initializer function for the service */
|
||||
initializer?: string;
|
||||
/** 是否启用懒加载
|
||||
If true, enables lazy loading */
|
||||
lazyload?: boolean;
|
||||
/** 运行命令
|
||||
Command to run the service */
|
||||
run_cmd?: string;
|
||||
/** 运行时. 可选值: golang/v1,node10/v1,python3/v1,rust1/v1,java8/v1,wasm/v1,v8/v1,native/v1,native-java8/v1
|
||||
Runtime language for the service */
|
||||
runtime?: string;
|
||||
/** 运行时容器端口
|
||||
Port for the runtime container */
|
||||
runtime_container_port?: number;
|
||||
/** 运行时调试容器端口
|
||||
Debug port for the runtime container */
|
||||
runtime_debug_container_port?: number;
|
||||
/** 服务 ID
|
||||
ID of the service to update */
|
||||
service_id: string;
|
||||
/** 源码
|
||||
Source code for the service */
|
||||
source?: string;
|
||||
/** 源码类型
|
||||
Type of the source code */
|
||||
source_type?: string;
|
||||
/** 代码资源的二进制数据
|
||||
Binary data of the code resource (zip file) */
|
||||
zip_file?: UpdateCodeByServiceIDRequestZipFileMessage2;
|
||||
/** 代码包大小
|
||||
Size of the zip file (in bytes) */
|
||||
zip_file_size?: number;
|
||||
/** 是否开启镜像懒加载
|
||||
If true, enables image lazy loading */
|
||||
open_image_lazyload?: boolean;
|
||||
/** 运行时其他容器端口
|
||||
List of additional ports for the runtime container */
|
||||
runtime_other_container_ports?: Array<number>;
|
||||
/** 健康检查失败阈值
|
||||
Threshold for health check failures */
|
||||
health_check_failure_threshold?: number;
|
||||
/** 健康检查周期
|
||||
Period (in seconds) for health checks */
|
||||
health_check_period?: number;
|
||||
/** 健康检查路径
|
||||
Path used for health checks */
|
||||
health_check_path?: string;
|
||||
}
|
||||
|
||||
export interface UpdateCodeByServiceIDRequestZipFileMessage2 {}
|
||||
|
||||
export interface UpdateCodeByServiceIDResponse {
|
||||
code?: number;
|
||||
data?: common.CodeRevision;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateServiceInfoByServiceIDRequest {
|
||||
/** 管理员
|
||||
Administrators of the service (comma-separated user IDs) */
|
||||
admins?: string;
|
||||
/** 授权人
|
||||
Authorizers for the service (comma-separated user IDs) */
|
||||
authorizers?: string;
|
||||
/** 基础镜像
|
||||
Base image for the service */
|
||||
base_image?: string;
|
||||
/** 服务类型
|
||||
Category of the service */
|
||||
category?: string;
|
||||
/** 服务描述, 原来的函数描述
|
||||
Description of the service */
|
||||
description?: string;
|
||||
/** 服务名称, 原来的函数名称
|
||||
Name of the service */
|
||||
name?: string;
|
||||
/** 是否需要审核
|
||||
If true, approval is required */
|
||||
need_approve?: boolean;
|
||||
/** 服务的来源,除了 faas 也有可能是来自轻服务等
|
||||
Origin of the service */
|
||||
origin?: string;
|
||||
/** 服务的 Owner
|
||||
Owner of the service */
|
||||
owner?: string;
|
||||
/** 绑定的 lego 插件函数名称
|
||||
Name of the plugin function bound to the service */
|
||||
plugin_name?: string;
|
||||
/** 运行时语言. 可选值: golang/v1,node10/v1,python3/v1,rust1/v1,java8/v1,wasm/v1,v8/v1,native/v1,native-java8/v1
|
||||
Runtime language for the service */
|
||||
runtime?: string;
|
||||
/** 服务 ID
|
||||
ID of the service to update */
|
||||
service_id: string;
|
||||
/** 服务等级
|
||||
Service level */
|
||||
service_level?: string;
|
||||
/** 服务用途
|
||||
Purpose of the service */
|
||||
service_purpose?: string;
|
||||
/** 订阅人
|
||||
List of subscribers to the service */
|
||||
subscribers?: Array<string>;
|
||||
/** 代码包上限大小
|
||||
Maximum code file size in MB */
|
||||
code_file_size_mb?: number;
|
||||
/** PSM
|
||||
PSM (Product-Service-Module) identifier */
|
||||
psm?: string;
|
||||
/** PSM 父节点 ID
|
||||
Parent ID of the PSM */
|
||||
psm_parent_id?: Int64;
|
||||
/** 是否支持集群级别 run_cmd
|
||||
If true, enables cluster-level run command */
|
||||
enable_cluster_run_cmd?: boolean;
|
||||
/** 是否关闭报警
|
||||
If true, disables alarm for the service */
|
||||
disable_ppe_alarm?: boolean;
|
||||
/** 网络队列
|
||||
Network queue name */
|
||||
net_queue?: string;
|
||||
/** 微服务平台服务元参数
|
||||
Meta parameters for MS platform (not stored in DB) */
|
||||
ms_service_meta_params?: MSServiceMetaParams;
|
||||
/** 语言
|
||||
Programming language used in the service */
|
||||
language?: string;
|
||||
/** 挂载信息
|
||||
List of mount information for the service */
|
||||
mount_info?: Array<string>;
|
||||
/** 审核权限点 [cluster_create, cluster_update, cluster_delete, code_release]
|
||||
List of approval scopes for the service */
|
||||
approval_scope?: Array<string>;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface UpdateServiceInfoByServiceIDResponse {
|
||||
code?: number;
|
||||
data?: FunctionResponseData;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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 DataMessage55 {
|
||||
/** Region name */
|
||||
region: string;
|
||||
}
|
||||
|
||||
export interface GetDeployedRegionsRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetDeployedRegionsResponse {
|
||||
code?: number;
|
||||
data?: Array<DataMessage55>;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface SubscribeServiceRequest {
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
/** ID of function service */
|
||||
service_id: string;
|
||||
/** 订阅人列表
|
||||
array of name of subscribers. */
|
||||
subscribers?: Array<string>;
|
||||
}
|
||||
|
||||
export interface SubscribeServiceResponse {
|
||||
code?: number;
|
||||
data?: common.ApiResponseDataMessage2;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UnsubscribeServiceRequest {
|
||||
'X-Jwt-Token'?: string;
|
||||
/** ID of service to unsub */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface UnsubscribeServiceResponse {
|
||||
code?: number;
|
||||
data?: common.ApiResponseDataMessage2;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* 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 cluster from './cluster';
|
||||
import * as service from './service';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface GetTCEClusterListItem {
|
||||
/** Unique identifier for the TCE cluster */
|
||||
cluster_id: Int64;
|
||||
/** Name of the TCE cluster */
|
||||
name: string;
|
||||
/** Virtual region where the cluster is located */
|
||||
vregion: string;
|
||||
/** List of IDC (Internet Data Center) names associated with the cluster */
|
||||
idcs: Array<string>;
|
||||
/** Indicates if the cluster supports FaaS in the virtual region */
|
||||
is_faas_vregion_support: boolean;
|
||||
/** Link to the cluster details or management page */
|
||||
link: string;
|
||||
/** Total number of replicas in the cluster */
|
||||
replica_total: number;
|
||||
/** Mapping of IDC name to replica count in that IDC */
|
||||
replica: Record<string, number>;
|
||||
}
|
||||
|
||||
export interface GetTCEClusterListRequest {
|
||||
/** TCE PSM (Product Service Module) identifier for which to list clusters */
|
||||
tce_psm: string;
|
||||
}
|
||||
|
||||
export interface GetTCEClusterListResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** List of TCE cluster items returned in the response */
|
||||
data?: Array<GetTCEClusterListItem>;
|
||||
}
|
||||
|
||||
export interface GetTCEClusterMigrateMQAppParamsRequest {
|
||||
/** TCE PSM identifier for which to get cluster migration parameters */
|
||||
tce_psm: string;
|
||||
/** Cluster ID in TCE for which to get cluster migration parameters */
|
||||
tce_cluster_id: Int64;
|
||||
}
|
||||
|
||||
export interface GetTCEClusterMigrateMQAppParamsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** Migration parameters for the cluster */
|
||||
data?: cluster.CreateClusterRequest;
|
||||
}
|
||||
|
||||
export interface GetTCEMigrateMQAppParamsData {
|
||||
/** Service creation request parameters for migration */
|
||||
service: service.CreateServiceRequest;
|
||||
/** Cluster creation request parameters for migration */
|
||||
cluster: cluster.CreateClusterRequest;
|
||||
}
|
||||
|
||||
export interface GetTCEMigrateMQAppParamsRequest {
|
||||
/** TCE PSM identifier for which to get migration parameters */
|
||||
tce_psm: string;
|
||||
/** Cluster ID in TCE for which to get migration parameters */
|
||||
tce_cluster_id: Int64;
|
||||
}
|
||||
|
||||
export interface GetTCEMigrateMQAppParamsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** Migration parameters data for both service and cluster */
|
||||
data?: GetTCEMigrateMQAppParamsData;
|
||||
}
|
||||
|
||||
export interface GetTCEServiceMigrateMQAppParamsRequest {
|
||||
/** TCE PSM identifier for which to get service migration parameters */
|
||||
tce_psm: string;
|
||||
}
|
||||
|
||||
export interface GetTCEServiceMigrateMQAppParamsResponse {
|
||||
code?: number;
|
||||
error?: string;
|
||||
/** Migration parameters for the service */
|
||||
data?: service.CreateServiceRequest;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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 DownloadTemplateByNameRequest {
|
||||
/** Template name to download */
|
||||
template_name: string;
|
||||
}
|
||||
|
||||
export interface DownloadTemplateByNameResponse {}
|
||||
|
||||
/** Function template definition */
|
||||
export interface FunctionTemplate {
|
||||
/** Template description */
|
||||
description?: string;
|
||||
/** Documentation for the template */
|
||||
document?: string;
|
||||
/** Programming language of the template */
|
||||
language?: string;
|
||||
/** Template name */
|
||||
name?: string;
|
||||
/** Protocol type */
|
||||
protocol?: string;
|
||||
/** runtime. Optional values: golang/v1,node10/v1,python3/v1,rust1/v1,java8/v1,wasm/v1,v8/v1,native/v1,native-java8/v1 */
|
||||
runtime?: string;
|
||||
/** Source location of the template */
|
||||
source_location?: string;
|
||||
/** Author of the template */
|
||||
template_author?: string;
|
||||
}
|
||||
|
||||
export interface getFunctionTemplatesRequest {}
|
||||
|
||||
export interface GetFunctionTemplatesResponse {
|
||||
code?: number;
|
||||
data?: Array<FunctionTemplate>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetTemplateByNameRequest {
|
||||
/** Template name to query */
|
||||
template_name: string;
|
||||
}
|
||||
|
||||
export interface GetTemplateByNameResponse {
|
||||
code?: number;
|
||||
data?: FunctionTemplate;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UploadTemplateByNameRequest {
|
||||
/** Template name to upload */
|
||||
template_name: string;
|
||||
}
|
||||
|
||||
export interface UploadTemplateByNameResponse {
|
||||
code?: number;
|
||||
data?: string;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,392 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
/** Batch ticket containing child tickets and their status */
|
||||
export interface BatchTicket {
|
||||
/** Status of child tickets, keyed by ticket ID */
|
||||
status?: Record<string, common.EmptyObject>;
|
||||
/** List of child tickets in the batch */
|
||||
tickets?: Array<common.Ticket>;
|
||||
/** Number of child tickets in the batch */
|
||||
count?: number;
|
||||
}
|
||||
|
||||
export interface BatchUpdateTicketStepActionRequest {
|
||||
/** retry/run/cancel */
|
||||
action?: string;
|
||||
/** ticket id */
|
||||
ticket_id: string;
|
||||
/** service id */
|
||||
service_id: string;
|
||||
/** steps */
|
||||
step_ids?: Array<string>;
|
||||
}
|
||||
|
||||
export interface DynamicOvercommitSettings {
|
||||
/** Whether dynamic overcommit is disabled */
|
||||
disable_dynamic_overcommit?: boolean;
|
||||
/** Reserved overcommit ratio */
|
||||
reserved_overcommit_ratio?: number;
|
||||
/** Elastic overcommit ratio */
|
||||
elastic_overcommit_ratio?: number;
|
||||
}
|
||||
|
||||
/** Function metadata parameters for ticket operations */
|
||||
export interface FunctionMetaParams {
|
||||
/** Adaptive concurrency mode */
|
||||
adaptive_concurrency_mode?: string;
|
||||
/** List of admin users */
|
||||
admins?: string;
|
||||
/** Enable async mode */
|
||||
async_mode?: boolean;
|
||||
/** Enable authentication */
|
||||
auth_enable?: boolean;
|
||||
/** List of authorizers */
|
||||
authorizers?: string;
|
||||
/** Base image name */
|
||||
base_image?: string;
|
||||
/** Function category */
|
||||
category?: string;
|
||||
/** Maximum code file size (MB) */
|
||||
code_file_size_mb?: number;
|
||||
/** Disable cold start, true means disable */
|
||||
cold_start_disabled?: boolean;
|
||||
/** Cold start duration (seconds) */
|
||||
cold_start_sec?: number;
|
||||
/** Enable CORS */
|
||||
cors_enable?: boolean;
|
||||
/** List of dependencies */
|
||||
dependency?: Array<common.Dependency>;
|
||||
/** Deployment method. Enums: online-edit, scm, command-line, online-edit, image, lego */
|
||||
deploy_method?: string;
|
||||
/** Function description */
|
||||
description?: string;
|
||||
/** Disable build install, true means disable */
|
||||
disable_build_install?: boolean;
|
||||
/** Disable PPE alarm */
|
||||
disable_ppe_alarm?: boolean;
|
||||
/** Enable scale optimization */
|
||||
enable_scale_optimise?: boolean;
|
||||
/** Enable scale strategy */
|
||||
enable_scale_strategy?: boolean;
|
||||
/** Environment name */
|
||||
env_name?: string;
|
||||
/** Environment variables (key-value pairs) */
|
||||
envs?: Record<string, Record<string, string>>;
|
||||
/** Enable exclusive mode */
|
||||
exclusive_mode?: boolean;
|
||||
/** Formatted environment variables */
|
||||
format_envs?: Record<string, Array<common.FormatEnvs>>;
|
||||
/** Function handler name */
|
||||
handler?: string;
|
||||
/** Initializer function name */
|
||||
initializer?: string;
|
||||
/** Initializer timeout (seconds) */
|
||||
initializer_sec?: number;
|
||||
/** Programming language */
|
||||
language?: string;
|
||||
/** Latency (seconds) */
|
||||
latency_sec?: number;
|
||||
/** Enable lazy loading */
|
||||
lazyload?: boolean;
|
||||
/** Maximum concurrency */
|
||||
max_concurrency?: number;
|
||||
/** Memory size (MB) */
|
||||
memory_mb?: number;
|
||||
/** Function name */
|
||||
name?: string;
|
||||
/** Require approval */
|
||||
need_approve?: boolean;
|
||||
/** Function origin */
|
||||
origin?: string;
|
||||
/** Function owner */
|
||||
owner?: string;
|
||||
/** Plugin name */
|
||||
plugin_name?: string;
|
||||
/** Protocol type */
|
||||
protocol?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Parent PSM ID */
|
||||
psm_parent_id?: number;
|
||||
/** Resource limits */
|
||||
resource_limit?: common.ResourceLimit;
|
||||
/** Run command */
|
||||
run_cmd?: string;
|
||||
/** Runtime type */
|
||||
runtime?: string;
|
||||
/** Enable scaling */
|
||||
scale_enabled?: boolean;
|
||||
/** Scale threshold */
|
||||
scale_threshold?: number;
|
||||
/** Scale type */
|
||||
scale_type?: number;
|
||||
/** Service level */
|
||||
service_level?: string;
|
||||
/** Service purpose */
|
||||
service_purpose?: string;
|
||||
/** Source of the function */
|
||||
source?: string;
|
||||
/** Source type */
|
||||
source_type?: string;
|
||||
/** Template name */
|
||||
template_name?: string;
|
||||
/** Throttle log bytes per second */
|
||||
throttle_log_bytes_per_sec?: number;
|
||||
/** Enable log throttling */
|
||||
throttle_log_enabled?: boolean;
|
||||
/** Throttle stderr log bytes per second */
|
||||
throttle_stderr_log_bytes_per_sec?: number;
|
||||
/** Throttle stdout log bytes per second */
|
||||
throttle_stdout_log_bytes_per_sec?: number;
|
||||
/** Enable tracing */
|
||||
trace_enable?: boolean;
|
||||
/** Zone-specific throttle log bytes per second */
|
||||
zone_throttle_log_bytes_per_sec?: Record<string, number>;
|
||||
/** Enable runtime file log */
|
||||
enable_runtime_file_log?: boolean;
|
||||
/** Enable runtime console log */
|
||||
enable_runtime_console_log?: boolean;
|
||||
/** Whether runtime stream log is enabled */
|
||||
enable_runtime_stream_log?: boolean;
|
||||
/** Whether runtime ES log is enabled */
|
||||
enable_runtime_es_log?: boolean;
|
||||
/** Whether runtime JSON log is enabled */
|
||||
enable_runtime_json_log?: boolean;
|
||||
/** Whether system stream log is enabled */
|
||||
enable_system_stream_log?: boolean;
|
||||
/** Whether system ES log is enabled */
|
||||
enable_system_es_log?: boolean;
|
||||
/** Runtime stream log bytes per second */
|
||||
runtime_stream_log_bytes_per_sec?: number;
|
||||
/** System stream log bytes per second */
|
||||
system_stream_log_bytes_per_sec?: number;
|
||||
}
|
||||
|
||||
export interface GetBatchTicketDetailByIDRequest {
|
||||
/** Parent ticket ID (batch ticket ID) */
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface GetBatchTicketDetailByIDResponse {
|
||||
/** API response code */
|
||||
code?: number;
|
||||
/** Batch ticket data */
|
||||
data?: BatchTicket;
|
||||
/** Error message if operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetTicketDetailByTicketIDRequest {
|
||||
/** Ticket ID to query */
|
||||
ticket_id: string;
|
||||
}
|
||||
|
||||
export interface GetTicketDetailByTicketIDResponse {
|
||||
/** API response code */
|
||||
code?: number;
|
||||
/** Ticket details data */
|
||||
data?: common.Ticket;
|
||||
/** Error message if operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface RegionalMetaParams {
|
||||
/** Traffic aliases */
|
||||
aliases?: Record<string, common.Alias>;
|
||||
/** Whether async mode is enabled */
|
||||
async_mode?: boolean;
|
||||
/** Whether authentication is enabled */
|
||||
auth_enable?: boolean;
|
||||
/** Whether ByteFaaS error response is disabled */
|
||||
bytefaas_error_response_disabled?: boolean;
|
||||
/** Whether ByteFaaS response header is disabled */
|
||||
bytefaas_response_header_disabled?: boolean;
|
||||
/** Cell name */
|
||||
cell?: string;
|
||||
/** Whether cold start is disabled, true means disable */
|
||||
cold_start_disabled?: boolean;
|
||||
/** Whether CORS is enabled */
|
||||
cors_enable?: boolean;
|
||||
/** Whether dynamic load balancing data report is enabled */
|
||||
dynamic_load_balancing_data_report_enabled?: boolean;
|
||||
/** List of VDCs with dynamic load balancing enabled */
|
||||
dynamic_load_balancing_enabled_vdcs?: Array<string>;
|
||||
/** Whether dynamic load balancing weight is enabled */
|
||||
dynamic_load_balancing_weight_enabled?: boolean;
|
||||
/** Whether colocate scheduling is enabled */
|
||||
enable_colocate_scheduling?: boolean;
|
||||
/** Environment name */
|
||||
env_name?: string;
|
||||
/** Whether exclusive mode is enabled */
|
||||
exclusive_mode?: boolean;
|
||||
/** List of formatted environment variables */
|
||||
format_envs?: Array<common.FormatEnvs>;
|
||||
/** Function ID */
|
||||
function_id?: string;
|
||||
/** Whether gateway route is enabled */
|
||||
gateway_route_enable?: boolean;
|
||||
/** Whether GDPR is enabled */
|
||||
gdpr_enable?: boolean;
|
||||
/** List of global KV namespace IDs */
|
||||
global_kv_namespace_ids?: Array<string>;
|
||||
/** Whether HTTP trigger is disabled,true means disable */
|
||||
http_trigger_disable?: boolean;
|
||||
/** Whether IPv6 only is enabled */
|
||||
is_ipv6_only?: boolean;
|
||||
/** Disabled zones in a region (zone name to disabled flag) */
|
||||
is_this_zone_disabled?: Record<string, boolean>;
|
||||
/** Latency in seconds */
|
||||
latency_sec?: number;
|
||||
/** List of local cache namespace IDs */
|
||||
local_cache_namespace_ids?: Array<string>;
|
||||
/** Network class ID */
|
||||
net_class_id?: number;
|
||||
/** Network name */
|
||||
network?: string;
|
||||
/** Owner of the function */
|
||||
owner?: string;
|
||||
/** Protocol type */
|
||||
protocol?: string;
|
||||
/** PSM name */
|
||||
psm?: string;
|
||||
/** Region name */
|
||||
region?: string;
|
||||
/** Whether reserved DP is enabled */
|
||||
reserved_dp_enabled?: boolean;
|
||||
/** Revision ID */
|
||||
revision_id?: string;
|
||||
/** Revision number */
|
||||
revision_number?: number;
|
||||
/** Routing strategy, enums:prefer_reserved, prefer_elastic. */
|
||||
routing_strategy?: string;
|
||||
/** Runtime type */
|
||||
runtime?: string;
|
||||
/** Service ID */
|
||||
service_id?: string;
|
||||
/** Whether tracing is enabled */
|
||||
trace_enable?: boolean;
|
||||
/** Zone-specific throttle log bytes per second */
|
||||
zone_throttle_log_bytes_per_sec?: Record<string, number>;
|
||||
/** Whether ZTI is enabled */
|
||||
zti_enable?: boolean;
|
||||
/** Replica limits per zone (restricted access, only open to administrators) */
|
||||
replica_limit?: Record<string, common.EmptyObject>;
|
||||
/** Function scaling configuration settings */
|
||||
scale_settings?: common.FunctionScaleSettings;
|
||||
/** Whether online mode is enabled */
|
||||
online_mode?: boolean;
|
||||
/** Dynamic overcommit settings per zone */
|
||||
dynamic_overcommit_settings?: Record<string, DynamicOvercommitSettings>;
|
||||
/** Formatted elastic preferred cluster configurations */
|
||||
formatted_elastic_prefer_cluster?: Array<common.FormattedPreferCluster>;
|
||||
/** Formatted reserved preferred cluster configurations */
|
||||
formatted_reserved_prefer_cluster?: Array<common.FormattedPreferCluster>;
|
||||
/** Whether to enable reserved frozen instances */
|
||||
enable_reserve_frozen_instance?: boolean;
|
||||
/** Number of reserved frozen replicas */
|
||||
reserved_frozen_replicas?: number;
|
||||
/** Reserved frozen replicas per zone */
|
||||
zone_reserved_frozen_replicas?: Record<string, number>;
|
||||
/** Whether to allow cold start instances */
|
||||
allow_cold_start_instance?: boolean;
|
||||
/** Whether to disable cgroup v2 */
|
||||
disable_cgroup_v2?: boolean;
|
||||
/** Whether overload protection is enabled */
|
||||
overload_protect_enabled?: boolean;
|
||||
/** CPU allocation for frozen instances (in millicores) */
|
||||
frozen_cpu_milli?: number;
|
||||
/** Whether to enable federated on-demand resources per zone */
|
||||
enable_fed_on_demand_resource?: Record<string, boolean>;
|
||||
/** Priority class for frozen instances */
|
||||
frozen_priority_class?: string;
|
||||
/** Canary replica limits per zone */
|
||||
zone_canary_replica_limit?: Record<string, number>;
|
||||
/** Whether frozen scaling is enabled */
|
||||
frozen_scale_enabled?: boolean;
|
||||
/** enable privileged in pod */
|
||||
privileged?: boolean;
|
||||
}
|
||||
|
||||
export interface TicketRuntimeUpdateRequest {
|
||||
/** User who approved the ticket */
|
||||
approved_by?: string;
|
||||
/** Type of user who approved the ticket. Enums: "person_account","service_account" */
|
||||
approved_by_usertype?: string;
|
||||
/** Function ID to update */
|
||||
function_id?: string;
|
||||
/** Function metadata parameters */
|
||||
function_meta?: FunctionMetaParams;
|
||||
/** Regional metadata parameters by region */
|
||||
regional_metas?: Record<string, RegionalMetaParams>;
|
||||
/** Service ID associated with the function */
|
||||
service_id?: string;
|
||||
}
|
||||
|
||||
export interface TicketRuntimeUpdateResponse {
|
||||
/** API response code */
|
||||
code?: number;
|
||||
/** Updated ticket data */
|
||||
data?: common.Ticket;
|
||||
/** Error message if operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTicketActionRequest {
|
||||
/** Action to perform on the ticket */
|
||||
action?: string;
|
||||
/** Ticket ID to update */
|
||||
ticket_id: string;
|
||||
/** Service ID associated with the ticket */
|
||||
service_id?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTicketActionResponse {
|
||||
/** API response code */
|
||||
code?: number;
|
||||
/** Updated ticket data */
|
||||
data?: common.Ticket;
|
||||
/** Error message if operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTicketStepActionRequest {
|
||||
/** retry/run/cancel */
|
||||
action?: string;
|
||||
/** ticket id */
|
||||
ticket_id: string;
|
||||
/** step id */
|
||||
step_id: string;
|
||||
}
|
||||
|
||||
export interface UpdateTicketStepActionResponse {
|
||||
/** response code */
|
||||
code?: number;
|
||||
/** reponse data */
|
||||
data?: common.EmptyObject;
|
||||
/** error msg */
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface ListPipelineTemplatesRequest {
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface ListPipelineTemplatesResponse {
|
||||
code?: number;
|
||||
data?: Array<common.PipelineTemplateLegacy>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface QueryPipelineTemplateByTypeRequest {
|
||||
/** Template type */
|
||||
template_type: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface QueryPipelineTemplateByTypeResponse {
|
||||
code?: number;
|
||||
data?: common.PipelineTemplateLegacy;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CreateTimerTriggerResponse {
|
||||
/** API response code */
|
||||
code?: number;
|
||||
/** Created timer trigger object */
|
||||
data?: common.TimerTrigger;
|
||||
/** Error message if operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface DeleteTimerTriggerRequest {
|
||||
/** Name of the cluster where the service is deployed */
|
||||
cluster: string;
|
||||
/** Region where the service is located */
|
||||
region: string;
|
||||
/** Unique identifier of the service */
|
||||
service_id: string;
|
||||
/** Unique identifier of the timer trigger to delete */
|
||||
timer_id: string;
|
||||
/** JWT token for authentication (optional) */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface DeleteTimerTriggerResponse {
|
||||
/** API response code */
|
||||
code?: number;
|
||||
/** Empty object response data */
|
||||
data?: common.EmptyObject;
|
||||
/** Error message if operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetTimerTriggerRequest {
|
||||
/** Name of the cluster where the service is deployed */
|
||||
cluster: string;
|
||||
/** Region where the service is located */
|
||||
region: string;
|
||||
/** Unique identifier of the service */
|
||||
service_id: string;
|
||||
/** Unique identifier of the timer trigger to retrieve */
|
||||
timer_id: string;
|
||||
/** JWT token for authentication (optional) */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetTimerTriggerResponse {
|
||||
/** API response code */
|
||||
code?: number;
|
||||
/** Retrieved timer trigger object */
|
||||
data?: common.TimerTrigger;
|
||||
/** Error message if operation failed */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTimerTriggerRequest {
|
||||
/** Cell name (optional, for multi-cell clusters) */
|
||||
cell?: string;
|
||||
/** Name of the cluster where the service is deployed */
|
||||
cluster: string;
|
||||
/** Maximum number of concurrent executions allowed */
|
||||
concurrency_limit?: number;
|
||||
/** Creation timestamp of the timer trigger (ISO8601 format) */
|
||||
created_at?: string;
|
||||
/** Cron expression defining the schedule */
|
||||
cron?: string;
|
||||
/** Description of the timer trigger */
|
||||
description?: string;
|
||||
/** Whether the timer trigger is enabled */
|
||||
enabled?: boolean;
|
||||
/** Name of the timer trigger */
|
||||
name?: string;
|
||||
/** Payload to be sent when the timer triggers */
|
||||
payload?: string;
|
||||
/** Region where the service is located */
|
||||
region: string;
|
||||
/** Number of retry attempts on failure */
|
||||
retries?: number;
|
||||
/** Scheduled execution time (ISO8601 format) */
|
||||
scheduled_at?: string;
|
||||
/** Unique identifier of the service */
|
||||
service_id: string;
|
||||
/** Unique identifier of the timer trigger to update */
|
||||
timer_id: string;
|
||||
/** JWT token for authentication (optional) */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTimerTriggerResponse {
|
||||
/** API response code */
|
||||
code?: number;
|
||||
/** Updated timer trigger object */
|
||||
data?: common.TimerTrigger;
|
||||
/** Error message if operation failed */
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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 BucketMeta {
|
||||
/** Bucket ID */
|
||||
id?: string;
|
||||
/** Bucket name */
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface GetTosBucketsRequest {
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetTosBucketsResponse {
|
||||
/** Response code */
|
||||
code?: number;
|
||||
/** List of bucket metadata */
|
||||
data?: Array<BucketMeta>;
|
||||
/** Error message, if any */
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
* 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 common from './common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export interface CopyTriggerSource {
|
||||
/** Type of trigger,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** ID of the trigger */
|
||||
trigger_id: string;
|
||||
/** Whether to enable the trigger after copying; default is false */
|
||||
enable?: boolean;
|
||||
}
|
||||
|
||||
export interface CopyTriggersRequest {
|
||||
/** Target service ID */
|
||||
target_service_id: string;
|
||||
/** Target region */
|
||||
target_region: string;
|
||||
/** Target cluster */
|
||||
target_cluster: string;
|
||||
/** Source service ID */
|
||||
source_service_id: string;
|
||||
/** Source region */
|
||||
source_region: string;
|
||||
/** Source cluster */
|
||||
source_cluster: string;
|
||||
/** List of source triggers to copy */
|
||||
source_triggers: Array<CopyTriggerSource>;
|
||||
}
|
||||
|
||||
export interface DataMessage194 {
|
||||
/** Whether abase binlog trigger is enabled */
|
||||
abase_binlog?: boolean;
|
||||
/** Whether consul trigger is enabled */
|
||||
consul?: boolean;
|
||||
/** Whether HTTP trigger is enabled */
|
||||
http?: boolean;
|
||||
/** Whether MQ events trigger is enabled */
|
||||
mqevents?: boolean;
|
||||
/** Whether timer trigger is enabled */
|
||||
timer?: boolean;
|
||||
/** Whether TOS trigger is enabled */
|
||||
tos?: boolean;
|
||||
}
|
||||
|
||||
export interface GetAllTriggersRequest {
|
||||
/** Name of the cluster */
|
||||
cluster: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Whether to split mqevents into eventbus; defaults to false */
|
||||
split_eventbus?: string;
|
||||
/** Include prod service's mqtrigger when set to true; only works for env services, e.g., boe-xx/ppe-xx */
|
||||
with_env_trigger?: string;
|
||||
/** If true, will not return event_bridge type trigger */
|
||||
not_show_eb_trigger?: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetAllTriggersResponse {
|
||||
code?: number;
|
||||
data?: common.AllTriggers;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetMqClustersRequest {
|
||||
/** Type of MQ, enums: kafka, rocketmq, tos, eventbus, abase_binlog, vefaas_async_tos, vefaas_bmq */
|
||||
mq_type: string;
|
||||
/** Region of the MQ */
|
||||
region: string;
|
||||
/** JWT token for authentication */
|
||||
'X-Jwt-Token'?: string;
|
||||
}
|
||||
|
||||
export interface GetMqClustersResponse {
|
||||
code?: number;
|
||||
data?: Record<string, Record<string, Array<string>>>;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface GetTriggersEnabledRequest {
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
}
|
||||
|
||||
export interface GetTriggersEnabledResponse {
|
||||
code?: number;
|
||||
data?: DataMessage194;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface MqPermissionRequest {
|
||||
/** Cluster name (in request body) */
|
||||
cluster?: string;
|
||||
/** Name of the cluster (in path) */
|
||||
cluster_name: string;
|
||||
/** MQ region (in request body) */
|
||||
mq_region?: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Topic name (in request body) */
|
||||
topic?: string;
|
||||
/** Type of MQ (kafka/rocketmq/eventbus) */
|
||||
type?: string;
|
||||
/** Authorization type (psm/user), default is psm */
|
||||
auth_type?: string;
|
||||
}
|
||||
|
||||
export interface MqPermissionResponse {
|
||||
code?: number;
|
||||
data?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface ResetMQOffsetRequest {
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** Whether to perform a dry run */
|
||||
dryRun?: boolean;
|
||||
/** Whether to force stop */
|
||||
force_stop?: boolean;
|
||||
/** Offset to reset to (applies to all partitions if set) */
|
||||
offset?: number;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Type of reset. Enums: offset, timestamp */
|
||||
resetType?: string;
|
||||
/** Details per partition for reset */
|
||||
reset_details_per_partition_array?: Array<ResetMQOffsetRequestResetDetailsPerPartitionArrayMessage>;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Timestamp for the reset (applies to all partitions if set) */
|
||||
timestamp?: number;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Reset method */
|
||||
whence?: string;
|
||||
}
|
||||
|
||||
export interface ResetMQOffsetRequestResetDetailsPerPartitionArrayMessage {
|
||||
/** Offset to reset to */
|
||||
offset?: number;
|
||||
/** Partition number */
|
||||
partition?: number;
|
||||
/** Timestamp for the reset */
|
||||
timestamp?: number;
|
||||
/** Reset method */
|
||||
whence?: string;
|
||||
}
|
||||
|
||||
export interface ResetMQOffsetResponse {
|
||||
code?: number;
|
||||
data?: ResetMQOffsetResponseData;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface ResetMQOffsetResponseData {
|
||||
/** Ticket ID for the reset operation */
|
||||
ticket_id?: string;
|
||||
}
|
||||
|
||||
export interface RollbackRequest {
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** List of target rollback tickets */
|
||||
targets?: Array<RollbackRequestTargetsMessage>;
|
||||
/** Trigger ID */
|
||||
trigger_id: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
}
|
||||
|
||||
export interface RollbackRequestTargetsMessage {
|
||||
/** The ID of the target rollback ticket */
|
||||
ticket_id?: string;
|
||||
}
|
||||
|
||||
export interface RollbackResponse {
|
||||
code?: number;
|
||||
data?: string;
|
||||
error?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,418 @@
|
||||
/*
|
||||
* 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 CreateTriggerDebugTplRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Template type: custom/official */
|
||||
tpl_type?: string;
|
||||
/** List of CloudEvent messages */
|
||||
cloud_event?: Array<TriggerDebugCloudEvent>;
|
||||
/** Template name */
|
||||
name: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Message type: cloudevent/native */
|
||||
msg_type: string;
|
||||
/** List of native events */
|
||||
native_event?: Array<TriggerDebugNativeEvent>;
|
||||
}
|
||||
|
||||
export interface CreateTriggerDebugTplResponse {
|
||||
code: number;
|
||||
data: TriggerDebugTplItem;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface DeleteTriggerDebugTplRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Template ID */
|
||||
tpl_id: string;
|
||||
}
|
||||
|
||||
export interface DeleteTriggerDebugTplResponse {
|
||||
code: number;
|
||||
data: boolean;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface EventBusTopicPreviewParams {
|
||||
/** EventBus event name */
|
||||
event: string;
|
||||
/** Search type: 0-时间范围 1-offset 2-key */
|
||||
search_type: number;
|
||||
/** Start time for the search */
|
||||
start_time?: Int64;
|
||||
/** End time for the search */
|
||||
end_time?: Int64;
|
||||
/** Start offset */
|
||||
start_offset?: Int64;
|
||||
/** End offset */
|
||||
end_offset?: Int64;
|
||||
/** Partition */
|
||||
partition?: string;
|
||||
/** Message key */
|
||||
msg_key?: string;
|
||||
/** List of storage descriptors */
|
||||
storage_descriptor?: Array<string>;
|
||||
}
|
||||
|
||||
export interface GetTriggerDebugTplRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Template type: custom/official */
|
||||
tpl_type?: string;
|
||||
/** Trigger type: timer/http/rocketmq/kafka/eventbus */
|
||||
trigger_type?: string;
|
||||
}
|
||||
|
||||
export interface GetTriggerDebugTplResponse {
|
||||
code: number;
|
||||
data: Array<TriggerDebugTplItem>;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface KafkaTopicPreviewParams {
|
||||
/** Cluster name */
|
||||
cluster_name: string;
|
||||
/** Topic name */
|
||||
topic_name: string;
|
||||
/** Data type: str/pb */
|
||||
schema_type: string;
|
||||
/** Consumer type: whence/offset */
|
||||
consumer_type: string;
|
||||
/** Whence: latest/earliest/random */
|
||||
whence?: string;
|
||||
/** Relative offset */
|
||||
relative_offset?: Int64;
|
||||
/** Partition; if not specified, all partitions are included */
|
||||
partition?: string;
|
||||
}
|
||||
|
||||
export interface MQQueueBaseInfo {
|
||||
/** Broker name */
|
||||
broker_name: string;
|
||||
/** Queue ID */
|
||||
queue_id: number;
|
||||
/** Topic name */
|
||||
topic: string;
|
||||
}
|
||||
|
||||
export interface MQQueueInfoData {
|
||||
/** List of queue information */
|
||||
queue: Array<MQQueueItem>;
|
||||
/** List of data centers */
|
||||
dc: Array<string>;
|
||||
}
|
||||
|
||||
export interface MQQueueInfoRequest {
|
||||
/** MQ region */
|
||||
mq_region: string;
|
||||
/** Region */
|
||||
region: string;
|
||||
/** MQ cluster name */
|
||||
cluster_name: string;
|
||||
/** Topic name */
|
||||
topic_name: string;
|
||||
}
|
||||
|
||||
export interface MQQueueInfoResponse {
|
||||
code: number;
|
||||
data: MQQueueInfoData;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface MQQueueItem {
|
||||
/** Earliest message store time */
|
||||
earliest_msg_store_time: Int64;
|
||||
/** Maximum offset */
|
||||
max_offset: Int64;
|
||||
/** Minimum offset */
|
||||
min_offset: Int64;
|
||||
/** Message queue information */
|
||||
message_queue: MQQueueBaseInfo;
|
||||
}
|
||||
|
||||
export interface MQTopicPreviewData {
|
||||
/** MQ message as JSON string */
|
||||
mq_msg?: string;
|
||||
/** 转换之后的cloudevent,如果数组里有多个元素则为批量消息 */
|
||||
cloud_event?: Array<TriggerDebugCloudEvent>;
|
||||
native_event?: Array<TriggerDebugNativeEvent>;
|
||||
}
|
||||
|
||||
export interface MQTopicPreviewRequest {
|
||||
/** MQ type, enums: kafka, rocketmq, tos, eventbus, abase_binlog, vefaas_async_tos, vefaas_bmq */
|
||||
mq_type: string;
|
||||
/** MQ region */
|
||||
mq_region: string;
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Region */
|
||||
region: string;
|
||||
/** Cluster */
|
||||
cluster: string;
|
||||
/** Whether this is a batch message */
|
||||
is_batch_msg: boolean;
|
||||
/** Kafka topic preview parameters */
|
||||
kafka_topic_preview_params?: KafkaTopicPreviewParams;
|
||||
/** RocketMQ topic preview parameters */
|
||||
rocket_mq_topic_preview_params?: RocketmqTopicPreviewParams;
|
||||
/** EventBus topic preview parameters */
|
||||
eventbus_topic_preview_params?: EventBusTopicPreviewParams;
|
||||
/** Whether this is a native message */
|
||||
is_native_msg?: boolean;
|
||||
}
|
||||
|
||||
export interface MQTopicPreviewResponse {
|
||||
code: number;
|
||||
data: MQTopicPreviewData;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface PatchTriggerDebugTplRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Template ID */
|
||||
tpl_id: string;
|
||||
/** Template name */
|
||||
name?: string;
|
||||
/** List of CloudEvent messages */
|
||||
cloud_event?: Array<TriggerDebugCloudEvent>;
|
||||
/** Message type */
|
||||
msg_type?: string;
|
||||
/** List of native events */
|
||||
native_event?: Array<TriggerDebugNativeEvent>;
|
||||
}
|
||||
|
||||
export interface PatchTriggerDebugTplResponse {
|
||||
code: number;
|
||||
data: TriggerDebugTplItem;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface RocketmqTopicPreviewParams {
|
||||
/** Cluster name */
|
||||
cluster_name: string;
|
||||
/** Topic name */
|
||||
topic_name: string;
|
||||
/** Pull type: 0-从最久的offset 1-从最新的offset 3-指定offset 4-指定时间戳 5-指定messageid */
|
||||
type: number;
|
||||
/** For pull types 3/4, specify direction: true for forward, false for backward */
|
||||
forward?: boolean;
|
||||
/** Number of messages to pull from a single queue */
|
||||
msg_num: Int64;
|
||||
/** For pull type 5, specify the message ID */
|
||||
message_id?: string;
|
||||
/** IDC */
|
||||
idc?: string;
|
||||
/** Broker name */
|
||||
broker_name?: string;
|
||||
/** Queue ID */
|
||||
queue_id?: string;
|
||||
/** Body encoding */
|
||||
body_encode?: string;
|
||||
/** Timestamp */
|
||||
time_stamp?: Int64;
|
||||
/** Offset */
|
||||
offset?: Int64;
|
||||
}
|
||||
|
||||
export interface TriggerDebugCloudEvent {
|
||||
/** JSON string of CloudEvent extensions */
|
||||
extensions: string;
|
||||
/** CloudEvent data payload */
|
||||
data: string;
|
||||
}
|
||||
|
||||
export interface TriggerDebugNativeBMQMessage {
|
||||
/** Message key */
|
||||
key: string;
|
||||
/** Message value */
|
||||
value: string;
|
||||
/** Topic name */
|
||||
topic: string;
|
||||
/** Message offset */
|
||||
offset: Int64;
|
||||
/** Message timestamp */
|
||||
timestamp: Int64;
|
||||
}
|
||||
|
||||
export interface TriggerDebugNativeEvent {
|
||||
/** MQ event ID */
|
||||
mq_event_id: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Consumer group name */
|
||||
consumer_group: string;
|
||||
/** Maximum retry number */
|
||||
max_retry_num: number;
|
||||
/** Number of retries for bad status requests */
|
||||
retries_for_bad_status_requests: number;
|
||||
/** Number of retries for error requests */
|
||||
retries_for_error_requests: number;
|
||||
/** Native RMQ message */
|
||||
rmq_native_message: TriggerDebugNativeRMQMessage;
|
||||
/** Native BMQ message */
|
||||
bmq_native_message: TriggerDebugNativeBMQMessage;
|
||||
/** Message body */
|
||||
msg_body: string;
|
||||
}
|
||||
|
||||
export interface TriggerDebugNativeRMQMessage {
|
||||
/** Native RMQ message */
|
||||
msg: TriggerDebugNativeRMQMessageMsg;
|
||||
/** Message queue information */
|
||||
messageQueue: TriggerDebugNativeRMQMessageQueue;
|
||||
/** Size of the stored message */
|
||||
storeSize: number;
|
||||
/** Offset in the queue */
|
||||
queueOffset: Int64;
|
||||
/** Offset in the commit log */
|
||||
commitLogOffset: Int64;
|
||||
/** System flag */
|
||||
sysFlag: number;
|
||||
/** Timestamp when the message was born */
|
||||
bornTimestamp: Int64;
|
||||
/** Host where the message was born */
|
||||
bornHost: string;
|
||||
/** Timestamp when the message was stored */
|
||||
storeTimestamp: Int64;
|
||||
/** Host where the message was stored */
|
||||
storeHost: string;
|
||||
/** Message ID */
|
||||
msgId: string;
|
||||
/** Body CRC */
|
||||
bodyCRC: number;
|
||||
/** Offset message ID */
|
||||
offsetMsgId: string;
|
||||
}
|
||||
|
||||
export interface TriggerDebugNativeRMQMessageMsg {
|
||||
/** Topic name */
|
||||
topic: string;
|
||||
/** Message flag */
|
||||
flag: string;
|
||||
/** Message properties as key-value pairs */
|
||||
properties: Record<string, string>;
|
||||
/** Message tags */
|
||||
tags: string;
|
||||
/** Message keys */
|
||||
keys: string;
|
||||
}
|
||||
|
||||
export interface TriggerDebugNativeRMQMessageQueue {
|
||||
/** Topic name */
|
||||
topic: string;
|
||||
/** Broker name */
|
||||
brokerName: string;
|
||||
/** Queue ID */
|
||||
queueId: number;
|
||||
}
|
||||
|
||||
export interface TriggerDebugRequest {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Region of the service */
|
||||
region: string;
|
||||
/** Cluster of the service */
|
||||
cluster: string;
|
||||
/** Zone of the service */
|
||||
zone?: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** List of CloudEvent messages */
|
||||
cloud_event?: Array<TriggerDebugCloudEvent>;
|
||||
/** Whether this is a batch message; if cloud_event has more than one element, this is true */
|
||||
is_batch_msg: boolean;
|
||||
/** Whether this is a native message */
|
||||
is_native_msg?: boolean;
|
||||
/** List of native events */
|
||||
native_event?: Array<TriggerDebugNativeEvent>;
|
||||
}
|
||||
|
||||
export interface TriggerDebugResponse {
|
||||
code: number;
|
||||
data: TriggerDebugResponseData;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface TriggerDebugResponseData {
|
||||
/** Log ID for the debug session */
|
||||
log_id: string;
|
||||
/** Status of the debug (success/failed) */
|
||||
status: string;
|
||||
/** HTTP headers returned */
|
||||
http_headers?: Record<string, string>;
|
||||
/** HTTP status code */
|
||||
http_code?: number;
|
||||
/** HTTP response body */
|
||||
http_body?: string;
|
||||
/** CPU usage during execution */
|
||||
cpu_usage?: string;
|
||||
/** Memory usage during execution */
|
||||
mem_usage?: string;
|
||||
/** Duration of execution */
|
||||
execution_duration?: string;
|
||||
/** Name of the pod used for execution */
|
||||
pod_name?: string;
|
||||
/** Logs from the debug session */
|
||||
logs: Array<string>;
|
||||
/** List of CloudEvent messages used in debug */
|
||||
cloud_event: Array<TriggerDebugCloudEvent>;
|
||||
/** Failure message if any */
|
||||
failed_message: string;
|
||||
/** Argos log link for the debug session */
|
||||
argos_log_link: string;
|
||||
/** Pod zone */
|
||||
pod_zone?: string;
|
||||
/** List of native events used in debug */
|
||||
native_event?: Array<TriggerDebugNativeEvent>;
|
||||
}
|
||||
|
||||
export interface TriggerDebugTplItem {
|
||||
/** Service ID */
|
||||
service_id: string;
|
||||
/** Template name */
|
||||
name: string;
|
||||
/** Template type */
|
||||
tpl_type: string;
|
||||
/** Creator of the template */
|
||||
creator: string;
|
||||
/** List of CloudEvent messages; if multiple, represents batch messages */
|
||||
cloud_event: Array<TriggerDebugCloudEvent>;
|
||||
/** Creation timestamp */
|
||||
created_at: string;
|
||||
/** Update timestamp */
|
||||
updated_at: string;
|
||||
/** Trigger type,enums: mqevents, tos, abase_binlog, timer, consul, http, event_bridge */
|
||||
trigger_type: string;
|
||||
/** Message type */
|
||||
msg_type: string;
|
||||
/** Template ID */
|
||||
id: string;
|
||||
/** List of native events; if present, represents native messages */
|
||||
native_event?: Array<TriggerDebugNativeEvent>;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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 TriggerFrozenActiveRequest {
|
||||
/** PSM name */
|
||||
psm: string;
|
||||
/** Environment name */
|
||||
env: string;
|
||||
/** Region where the service is located */
|
||||
region: string;
|
||||
/** Cluster name */
|
||||
cluster: string;
|
||||
/** Zone name */
|
||||
zone: string;
|
||||
}
|
||||
|
||||
export interface TriggerFrozenActiveResponse {
|
||||
/** API response code */
|
||||
code: number;
|
||||
/** Response data containing log information */
|
||||
data: TriggerFrozenActiveResponseData;
|
||||
/** Error message if operation failed */
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface TriggerFrozenActiveResponseData {
|
||||
/** Unique identifier for the log entry */
|
||||
log_id: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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 GetVolcSigninTokenRequest {
|
||||
/** Service ID for which to obtain the sign-in token */
|
||||
service_id?: string;
|
||||
/** Region of the service */
|
||||
region?: string;
|
||||
/** Cluster of the service */
|
||||
cluster?: string;
|
||||
}
|
||||
|
||||
export interface GetVolcSigninTokenResponse {
|
||||
code: number;
|
||||
data: GetVolcSigninTokenResponseData;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface GetVolcSigninTokenResponseData {
|
||||
/** Sign-in token for Volcengine authentication */
|
||||
signin_token: string;
|
||||
}
|
||||
|
||||
export interface GetVolcTlsConfigRequest {
|
||||
/** Service ID for which to obtain TLS config */
|
||||
service_id?: string;
|
||||
/** Region of the service */
|
||||
region?: string;
|
||||
/** Cluster of the service */
|
||||
cluster?: string;
|
||||
}
|
||||
|
||||
export interface GetVolcTlsConfigResponse {
|
||||
code: number;
|
||||
data: GetVolcTlsConfigResponseData;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface GetVolcTlsConfigResponseData {
|
||||
/** Whether logging is enabled for Volcengine TLS */
|
||||
enable_log: boolean;
|
||||
/** Project ID for Volcengine TLS (optional) */
|
||||
tls_project_id?: string;
|
||||
/** Topic ID for Volcengine TLS (optional) */
|
||||
tls_topic_id?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
1204
frontend/packages/arch/idl/src/auto-generated/card/index.ts
Normal file
1204
frontend/packages/arch/idl/src/auto-generated/card/index.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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 {
|
||||
LogID?: string;
|
||||
Caller?: string;
|
||||
Addr?: string;
|
||||
Client?: string;
|
||||
TrafficEnv?: TrafficEnv;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface BaseResp {
|
||||
StatusMessage?: string;
|
||||
StatusCode?: number;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface TrafficEnv {
|
||||
Open?: boolean;
|
||||
Env?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,377 @@
|
||||
/*
|
||||
* 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 AgentType {
|
||||
Start_Agent = 0,
|
||||
LLM_Agent = 1,
|
||||
Task_Agent = 2,
|
||||
Global_Agent = 3,
|
||||
Bot_Agent = 4,
|
||||
}
|
||||
|
||||
/** 版本兼容:0-旧版本 1-可回退的新版本 2-不可回退的新版本 3-可回退的新版本(不再提示) */
|
||||
export enum AgentVersionCompat {
|
||||
OldVersion = 0,
|
||||
MiddleVersion = 1,
|
||||
NewVersion = 2,
|
||||
MiddleVersionNotPrompt = 3,
|
||||
}
|
||||
|
||||
/** AnswerActions */
|
||||
export enum AnswerActionsMode {
|
||||
Default = 1,
|
||||
Customize = 2,
|
||||
}
|
||||
|
||||
export enum AnswerActionTriggerType {
|
||||
/** 平台预设Trigger action */
|
||||
Direct = 1,
|
||||
/** 点击Action 显示自定义的H5页面 */
|
||||
WebView = 2,
|
||||
/** 点击Action 发送自定义的用户消息 */
|
||||
SendMessage = 3,
|
||||
}
|
||||
|
||||
export enum BacktrackMode {
|
||||
Current = 1,
|
||||
Previous = 2,
|
||||
Start = 3,
|
||||
MostSuitable = 4,
|
||||
}
|
||||
|
||||
export enum BotMode {
|
||||
SingleMode = 0,
|
||||
MultiMode = 1,
|
||||
WorkflowMode = 2,
|
||||
}
|
||||
|
||||
export enum BotSpecies {
|
||||
/** bot种类
|
||||
从flow创建 */
|
||||
Default = 0,
|
||||
/** 从coze创建 */
|
||||
Function = 1,
|
||||
}
|
||||
|
||||
export enum BotStatus {
|
||||
Deleted = 0,
|
||||
Using = 1,
|
||||
Banned = 2,
|
||||
}
|
||||
|
||||
export enum BotTableRWMode {
|
||||
LimitedReadWrite = 1,
|
||||
ReadOnly = 2,
|
||||
UnlimitedReadWrite = 3,
|
||||
RWModeMax = 4,
|
||||
}
|
||||
|
||||
export enum BusinessType {
|
||||
Default = 0,
|
||||
DouyinAvatar = 1,
|
||||
}
|
||||
|
||||
export enum CacheType {
|
||||
/** 缓存关闭 */
|
||||
CacheClosed = 0,
|
||||
/** 前缀缓存 */
|
||||
PrefixCache = 1,
|
||||
}
|
||||
|
||||
/** 上下文允许传输的类型 */
|
||||
export enum ContextMode {
|
||||
Chat = 0,
|
||||
FunctionCall_1 = 1,
|
||||
FunctionCall_2 = 2,
|
||||
FunctionCall_3 = 3,
|
||||
}
|
||||
|
||||
export enum DefaultUserInputType {
|
||||
/** 没设置 */
|
||||
NotSet = 0,
|
||||
/** 文字 */
|
||||
Text = 1,
|
||||
/** 按住语音 */
|
||||
Voice = 2,
|
||||
/** 语音通话 */
|
||||
Call = 3,
|
||||
/** 视频通话 */
|
||||
VideoCall = 4,
|
||||
}
|
||||
|
||||
export enum DisablePromptCalling {
|
||||
Off = 0,
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum FieldItemType {
|
||||
/** 文本 String */
|
||||
Text = 1,
|
||||
/** 数字 Integer */
|
||||
Number = 2,
|
||||
/** 时间 Time */
|
||||
Date = 3,
|
||||
/** float Number */
|
||||
Float = 4,
|
||||
/** bool Boolean */
|
||||
Boolean = 5,
|
||||
}
|
||||
|
||||
export enum FileboxInfoMode {
|
||||
Off = 0,
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum IndependentRecognitionModelType {
|
||||
/** 小模型 */
|
||||
SLM = 0,
|
||||
/** 大模型 */
|
||||
LLM = 1,
|
||||
}
|
||||
|
||||
export enum IndependentTiming {
|
||||
/** 判断用户输入(前置) */
|
||||
Pre = 1,
|
||||
/** 判断节点输出(后置) */
|
||||
Post = 2,
|
||||
/** 前置模式和后置模式支持同时选择 */
|
||||
PreAndPost = 3,
|
||||
}
|
||||
|
||||
export enum KnowledgeNoRecallReplyMode {
|
||||
Default = 0,
|
||||
CustomizePrompt = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeShowSourceMode {
|
||||
ReplyBottom = 0,
|
||||
CardList = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeType {
|
||||
Coze = 0,
|
||||
Volcano = 1,
|
||||
}
|
||||
|
||||
export enum KnowledgeTypeMode {
|
||||
Coze = 0,
|
||||
Volcano = 1,
|
||||
}
|
||||
|
||||
export enum MessageFeedbackDetailType {
|
||||
UnlikeDefault = 0,
|
||||
/** 有害信息 */
|
||||
UnlikeHarmful = 1,
|
||||
/** 信息有误 */
|
||||
UnlikeIncorrect = 2,
|
||||
/** 未遵循指令 */
|
||||
UnlikeNotFollowInstructions = 3,
|
||||
/** 其他 */
|
||||
UnlikeOthers = 4,
|
||||
}
|
||||
|
||||
export enum MessageFeedbackType {
|
||||
Default = 0,
|
||||
Like = 1,
|
||||
Unlike = 2,
|
||||
}
|
||||
|
||||
export enum ModelFuncConfigStatus {
|
||||
FullSupport = 0,
|
||||
PoorSupport = 1,
|
||||
NotSupport = 2,
|
||||
}
|
||||
|
||||
export enum ModelFuncConfigType {
|
||||
Plugin = 1,
|
||||
Workflow = 2,
|
||||
ImageFlow = 3,
|
||||
Trigger = 4,
|
||||
KnowledgeText = 5,
|
||||
KnowledgeTable = 6,
|
||||
KnowledgeAutoCall = 7,
|
||||
KnowledgeOnDemandCall = 8,
|
||||
Variable = 9,
|
||||
Database = 10,
|
||||
LongTermMemory = 11,
|
||||
FileBox = 12,
|
||||
Onboarding = 13,
|
||||
Suggestion = 14,
|
||||
ShortcutCommand = 15,
|
||||
BackGroundImage = 16,
|
||||
TTS = 17,
|
||||
MultiAgentRecognize = 18,
|
||||
KnowledgePhoto = 19,
|
||||
HookInfo = 20,
|
||||
KnowledgeValcanoUnstructured = 21,
|
||||
KnowledgeValcanoStructured = 22,
|
||||
Model = 23,
|
||||
}
|
||||
|
||||
export enum ModelResponseFormat {
|
||||
Text = 0,
|
||||
Markdown = 1,
|
||||
JSON = 2,
|
||||
}
|
||||
|
||||
export enum ModelStyle {
|
||||
Custom = 0,
|
||||
Creative = 1,
|
||||
Balance = 2,
|
||||
Precise = 3,
|
||||
}
|
||||
|
||||
export enum MultiAgentConnectorType {
|
||||
Curve = 0,
|
||||
Straight = 1,
|
||||
}
|
||||
|
||||
export enum MultiAgentSessionType {
|
||||
Flow = 1,
|
||||
Host = 2,
|
||||
}
|
||||
|
||||
/** onboarding内容生成模式 */
|
||||
export enum OnboardingMode {
|
||||
/** 不需要 */
|
||||
NO_NEED = 1,
|
||||
/** 人工指定内容(多语言支持由LLM兜底) */
|
||||
USE_MANUAL = 2,
|
||||
/** 由LLM生成 */
|
||||
USE_LLM = 3,
|
||||
}
|
||||
|
||||
export enum PromptMode {
|
||||
Standard = 0,
|
||||
/** 前缀提示词 */
|
||||
PrefixPrompt = 1,
|
||||
}
|
||||
|
||||
export enum RecognitionMode {
|
||||
FunctionCall = 1,
|
||||
Independent = 2,
|
||||
}
|
||||
|
||||
export enum ReferenceInfoStatus {
|
||||
/** 1:有可用更新 */
|
||||
HasUpdates = 1,
|
||||
/** 2:被删除 */
|
||||
IsDelete = 2,
|
||||
}
|
||||
|
||||
/** struct ContentAttachment {
|
||||
1: required string FileID (api.body = "file_id")
|
||||
}
|
||||
struct MetaContent{
|
||||
1: required string Type (agw.key="type"),
|
||||
2: optional string Text ( agw.key="text"),
|
||||
3: optional string FileID (agw.key="file_id"),
|
||||
4: optional string FileURL (agw.key="file_url"),
|
||||
5: optional string Card (agw.key="card"),
|
||||
}
|
||||
struct EnterMessage {
|
||||
1: required string Role (agw.key = "role")
|
||||
2: string Content(agw.key = "content") // 内容
|
||||
3: map<string,string> MetaData(agw.key = "meta_data")
|
||||
4: string ContentType(agw.key = "content_type")//text/card/object_string
|
||||
5: string Type(agw.key = "type")
|
||||
}
|
||||
struct OpenMessageApi {
|
||||
1: string Id(agw.key = "id") // 主键ID
|
||||
2: string BotId(agw.key = "bot_id") // bot id //已TODO 所有的i64加注解str,入参和出参都要
|
||||
3: string Role(agw.key = "role")
|
||||
4: string Content(agw.key = "content") // 内容
|
||||
5: string ConversationId(agw.key = "conversation_id") // conversation id
|
||||
6: map<string,string> MetaData(agw.key = "meta_data")
|
||||
7: string CreatedAt(agw.key = "created_at") // 创建时间
|
||||
8: string UpdatedAt(agw.key = "updated_at") // 更新时间 //已TODO 时间改成int
|
||||
9: string ChatId(agw.key = "chat_id")
|
||||
10: string ContentType(agw.key = "content_type")
|
||||
11: string Type(agw.key = "type")
|
||||
} */
|
||||
export enum ReferenceUpdateType {
|
||||
ManualUpdate = 1,
|
||||
AutoUpdate = 2,
|
||||
}
|
||||
|
||||
export enum Scene {
|
||||
Default = 0,
|
||||
Explore = 1,
|
||||
BotStore = 2,
|
||||
CozeHome = 3,
|
||||
Playground = 4,
|
||||
/** 评测平台 */
|
||||
Evaluation = 5,
|
||||
AgentAPP = 6,
|
||||
/** prompt优化 */
|
||||
PromptOptimize = 7,
|
||||
/** createbot的nl2bot功能 */
|
||||
GenerateAgentInfo = 8,
|
||||
}
|
||||
|
||||
export enum SearchStrategy {
|
||||
/** 语义搜索 */
|
||||
SemanticSearch = 0,
|
||||
/** 混合搜索 */
|
||||
HybirdSearch = 1,
|
||||
/** 全文搜索 */
|
||||
FullTextSearch = 20,
|
||||
}
|
||||
|
||||
export enum SocietyVisibility {
|
||||
/** 对所有人可见 */
|
||||
Public = 1,
|
||||
/** 仅对host可见 */
|
||||
Anonymous = 2,
|
||||
/** 自定义 */
|
||||
Custom = 3,
|
||||
}
|
||||
|
||||
export enum SuggestedQuestionsShowMode {
|
||||
Random = 0,
|
||||
All = 1,
|
||||
}
|
||||
|
||||
export enum SuggestReplyMode {
|
||||
System = 0,
|
||||
Custom = 1,
|
||||
Disable = 2,
|
||||
/** agent专用,复用源Bot配置 */
|
||||
OriBot = 3,
|
||||
}
|
||||
|
||||
export enum TimeCapsuleMode {
|
||||
/** 关 */
|
||||
Off = 0,
|
||||
/** 开 */
|
||||
On = 1,
|
||||
}
|
||||
|
||||
export enum WorkflowMode {
|
||||
Workflow = 0,
|
||||
Imageflow = 1,
|
||||
SceneFlow = 2,
|
||||
ChatFlow = 3,
|
||||
All = 100,
|
||||
}
|
||||
/* eslint-enable */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,787 @@
|
||||
/*
|
||||
* 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 AccessType {
|
||||
Private = 1,
|
||||
Public = 2,
|
||||
AppDefault = 3,
|
||||
}
|
||||
|
||||
export enum Act {
|
||||
RequireAction = 0,
|
||||
RequireMessage = 1,
|
||||
}
|
||||
|
||||
/** the task status */
|
||||
export enum AsyncTaskStatus {
|
||||
NotFinished = 0,
|
||||
Interrupted = 1,
|
||||
NoResults = 2,
|
||||
WithResults = 3,
|
||||
}
|
||||
|
||||
export enum BotRecommendType {
|
||||
/** 不推荐 */
|
||||
None = 0,
|
||||
/** 精选的 */
|
||||
Featured = 1,
|
||||
/** 可被发现的 */
|
||||
Discoverable = 2,
|
||||
}
|
||||
|
||||
/** 上下文允许传输的类型 */
|
||||
export enum ContextContentType {
|
||||
/** 无任何处理版 */
|
||||
USER_RES = 0,
|
||||
USER_LLM_RES = 1,
|
||||
USER_LLM_TOOLLEN_RES = 2,
|
||||
USER_LLM_TOOL_RES = 3,
|
||||
USER_LLM_TOOL = 4,
|
||||
}
|
||||
|
||||
export enum ConversationType {
|
||||
Unknown = 0,
|
||||
Single = 1,
|
||||
Group = 2,
|
||||
}
|
||||
|
||||
export enum CopilotContentType {
|
||||
Txt = 1,
|
||||
Image = 2,
|
||||
Audio = 3,
|
||||
Video = 4,
|
||||
Link = 6,
|
||||
Music = 7,
|
||||
Tako = 8,
|
||||
File = 9,
|
||||
Card = 50,
|
||||
BotCard = 51,
|
||||
Widget = 52,
|
||||
APP = 100,
|
||||
OutputSearchResult = 200,
|
||||
OutputMultiStream = 201,
|
||||
SearchIntentionResult = 300,
|
||||
/** 深入研究卡片 */
|
||||
DeepResearchCard = 400,
|
||||
/** 文档 */
|
||||
Artifact = 401,
|
||||
/** 深入研究报告 */
|
||||
DeepResearchReport = 402,
|
||||
/** 深入思考 */
|
||||
Thinking = 500,
|
||||
/** 搜索query */
|
||||
SearchQuery = 501,
|
||||
/** 搜索结果 */
|
||||
SearchResult = 502,
|
||||
/** 搜索结果 query可被替换版本 */
|
||||
SearchQueryResult = 503,
|
||||
/** 路径规划 */
|
||||
RoutePlan = 504,
|
||||
/** 图片分析 */
|
||||
ImageAnalysis = 505,
|
||||
/** LinkReader */
|
||||
LinkReader = 506,
|
||||
/** 本地生活 */
|
||||
LocalLife = 507,
|
||||
}
|
||||
|
||||
export enum CopilotResult {
|
||||
Success = 1,
|
||||
SystemLimitation = 2,
|
||||
UserLimitation = 3,
|
||||
}
|
||||
|
||||
export enum CopilotRole {
|
||||
System = 0,
|
||||
User = 1,
|
||||
Assistant = 2,
|
||||
/** 占位符,仅出现在模板中 */
|
||||
Placeholder = 3,
|
||||
/** 触发 function-call 调用的模型消息 */
|
||||
LLMOutput = 4,
|
||||
/** tool 返回,function 角色 */
|
||||
ToolOutput = 5,
|
||||
/** 同 5 */
|
||||
Function = 6,
|
||||
}
|
||||
|
||||
export enum ErrCode {
|
||||
ParamErr = 1,
|
||||
InnerErr = 2,
|
||||
WebGPT = 4,
|
||||
ByteArtist = 5,
|
||||
Claude = 6,
|
||||
Dalle2 = 7,
|
||||
GPT = 8,
|
||||
Seed = 9,
|
||||
StableDiffusion = 10,
|
||||
RiskSecurity = 11,
|
||||
RequireLocation = 12,
|
||||
SigInterrupt = 702112002,
|
||||
Timeout = 702112101,
|
||||
AuthenticationError = 702112102,
|
||||
RateLimitError = 702112103,
|
||||
InvalidRequestError = 702112104,
|
||||
FunctionInputError = 702112105,
|
||||
EngineInternalError = 702112106,
|
||||
MaximumTokenError = 702112107,
|
||||
NotSupportRoleTypeError = 702112108,
|
||||
AbParamsError = 702112109,
|
||||
ParseTemplateError = 702112110,
|
||||
ModelAKInvalidError = 702112111,
|
||||
PluginRequireAuthorityError = 702112112,
|
||||
GraceShutdownError = 702112113,
|
||||
InvalidWorkflowError = 702112114,
|
||||
MaxIterationsError = 702112115,
|
||||
ModelInsufficientFunds = 702112116,
|
||||
SeedLongTxtAsync = 702112117,
|
||||
}
|
||||
|
||||
export enum FileType {
|
||||
FILE = 1,
|
||||
/** 豆包OCR需求 */
|
||||
IMAGE = 2,
|
||||
AUDIO = 3,
|
||||
VIDEO = 4,
|
||||
}
|
||||
|
||||
export enum FinReason {
|
||||
/** 正常结束 */
|
||||
Normal = 0,
|
||||
/** Plugin内部中断 */
|
||||
PluginInterrupt = 1,
|
||||
/** Seed 超长文中断转轮训 */
|
||||
SeedLongTxt = 2,
|
||||
}
|
||||
|
||||
export enum HighLightType {
|
||||
None = 0,
|
||||
GoogleNLP = 1,
|
||||
ToutiaoWiki = 2,
|
||||
}
|
||||
|
||||
export enum InsertReferenceType {
|
||||
/** 文本(默认) */
|
||||
Text = 1,
|
||||
/** 视频 */
|
||||
Video = 2,
|
||||
/** 图片 */
|
||||
Image = 3,
|
||||
/** DocumentRef = 4 // 文档引用 */
|
||||
CardRef = 5,
|
||||
}
|
||||
|
||||
export enum IntentionType {
|
||||
Default = 1,
|
||||
SearchText = 2,
|
||||
SearchVideo = 3,
|
||||
ComplexSearchText = 4,
|
||||
SearchImage = 5,
|
||||
SearchRichMedia = 6,
|
||||
SearchRichMediaStrong = 7,
|
||||
SearchRichMediaWeak = 8,
|
||||
}
|
||||
|
||||
export enum LLMScene {
|
||||
Chat = 1,
|
||||
Suggest = 2,
|
||||
QueryKeyword = 3,
|
||||
Workflow = 4,
|
||||
/** 生成 Onboarding */
|
||||
OnboardingOnline = 5,
|
||||
OnboardingOffline = 6,
|
||||
/** 会话命名 */
|
||||
Naming = 7,
|
||||
/** SC生成用户画像 */
|
||||
GenProfile = 8,
|
||||
BrowserPlugin = 9,
|
||||
BrowserPluginSearch = 10,
|
||||
BrowserPluginExplain = 11,
|
||||
BrowserPluginTranslate = 12,
|
||||
BrowserPluginSummary = 13,
|
||||
BrowserPluginGrammar = 14,
|
||||
BrowserPluginRewrite = 15,
|
||||
BrowserPluginWebSummary = 16,
|
||||
/** 热搜词 忽略上下文 */
|
||||
HotSearch = 17,
|
||||
/** 离线用于生成缓存 */
|
||||
HotSearchPreload = 18,
|
||||
/** 输入框Sug */
|
||||
InputSug = 19,
|
||||
/** 新闻热点Push */
|
||||
NewsPush = 20,
|
||||
NewsPushPreload = 21,
|
||||
/** Onboarding建议问题触发的回答 */
|
||||
OnboardingSug = 22,
|
||||
OnboardingSugPreload = 23,
|
||||
/** web未登录用户输入问题 */
|
||||
WebNotLogin = 24,
|
||||
/** Onboarding welcomeback */
|
||||
BackOnboardingSug = 25,
|
||||
/** 通过LLM的能力生成卡片 */
|
||||
GenCard = 26,
|
||||
/** 高亮词 */
|
||||
HighLightMsg = 27,
|
||||
/** 高亮词强制搜索 */
|
||||
HighLightMsgSearch = 28,
|
||||
/** 划词提问场景(浏览器插件) */
|
||||
BrowserPluginSelectionQuestion = 29,
|
||||
/** youtube视频摘要(浏览器插件) */
|
||||
BrowserPluginYoutubeSummary = 30,
|
||||
/** 只调用Chain场景(浏览器插件) */
|
||||
BrowserPluginRawChain = 31,
|
||||
/** PDF理解(浏览器插件) */
|
||||
BrowserPluginPDFReader = 32,
|
||||
/** 图片理解(浏览器插件) */
|
||||
BrowserPluginImgReader = 33,
|
||||
/** 复杂搜索总结 */
|
||||
SearchSummary = 34,
|
||||
/** 在20的基础上保证缓存命中率 */
|
||||
PushForceCache = 40,
|
||||
}
|
||||
|
||||
export enum MediaSearchType {
|
||||
Nothing = 0,
|
||||
DouYin = 1,
|
||||
TikTok = 2,
|
||||
}
|
||||
|
||||
export enum MessageScene {}
|
||||
|
||||
export enum MessageType {
|
||||
System = 1,
|
||||
User = 2,
|
||||
Assistant = 3,
|
||||
Placeholder = 4,
|
||||
Function = 5,
|
||||
}
|
||||
|
||||
export enum MetaType {
|
||||
/** 端侧直接替换 */
|
||||
Replaceable = 1,
|
||||
/** 插入引用 */
|
||||
Insertable = 2,
|
||||
/** 文档引用 */
|
||||
DocumentRef = 3,
|
||||
/** 知识库引用卡片 */
|
||||
KnowledgeCard = 4,
|
||||
/** 富媒体placeholder */
|
||||
MetaPlaceHolder = 5,
|
||||
/** 透传 */
|
||||
PassThrough = 50,
|
||||
/** 嵌入的多媒体信息,只是alice给端上用的,因为全链路复用这一个字段,所以在这儿改了 */
|
||||
EmbeddedMultimedia = 100,
|
||||
/** 如意卡 */
|
||||
AlaCard = 101,
|
||||
}
|
||||
|
||||
export enum ModelFamily {
|
||||
GPT = 1,
|
||||
Seed = 2,
|
||||
Claude = 3,
|
||||
MiniMax = 4,
|
||||
Plugin = 5,
|
||||
StableDiffusion = 6,
|
||||
ByteArtist = 7,
|
||||
Edu = 8,
|
||||
/** 方舟(火山引擎) */
|
||||
Maas = 9,
|
||||
/** 废弃:千帆(百度云) */
|
||||
QianFan = 10,
|
||||
/** gemini(google) */
|
||||
Gemini = 11,
|
||||
Moonshot = 12,
|
||||
/** 智谱 */
|
||||
GLM = 13,
|
||||
/** MaaS自动同步模型 */
|
||||
MaaSAutoSync = 14,
|
||||
QWen = 15,
|
||||
/** Command R/R+ */
|
||||
Cohere = 16,
|
||||
Baichuan = 17,
|
||||
/** 文心一言 */
|
||||
Ernie = 18,
|
||||
/** deep seek */
|
||||
DeekSeek = 19,
|
||||
Llama = 20,
|
||||
BytedLLMServer = 21,
|
||||
Yi = 22,
|
||||
StepFun = 23,
|
||||
}
|
||||
|
||||
/** ** 业务自定义 Model ****** 命名规则 业务 + 功能
|
||||
每次 Scene 新增需要手动添加提交
|
||||
每次场景的新增备注说明使用的地方 */
|
||||
export enum ModelListScene {
|
||||
/** Prompt 评测平台 */
|
||||
PromptEvaluatePlatform = 1000,
|
||||
/** Flow 用户前台 */
|
||||
FlowApp = 2000,
|
||||
/** Flow OP 后台 */
|
||||
FlowOPAdmin = 3000,
|
||||
/** Flow 前台与后台的模型合集 */
|
||||
FlowAll = 3001,
|
||||
/** Bot 平台 Release版本 */
|
||||
BotPlatform = 4000,
|
||||
/** Bot 平台 Inhouse版本 */
|
||||
BotPlatformInhouse = 4001,
|
||||
/** Flow Workflow */
|
||||
Workflow = 5000,
|
||||
/** Arena */
|
||||
Arena = 6000,
|
||||
/** Arena Inhouse */
|
||||
ArenaInhouse = 6001,
|
||||
/** Doubao */
|
||||
Doubao = 7000,
|
||||
}
|
||||
|
||||
/** raw 模型列表 */
|
||||
export enum ModelName {
|
||||
GPT3dot5Turbo = 1,
|
||||
GPT4_32k = 2,
|
||||
GPT4 = 3,
|
||||
SeedBeta = 4,
|
||||
/** seed + browsing */
|
||||
SeedWebGPT = 5,
|
||||
/** seed strong character */
|
||||
SeedSystem = 6,
|
||||
SeedMusic = 7,
|
||||
GPT4_32k0613 = 8,
|
||||
Seed_Img2Text = 9,
|
||||
/** seed sc for test */
|
||||
Seed_SCTest = 10,
|
||||
/** seed or test */
|
||||
Seed_Test = 11,
|
||||
/** seed main + browsing + (Plugin 未放开) */
|
||||
Seed_WithPlugins = 12,
|
||||
GPT3dot5Turbo0613 = 13,
|
||||
GPT35_Turbo16k = 14,
|
||||
/** sota */
|
||||
SeedSota = 15,
|
||||
/** sota + browsing */
|
||||
SeedSotaBrowsing = 16,
|
||||
/** 三合一, 主模型 + plugin + browsing, 但plugin是固定的 */
|
||||
SeedOmni = 17,
|
||||
/** function call */
|
||||
SeedFunctionCall = 18,
|
||||
/** seed main + you are right */
|
||||
SeedMain = 19,
|
||||
/** 联网策略实验 */
|
||||
SeedBrowsingExperiment = 20,
|
||||
/** browsing单模型 */
|
||||
SeedBrowsingOnly = 21,
|
||||
/** MiniMax abab5.5-chat模型 */
|
||||
MiniMaxABAB5dot5Chat = 22,
|
||||
Echo = 23,
|
||||
GPT4_0613 = 24,
|
||||
/** seed + system prompt + memory */
|
||||
SeedSystemWithMemory = 25,
|
||||
/** seed + system prompt + momory test */
|
||||
SeedSystemWithMemoryTest = 26,
|
||||
/** seed map */
|
||||
SeedMap = 27,
|
||||
SeedSuggest = 28,
|
||||
SeedComplexInstruction = 29,
|
||||
SeedComplexInstructionTest = 30,
|
||||
Edu = 31,
|
||||
SeedSuggestOffline = 32,
|
||||
SeedOmniSota = 33,
|
||||
SeedStrongCharacterNearlinePortrait = 34,
|
||||
}
|
||||
|
||||
export enum ModelProxy {
|
||||
/** ModelId >= 100 */
|
||||
FuncBot = 1,
|
||||
/** Config in TCC: model_using_chain */
|
||||
Chain = 2,
|
||||
/** Define in copilot.chat_with_bot#aiAgentModels or ai_agent.Chat */
|
||||
Agent = 3,
|
||||
/** Other */
|
||||
Executor = 4,
|
||||
}
|
||||
|
||||
/** 兼容旧逻辑里的模型 status */
|
||||
export enum ModelStatus {
|
||||
InUse = 1,
|
||||
Pending = 5,
|
||||
Deleted = 10,
|
||||
}
|
||||
|
||||
export enum ModelType {
|
||||
GPT3dot5Turbo = 1,
|
||||
GPT4 = 2,
|
||||
Seed = 3,
|
||||
SeedMultiturn = 4,
|
||||
StableDiffusion = 5,
|
||||
ByteArtist = 6,
|
||||
Claude = 7,
|
||||
BingChat = 8,
|
||||
Bard = 9,
|
||||
Assistant = 10,
|
||||
DallE = 11,
|
||||
Midjourney = 12,
|
||||
TTSearch = 13,
|
||||
GPTTask = 14,
|
||||
GPT4Browsing = 15,
|
||||
GPT4WithPlugins = 16,
|
||||
GPT3dot5WithPlugins = 17,
|
||||
SeedSystem = 18,
|
||||
Plugin = 20,
|
||||
GPT4Plugin = 21,
|
||||
WebGPT = 22,
|
||||
GPT3dot5WithFunction = 23,
|
||||
AutoPlugin = 24,
|
||||
MiniMax = 25,
|
||||
GPT3dot5WithTako = 26,
|
||||
GPT4WithTako = 27,
|
||||
GPT4WithTakoTikTok = 28,
|
||||
GPT4WithTakoGoogle = 29,
|
||||
SeedBeta = 30,
|
||||
ByteArtistAnime = 31,
|
||||
GenMusic = 32,
|
||||
GPT48k = 33,
|
||||
SeedStrongCharacterForTest = 34,
|
||||
SeedForTest = 35,
|
||||
SeedOmniFake = 36,
|
||||
SeedOmniBrowse = 37,
|
||||
SeedOmniSota = 38,
|
||||
SeedOmniSotaBrowse = 39,
|
||||
SeedOmniBrowseWithCard = 40,
|
||||
CiciSearchMore = 41,
|
||||
CiciSearchLess = 42,
|
||||
CiciSearchBing = 43,
|
||||
SeedOmniPlugin = 44,
|
||||
CiciSearchBing_GPT35 = 45,
|
||||
GPT40613 = 46,
|
||||
SeedForMap = 47,
|
||||
SeedForMusic = 48,
|
||||
XiaoningWithMem = 49,
|
||||
/** 功能性bot的模型从100开始,旧版bot的模型在100以下 pangzhiqiang@bytedance.com */
|
||||
GPT_35Turbo = 100,
|
||||
GPT_35Turbo0301 = 101,
|
||||
GPT_4 = 102,
|
||||
GPT_40314 = 103,
|
||||
GPT_432k = 104,
|
||||
GPT_432k0314 = 105,
|
||||
/** seed 主模型 */
|
||||
Seed_Beta = 106,
|
||||
Seed_Music = 107,
|
||||
GPT4_32k0613 = 108,
|
||||
Seed_Img2Text = 109,
|
||||
/** seed主模型 + browsing */
|
||||
Seed_WebGPT = 110,
|
||||
/** seed主模型 + browsing + (plugin暂为开放) */
|
||||
Seed_WithPlugins = 111,
|
||||
GPT_35Turbo0613 = 112,
|
||||
GPT_35Turbo16K = 113,
|
||||
/** sota */
|
||||
Seed_Sota = 114,
|
||||
/** sota + browsing */
|
||||
Seed_Sota_Browsing = 115,
|
||||
/** strong character */
|
||||
Seed_WithSystem = 116,
|
||||
/** 三合一, 主模型 + plugin + browsing, 但plugin是固定的 */
|
||||
Seed_Omni = 118,
|
||||
/** seed function calling */
|
||||
SeedFunctionCall = 119,
|
||||
/** seed 主模型, 带"是的你说的对" */
|
||||
Seed_Main = 120,
|
||||
/** 联网策略实验 */
|
||||
SeedBrowsingExperiment = 121,
|
||||
/** browsing单模型 */
|
||||
SeedBrowsingOnly = 122,
|
||||
/** 虚假的 llm,function call 协议,一直调用第一个 function */
|
||||
Echo = 123,
|
||||
GPT_40613 = 124,
|
||||
/** for seed test */
|
||||
Seed_WithSystemForTest = 125,
|
||||
/** 地图 */
|
||||
Seed_Map = 126,
|
||||
SeedSuggest = 127,
|
||||
Seed_ComplexInstructionTest = 128,
|
||||
Seed_ComplexInstruction = 129,
|
||||
Edu = 130,
|
||||
Tako_Intent = 131,
|
||||
Seed_Text2Img = 132,
|
||||
GPT_4Preview_128k1106 = 133,
|
||||
SeedForDouyin = 134,
|
||||
SeedFunctionCallSp = 135,
|
||||
SeedSuggestOffline = 136,
|
||||
SkylarkChat = 137,
|
||||
SeedStrongCharacterNearlinePortrait = 138,
|
||||
/** 保障头条链路 */
|
||||
SkylarkPro_v1_1_TT = 1704353638,
|
||||
/** 保障头条链路(带联网插件) */
|
||||
SkylarkPro_v1_1_TT_BROWSING = 1704696164,
|
||||
/** 豆包 bot 分类模型 */
|
||||
SeedBotTag = 1705216686,
|
||||
/** 豆包语音链路优化模型 */
|
||||
SeedStrongCharacterAudio = 1705220979,
|
||||
}
|
||||
|
||||
export enum ModelVendor {
|
||||
GPTOpenAPI = 1,
|
||||
Maas = 2,
|
||||
LLMFlow = 3,
|
||||
Merlin = 4,
|
||||
Other = 5,
|
||||
}
|
||||
|
||||
export enum ModelVersion {
|
||||
UNK = 0,
|
||||
GPT3D5 = 1,
|
||||
GPT4 = 2,
|
||||
}
|
||||
|
||||
export enum ModuleType {
|
||||
Plugin = 1,
|
||||
Hook = 2,
|
||||
GptEngine = 3,
|
||||
Edu = 4,
|
||||
OPENAPI = 5,
|
||||
}
|
||||
|
||||
export enum MultiStreamScene {
|
||||
Unknown_MultiStreamScene = 0,
|
||||
CrowdTesting = 1,
|
||||
}
|
||||
|
||||
export enum MultiStreamStatus {
|
||||
Unknown_MultiStreamStatus = 0,
|
||||
Start = 1,
|
||||
End = 2,
|
||||
}
|
||||
|
||||
/** Onboarding组件类型 */
|
||||
export enum OnboardingComponentType {
|
||||
Prologue = 1,
|
||||
SuggestedQuestion = 2,
|
||||
}
|
||||
|
||||
/** onboarding结果的内容来源 */
|
||||
export enum OnboardingResultSource {
|
||||
/** LLM生成 */
|
||||
LLM_GEN = 1,
|
||||
/** LLM翻译自LLM生成内容 */
|
||||
LLM_GEN_THEN_TRANSLATE = 2,
|
||||
/** 人工指定 */
|
||||
MANUAL = 3,
|
||||
/** LLM翻译自人工指定 */
|
||||
MANUAL_THEN_TRANSLATE = 4,
|
||||
}
|
||||
|
||||
/** Onboarding场景 */
|
||||
export enum OnboardingSceneType {
|
||||
/** 新用户 */
|
||||
FIRST_MET = 1,
|
||||
/** 欢迎回来 */
|
||||
WELCOME_BACK = 2,
|
||||
}
|
||||
|
||||
/** onboarding内容生成模式 */
|
||||
export enum OnboardingSourceMode {
|
||||
/** 不需要 */
|
||||
NO_NEED = 1,
|
||||
/** 人工指定内容(多语言支持由LLM兜底) */
|
||||
USE_MANUAL = 2,
|
||||
/** 由LLM生成 */
|
||||
USE_LLM = 3,
|
||||
}
|
||||
|
||||
export enum OnboardingType {
|
||||
None = 0,
|
||||
/** 不展示开场白 */
|
||||
OnboardingNotDisplay = 1,
|
||||
/** 完全使用预设开场白 */
|
||||
OnboardingPreset = 2,
|
||||
/** 使用llm自动生成的开场白 */
|
||||
OnboardingLLMGen = 3,
|
||||
}
|
||||
|
||||
/** 用来触发 overpass common 包更新,无实际意义 */
|
||||
export enum OverpassPlacholder {
|
||||
One = 1,
|
||||
}
|
||||
|
||||
export enum PreGenType {
|
||||
PreGen_Query = 1,
|
||||
PreGen_PreQuery = 2,
|
||||
PreGen_Continue = 3,
|
||||
PreGen_End = 4,
|
||||
}
|
||||
|
||||
export enum PrintBehavior {
|
||||
Block = 0,
|
||||
Streaming = 1,
|
||||
Full = 2,
|
||||
}
|
||||
|
||||
export enum PromptTemplateFormat {
|
||||
FString = 1,
|
||||
Jinja2 = 2,
|
||||
/** 保持原样不解析 */
|
||||
None = 4,
|
||||
}
|
||||
|
||||
export enum ReplyType {
|
||||
Answer = 1,
|
||||
Suggest = 2,
|
||||
LLMOutput = 3,
|
||||
ToolOutput = 4,
|
||||
DataSet = 5,
|
||||
QueryKeyword = 6,
|
||||
IntermediateOutput = 7,
|
||||
Verbose = 100,
|
||||
/** [copilot inner package protocol] A buffered packege in multi-agent messenger to maintain the upstream */
|
||||
PlaceHolder = 101,
|
||||
}
|
||||
|
||||
export enum ResultType {
|
||||
ResultType_Default = 0,
|
||||
ResultType_PluginResponse = 1,
|
||||
ResultType_PluginIntent = 2,
|
||||
ResultType_Variables = 3,
|
||||
ResultType_None = 4,
|
||||
ResultType_BotSchema = 5,
|
||||
ResultType_ReferenceVariable = 6,
|
||||
}
|
||||
|
||||
export enum ResumeScene {
|
||||
/** Compatible value */
|
||||
ResumeDefault = 0,
|
||||
/** 插件授权场景 */
|
||||
PluginAuthorized = 1,
|
||||
/** 异步插件 */
|
||||
PluginAsync = 2,
|
||||
/** 插件打断 */
|
||||
PluginInterrupt = 3,
|
||||
}
|
||||
|
||||
export enum SearchEngineType {
|
||||
Nothing = 0,
|
||||
Google = 1,
|
||||
DouYin = 2,
|
||||
TouTiao = 4,
|
||||
}
|
||||
|
||||
export enum SourceType {
|
||||
BotStudioSubmit = 1,
|
||||
BotStudioWorkflowTest = 2,
|
||||
Flow = 3,
|
||||
API = 4,
|
||||
Aweme = 5,
|
||||
}
|
||||
|
||||
export enum Stage {
|
||||
Plan = 0,
|
||||
AgentHook = 1,
|
||||
}
|
||||
|
||||
/** 回答附带建议问题 */
|
||||
export enum SuggestReplyMode {
|
||||
/** 使用默认Suggest Prompt生成建议回复 */
|
||||
WithDefaultPrompt = 0,
|
||||
/** 使用自定义Suggest Prompt生成建议回复 */
|
||||
WithCustomizedPrompt = 1,
|
||||
/** 不需要Suggest */
|
||||
Disable = 2,
|
||||
/** (Agent)使用源bot的配置 */
|
||||
UseOriginBotMode = 3,
|
||||
}
|
||||
|
||||
export enum ToolAuthType {
|
||||
/** 默认,调用插件时若无权限会报错 */
|
||||
Ask = 0,
|
||||
/** 仅本次允许 */
|
||||
Once = 1,
|
||||
/** 始终允许 */
|
||||
Always = 2,
|
||||
}
|
||||
|
||||
export interface CustomAgentInfo {
|
||||
name?: string;
|
||||
description_for_model?: string;
|
||||
description_for_human?: string;
|
||||
prompt?: string;
|
||||
model_config?: CustomModelConfig;
|
||||
}
|
||||
|
||||
/** copilot 侧上游可传递的 bot info. 对齐 bot 平台 bot info 的部分字段. */
|
||||
export interface CustomBotInfo {
|
||||
name?: string;
|
||||
description_for_model?: string;
|
||||
description_for_human?: string;
|
||||
prompt?: string;
|
||||
model_config?: CustomModelConfig;
|
||||
agent_info_map?: Record<string, CustomAgentInfo>;
|
||||
}
|
||||
|
||||
export interface CustomModelConfig {
|
||||
model_name?: ModelName;
|
||||
temperature?: number;
|
||||
max_tokens?: number;
|
||||
top_k?: number;
|
||||
top_p?: number;
|
||||
model_type?: Int64;
|
||||
model_id?: Int64;
|
||||
min_tokens?: number;
|
||||
frequency_penalty?: number;
|
||||
presence_penalty?: number;
|
||||
response_format?: number;
|
||||
ak?: string;
|
||||
sk?: string;
|
||||
endpoint?: string;
|
||||
}
|
||||
|
||||
/** 用户上传/bot生成的文件信息 */
|
||||
export interface FileInfo {
|
||||
name?: string;
|
||||
url?: string;
|
||||
uri?: string;
|
||||
md5?: string;
|
||||
type?: FileType;
|
||||
resource_id?: Int64;
|
||||
metadata?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ImageInfo {
|
||||
name?: string;
|
||||
/** 本期使用这里,先不用uri */
|
||||
url?: string;
|
||||
uri?: string;
|
||||
md5?: string;
|
||||
resource_id?: Int64;
|
||||
metadata?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface LocationInfo {
|
||||
Longitude?: number;
|
||||
Latitude?: number;
|
||||
city?: string;
|
||||
country?: string;
|
||||
province?: string;
|
||||
district?: string;
|
||||
town?: string;
|
||||
country_code?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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 AttributeValueType {
|
||||
Unknown = 0,
|
||||
String = 1,
|
||||
Boolean = 2,
|
||||
StringList = 11,
|
||||
BooleanList = 12,
|
||||
}
|
||||
|
||||
export enum ResourceType {
|
||||
Account = 1,
|
||||
Workspace = 2,
|
||||
App = 3,
|
||||
Bot = 4,
|
||||
Plugin = 5,
|
||||
Workflow = 6,
|
||||
Knowledge = 7,
|
||||
PersonalAccessToken = 8,
|
||||
Connector = 9,
|
||||
Card = 10,
|
||||
CardTemplate = 11,
|
||||
Conversation = 12,
|
||||
File = 13,
|
||||
ServicePrincipal = 14,
|
||||
Enterprise = 15,
|
||||
MigrateTask = 16,
|
||||
Prompt = 17,
|
||||
UI = 18,
|
||||
Project = 19,
|
||||
Database = 23,
|
||||
}
|
||||
|
||||
export interface AttributeValue {
|
||||
Type: AttributeValueType;
|
||||
Value: string;
|
||||
}
|
||||
|
||||
export interface ResourceIdentifier {
|
||||
/** 资源类型 */
|
||||
Type: ResourceType;
|
||||
/** 资源Id */
|
||||
Id: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,200 @@
|
||||
/*
|
||||
* 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 ActionKey {
|
||||
/** 复制 */
|
||||
Copy = 1,
|
||||
/** 删除 */
|
||||
Delete = 2,
|
||||
/** 启用/禁用 */
|
||||
EnableSwitch = 3,
|
||||
/** 编辑 */
|
||||
Edit = 4,
|
||||
/** 切换成funcflow */
|
||||
SwitchToFuncflow = 8,
|
||||
/** 切换成chatflow */
|
||||
SwitchToChatflow = 9,
|
||||
/** 跨空间复制 */
|
||||
CrossSpaceCopy = 10,
|
||||
}
|
||||
|
||||
export enum CopyStatus {
|
||||
Successful = 1,
|
||||
Processing = 2,
|
||||
Failed = 3,
|
||||
/** 如果是KeepOrigin,表示该资源不需要做变更,资源方不需要设置Target相关信息;引用方直接忽略即可 */
|
||||
KeepOrigin = 4,
|
||||
/** 表示回滚到草稿时,资源从有->无的变更 */
|
||||
Deleted = 5,
|
||||
}
|
||||
|
||||
export enum ProjectResourceActionKey {
|
||||
/** 重命名 */
|
||||
Rename = 1,
|
||||
/** 创建副本/复制到当前项目 */
|
||||
Copy = 2,
|
||||
/** 复制到资源库 */
|
||||
CopyToLibrary = 3,
|
||||
/** 移动到资源库 */
|
||||
MoveToLibrary = 4,
|
||||
/** 删除 */
|
||||
Delete = 5,
|
||||
/** 启用 */
|
||||
Enable = 6,
|
||||
/** 禁用 */
|
||||
Disable = 7,
|
||||
/** 切换成funcflow */
|
||||
SwitchToFuncflow = 8,
|
||||
/** 切换成chatflow */
|
||||
SwitchToChatflow = 9,
|
||||
/** 修改描述 */
|
||||
UpdateDesc = 10,
|
||||
}
|
||||
|
||||
export enum ProjectResourceGroupType {
|
||||
Workflow = 1,
|
||||
Plugin = 2,
|
||||
Data = 3,
|
||||
}
|
||||
|
||||
export enum PublishStatus {
|
||||
/** 未发布 */
|
||||
UnPublished = 1,
|
||||
/** 已发布 */
|
||||
Published = 2,
|
||||
}
|
||||
|
||||
export enum ResourceCopyScene {
|
||||
/** 复制项目内的资源,浅拷贝 */
|
||||
CopyProjectResource = 1,
|
||||
/** 复制项目资源到Library,复制后要发布 */
|
||||
CopyResourceToLibrary = 2,
|
||||
/** 移动项目资源到Library,复制后要发布,后置要删除项目资源 */
|
||||
MoveResourceToLibrary = 3,
|
||||
/** 复制Library资源到项目 */
|
||||
CopyResourceFromLibrary = 4,
|
||||
/** 复制项目,连带资源要复制。复制当前草稿。 */
|
||||
CopyProject = 5,
|
||||
/** 项目发布到渠道,连带资源需要发布(含商店)。以当前草稿发布。 */
|
||||
PublishProject = 6,
|
||||
/** 复制项目模板。 */
|
||||
CopyProjectTemplate = 7,
|
||||
/** 项目发布到模板,以项目的指定版本发布成临时模板。 */
|
||||
PublishProjectTemplate = 8,
|
||||
/** 模板审核通过,上架,根据临时模板复制正式模板。 */
|
||||
LaunchTemplate = 9,
|
||||
/** 草稿版本存档 */
|
||||
ArchiveProject = 10,
|
||||
/** 线上版本加载到草稿,草稿版本加载到草稿 */
|
||||
RollbackProject = 11,
|
||||
/** 单个资源跨空间复制 */
|
||||
CrossSpaceCopy = 12,
|
||||
/** 项目跨空间复制 */
|
||||
CrossSpaceCopyProject = 13,
|
||||
}
|
||||
|
||||
export enum ResType {
|
||||
Plugin = 1,
|
||||
Workflow = 2,
|
||||
Imageflow = 3,
|
||||
Knowledge = 4,
|
||||
UI = 5,
|
||||
Prompt = 6,
|
||||
Database = 7,
|
||||
Variable = 8,
|
||||
Voice = 9,
|
||||
}
|
||||
|
||||
export enum SyncOperation {
|
||||
Upsert = 1,
|
||||
Delete = 2,
|
||||
}
|
||||
|
||||
/** struct ResourceCopyExtraInfo{
|
||||
// 表示操作资源后,资源要改成该名称
|
||||
1 : optional string ResourceName (go.tag = "json:\"resource_name\"", agw.key = "resource_name")
|
||||
// 表示资源发布后的版本号
|
||||
2 : optional string VersionNum (go.tag = "json:\"version_num\"", agw.key = "version_num")
|
||||
// 该版本的版本描述
|
||||
3 : optional string VersionDesc (go.tag = "json:\"version_desc\"", agw.key = "version_desc")
|
||||
// 每个资源不同的信息,对插件,是个人信息收集声明。schema和各个资源方约定
|
||||
4 : optional string ResourceExtendInfo (go.tag = "json:\"resource_extend_info\"", agw.key = "resource_extend_info")
|
||||
} */
|
||||
export enum TaskStatus {
|
||||
Successed = 1,
|
||||
Processing = 2,
|
||||
Failed = 3,
|
||||
Canceled = 4,
|
||||
}
|
||||
|
||||
export interface ResourceCopyCheckFailedReason {
|
||||
ResourceLocator?: ResourceLocator;
|
||||
ResName?: string;
|
||||
Reason?: string;
|
||||
}
|
||||
|
||||
export interface ResourceCopyEnv {
|
||||
Scene?: ResourceCopyScene;
|
||||
/** 原项目ID。如果被复制的资源在项目中,则有值。场景:CopyProjectResource、CopyResourceToLibrary、MoveResourceToLibrary、CopyProject */
|
||||
OriginProjectID?: Int64;
|
||||
/** 目标项目ID。如果复制后的资源要赋值project_id,则有值。场景:CopyProjectResource、CopyResourceFromLibrary、CopyProject */
|
||||
TargetProjectID?: Int64;
|
||||
/** 被用户选择复制/移动的资源ID。如果操作的目标是资源,则有值。场景:CopyProjectResource、CopyResourceToLibrary、MoveResourceToLibrary、CopyResourceFromLibrary */
|
||||
ResourceLocator?: ResourceLocator;
|
||||
/** 当次任务的唯一约束,控制幂等。有则传,发起任务时不用传 */
|
||||
TaskUniqKey?: string;
|
||||
/** 项目发布时,项目版本。场景:PublishProject、PublishProjectTemplate */
|
||||
TargetProjectVersion?: Int64;
|
||||
OriginProjectSpaceID?: Int64;
|
||||
TargetProjectSpaceID?: Int64;
|
||||
/** 操作者用户id */
|
||||
CurrentUserID?: Int64;
|
||||
/** 发布模板时,原项目版本。or 复制模板时,模板的项目版本。 */
|
||||
OriginProjectVersion?: Int64;
|
||||
/** 0/default-app,默认是app也就是之前的project; 1-bot或者叫agent */
|
||||
ProjectType?: number;
|
||||
}
|
||||
|
||||
/** 每个资源的复制结果,包含前后映射信息 */
|
||||
export interface ResourceCopyResult {
|
||||
OriginResourceLocator?: ResourceLocator;
|
||||
TargetResourceLocator?: ResourceLocator;
|
||||
CopyStatus?: CopyStatus;
|
||||
/** 发布版本号或版本名,0.0.1 */
|
||||
TargetPublishVersionNum?: string;
|
||||
/** 其他的信息,比如plugin的tool映射信息。schema和各资源方约定 */
|
||||
TargetResInfo?: string;
|
||||
/** 复制不成功的原因 */
|
||||
FailedReason?: string;
|
||||
}
|
||||
|
||||
/** 用于定位一个资源数据的结构:某资源的某版本 */
|
||||
export interface ResourceLocator {
|
||||
ResID?: Int64;
|
||||
ResType?: ResType;
|
||||
/** 废弃,不要使用 */
|
||||
PublishVersion?: Int64;
|
||||
/** 资源的当前版本,为nil或空字符串都看作是最新版本。项目发布版本或Library发布版本。 */
|
||||
PublishVersionStr?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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 copilot_common from './copilot_common';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export enum PromptTemplateFormat {
|
||||
FString = 1,
|
||||
Jinja2 = 2,
|
||||
GoTemplate = 3,
|
||||
}
|
||||
|
||||
export enum ReferenceType {
|
||||
DocumentReference = 1,
|
||||
}
|
||||
|
||||
export enum ResultType {
|
||||
PluginResponse = 1,
|
||||
PluginIntent = 2,
|
||||
Variables = 3,
|
||||
None = 4,
|
||||
BotSchema = 5,
|
||||
ReferenceVariable = 6,
|
||||
}
|
||||
|
||||
export enum RetrieverType {
|
||||
Plugin = 1,
|
||||
PluginAsService = 2,
|
||||
Service = 3,
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
conversation_id?: Int64;
|
||||
section_id?: Int64;
|
||||
message_id?: Int64;
|
||||
content?: string;
|
||||
role?: copilot_common.CopilotRole;
|
||||
location?: copilot_common.LocationInfo;
|
||||
files?: Array<copilot_common.FileInfo>;
|
||||
images?: Array<copilot_common.ImageInfo>;
|
||||
}
|
||||
|
||||
export interface RetrieveResult {
|
||||
result_type?: ResultType;
|
||||
/** json string */
|
||||
content?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* 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 InputType {
|
||||
TextInput = 0,
|
||||
Select = 1,
|
||||
UploadImage = 2,
|
||||
UploadDoc = 3,
|
||||
UploadTable = 4,
|
||||
UploadAudio = 5,
|
||||
MixUpload = 6,
|
||||
VIDEO = 7,
|
||||
ARCHIVE = 8,
|
||||
CODE = 9,
|
||||
TXT = 10,
|
||||
PPT = 11,
|
||||
}
|
||||
|
||||
export enum SendType {
|
||||
/** 直接发query */
|
||||
SendTypeQuery = 0,
|
||||
/** 使用面板 */
|
||||
SendTypePanel = 1,
|
||||
}
|
||||
|
||||
export enum ToolType {
|
||||
/** 使用WorkFlow */
|
||||
ToolTypeWorkFlow = 1,
|
||||
/** 使用插件 */
|
||||
ToolTypePlugin = 2,
|
||||
}
|
||||
|
||||
export interface Components {
|
||||
/** panel参数 */
|
||||
name?: string;
|
||||
description?: string;
|
||||
input_type?: InputType;
|
||||
/** 请求工具时,参数的key */
|
||||
parameter?: string;
|
||||
options?: Array<string>;
|
||||
default_value?: DefaultValue;
|
||||
/** 是否隐藏不展示 */
|
||||
hide?: boolean;
|
||||
/** input_type为MixUpload时,支持哪些类型 */
|
||||
upload_options?: Array<InputType>;
|
||||
}
|
||||
|
||||
export interface DefaultValue {
|
||||
value?: string;
|
||||
type?: InputType;
|
||||
}
|
||||
|
||||
export interface ShortcutCommand {
|
||||
/** 绑定实体ID */
|
||||
object_id?: string;
|
||||
/** 命令名称 */
|
||||
command_name?: string;
|
||||
/** 快捷指令 */
|
||||
shortcut_command?: string;
|
||||
/** 描述 */
|
||||
description?: string;
|
||||
/** 发送类型 */
|
||||
send_type?: SendType;
|
||||
/** 使用工具type */
|
||||
tool_type?: ToolType;
|
||||
work_flow_id?: string;
|
||||
plugin_id?: string;
|
||||
plugin_api_name?: string;
|
||||
/** 模板query */
|
||||
template_query?: string;
|
||||
/** panel参数 */
|
||||
components_list?: Array<Components>;
|
||||
/** 表单的schema */
|
||||
card_schema?: string;
|
||||
/** 指令ID */
|
||||
command_id?: string;
|
||||
/** 工具信息 包含name+变量列表+... */
|
||||
tool_info?: ToolInfo;
|
||||
/** 指令图标 */
|
||||
shortcut_icon?: ShortcutFileInfo;
|
||||
/** multi的指令时,该指令由哪个节点执行 */
|
||||
agent_id?: string;
|
||||
}
|
||||
|
||||
export interface ShortcutFileInfo {
|
||||
url?: string;
|
||||
uri?: string;
|
||||
}
|
||||
|
||||
export interface ToolInfo {
|
||||
tool_name?: string;
|
||||
/** 变量列表 插件&workFLow */
|
||||
tool_params_list?: Array<ToolParams>;
|
||||
}
|
||||
|
||||
export interface ToolParams {
|
||||
/** 参数列表 */
|
||||
name?: string;
|
||||
required?: boolean;
|
||||
desc?: string;
|
||||
type?: string;
|
||||
/** 默认值 */
|
||||
default_value?: string;
|
||||
/** 是否是panel参数 */
|
||||
refer_component?: boolean;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,422 @@
|
||||
/*
|
||||
* 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 connector from './namespaces/connector';
|
||||
import * as feishu_base from './namespaces/feishu_base';
|
||||
import * as open_api from './namespaces/open_api';
|
||||
|
||||
export { base, connector, feishu_base, open_api };
|
||||
export * from './namespaces/base';
|
||||
export * from './namespaces/connector';
|
||||
export * from './namespaces/feishu_base';
|
||||
export * from './namespaces/open_api';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export default class ConnectorApiService<T> {
|
||||
private request: any = () => {
|
||||
throw new Error('ConnectorApiService.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);
|
||||
}
|
||||
|
||||
/** GET /api/connector_api/get_feishu_base_config */
|
||||
GetFeishuBaseConfig(
|
||||
req: feishu_base.GetFeishuBaseConfigRequest,
|
||||
options?: T,
|
||||
): Promise<feishu_base.GetFeishuBaseConfigResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/api/connector_api/get_feishu_base_config');
|
||||
const method = 'GET';
|
||||
const params = { bot_id: _req['bot_id'] };
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /open_api/v1/connector/update_connector_bot
|
||||
*
|
||||
* 渠道 OpenAPI
|
||||
*/
|
||||
OpenAPIUpdateConnectorBot(
|
||||
req: open_api.OpenAPIUpdateConnectorBotRequest,
|
||||
options?: T,
|
||||
): Promise<open_api.OpenAPIUpdateConnectorBotResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/open_api/v1/connector/update_connector_bot');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bot_id: _req['bot_id'],
|
||||
audit_status: _req['audit_status'],
|
||||
reason: _req['reason'],
|
||||
share_link: _req['share_link'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** GET /api/connector/oauth_config/get_schema */
|
||||
GetOauthConfigSchema(
|
||||
req?: connector.GetOauthConfigSchemaRequest,
|
||||
options?: T,
|
||||
): Promise<connector.GetOauthConfigSchemaResponse> {
|
||||
const url = this.genBaseURL('/api/connector/oauth_config/get_schema');
|
||||
const method = 'GET';
|
||||
return this.request({ url, method }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector/oauth_config/update */
|
||||
UpdateOauthConfig(
|
||||
req?: connector.UpdateOauthConfigRequest,
|
||||
options?: T,
|
||||
): Promise<connector.UpdateOauthConfigResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/oauth_config/update');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
connector_id: _req['connector_id'],
|
||||
oauth_config: _req['oauth_config'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector/create */
|
||||
CreateConnector(
|
||||
req?: connector.CreateConnectorRequest,
|
||||
options?: T,
|
||||
): Promise<connector.CreateConnectorResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/create');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
connector_title: _req['connector_title'],
|
||||
connector_desc: _req['connector_desc'],
|
||||
connector_icon_uri: _req['connector_icon_uri'],
|
||||
oauth_app_id: _req['oauth_app_id'],
|
||||
callback_url: _req['callback_url'],
|
||||
space_id_list: _req['space_id_list'],
|
||||
account_id: _req['account_id'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector/update */
|
||||
UpdateConnector(
|
||||
req?: connector.UpdateConnectorRequest,
|
||||
options?: T,
|
||||
): Promise<connector.UpdateConnectorResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/update');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
id: _req['id'],
|
||||
connector_title: _req['connector_title'],
|
||||
connector_desc: _req['connector_desc'],
|
||||
connector_icon_uri: _req['connector_icon_uri'],
|
||||
oauth_app_id: _req['oauth_app_id'],
|
||||
callback_url: _req['callback_url'],
|
||||
space_id_list: _req['space_id_list'],
|
||||
account_id: _req['account_id'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector/delete */
|
||||
DeleteConnector(
|
||||
req?: connector.DeleteConnectorRequest,
|
||||
options?: T,
|
||||
): Promise<connector.DeleteConnectorResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/delete');
|
||||
const method = 'POST';
|
||||
const data = { id: _req['id'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector/list */
|
||||
ListConnector(
|
||||
req?: connector.ListConnectorRequest,
|
||||
options?: T,
|
||||
): Promise<connector.ListConnectorResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/list');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
page_token: _req['page_token'],
|
||||
page_size: _req['page_size'],
|
||||
account_id: _req['account_id'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector_api/update_feishu_base_complete_status */
|
||||
UpdateFeishuBaseCompleteStatus(
|
||||
req: feishu_base.UpdateFeishuBaseCompleteStatusRequest,
|
||||
options?: T,
|
||||
): Promise<feishu_base.UpdateFeishuBaseCompleteStatusResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL(
|
||||
'/api/connector_api/update_feishu_base_complete_status',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = { bot_id: _req['bot_id'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/connector/create_preview_version
|
||||
*
|
||||
* 预览
|
||||
*/
|
||||
CreatePreviewVersion(
|
||||
req: connector.CreatePreviewVersionRequest,
|
||||
options?: T,
|
||||
): Promise<connector.CreatePreviewVersionResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/api/connector/create_preview_version');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
agent_id: _req['agent_id'],
|
||||
agent_type: _req['agent_type'],
|
||||
connector_ids: _req['connector_ids'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
const headers = {
|
||||
'COZE-WX-TEMPLATE-ID': _req['COZE-WX-TEMPLATE-ID'],
|
||||
'COZE-DY-TEMPLATE-ID': _req['COZE-DY-TEMPLATE-ID'],
|
||||
};
|
||||
return this.request({ url, method, data, headers }, options);
|
||||
}
|
||||
|
||||
/** GET /api/connector/get_preview_connector */
|
||||
GetPreviewConnector(
|
||||
req?: connector.GetPreviewConnectorRequest,
|
||||
options?: T,
|
||||
): Promise<connector.GetPreviewConnectorResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/get_preview_connector');
|
||||
const method = 'GET';
|
||||
const params = { Base: _req['Base'] };
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/** POST /v1/connectors/:connector_id/install */
|
||||
OpenAPIInstallConnectorToWorkspace(
|
||||
req: open_api.OpenAPIInstallConnectorToWorkspaceRequest,
|
||||
options?: T,
|
||||
): Promise<open_api.OpenAPIInstallConnectorToWorkspaceResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL(
|
||||
`/v1/connectors/${_req['connector_id']}/install`,
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = { workspace_id: _req['workspace_id'], Base: _req['Base'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /v1/connectors/:connector_id/user_configs */
|
||||
OpenAPIBindConnectorUserConfig(
|
||||
req: open_api.OpenAPIBindConnectorUserConfigRequest,
|
||||
options?: T,
|
||||
): Promise<open_api.OpenAPIBindConnectorUserConfigResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL(
|
||||
`/v1/connectors/${_req['connector_id']}/user_configs`,
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = { configs: _req['configs'], Base: _req['Base'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector/bind_space */
|
||||
BindSpaceConnector(
|
||||
req?: connector.BindSpaceConnectorRequest,
|
||||
options?: T,
|
||||
): Promise<connector.BindSpaceConnectorResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/bind_space');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
connector_id_list: _req['connector_id_list'],
|
||||
space_id: _req['space_id'],
|
||||
uninstall: _req['uninstall'],
|
||||
space_id_list: _req['space_id_list'],
|
||||
account_id: _req['account_id'],
|
||||
operate_all_space: _req['operate_all_space'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector/space_connector/list */
|
||||
ListSpaceConnector(
|
||||
req?: connector.ListSpaceConnectorRequest,
|
||||
options?: T,
|
||||
): Promise<connector.ListSpaceConnectorResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/space_connector/list');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
page_token: _req['page_token'],
|
||||
page_size: _req['page_size'],
|
||||
connector_type: _req['connector_type'],
|
||||
search_word: _req['search_word'],
|
||||
space_id: _req['space_id'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/connector/account_connector/manage
|
||||
*
|
||||
* ManageAccountConnector 管理企业渠道
|
||||
*/
|
||||
ManageAccountConnector(
|
||||
req?: connector.ManageAccountConnectorRequest,
|
||||
options?: T,
|
||||
): Promise<connector.ManageAccountConnectorResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/account_connector/manage');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
account_id: _req['account_id'],
|
||||
connector_id_list: _req['connector_id_list'],
|
||||
action: _req['action'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/connector/account_connector/list
|
||||
*
|
||||
* 企业渠道管理
|
||||
*
|
||||
* GetAccountConnectorList 获取企业渠道列表
|
||||
*/
|
||||
GetAccountConnectorList(
|
||||
req?: connector.GetAccountConnectorListRequest,
|
||||
options?: T,
|
||||
): Promise<connector.GetAccountConnectorListResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/account_connector/list');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
page_token: _req['page_token'],
|
||||
page_size: _req['page_size'],
|
||||
search_word: _req['search_word'],
|
||||
space_id: _req['space_id'],
|
||||
connector_type: _req['connector_type'],
|
||||
account_id: _req['account_id'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/connector/space_connector/status
|
||||
*
|
||||
* GetSpaceConnectorStatus 获取空间下渠道的安装状态
|
||||
*/
|
||||
GetSpaceConnectorStatus(
|
||||
req?: connector.GetSpaceConnectorStatusRequest,
|
||||
options?: T,
|
||||
): Promise<connector.GetSpaceConnectorStatusResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/space_connector/status');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
connector_id: _req['connector_id'],
|
||||
space_id_list: _req['space_id_list'],
|
||||
account_id: _req['account_id'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/** GET /api/connector/list_mini_program_domain */
|
||||
ListMiniProgramDomain(
|
||||
req?: connector.ListMiniProgramDomainRequest,
|
||||
options?: T,
|
||||
): Promise<connector.ListMiniProgramDomainResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/list_mini_program_domain');
|
||||
const method = 'GET';
|
||||
const params = {
|
||||
enterprise_id: _req['enterprise_id'],
|
||||
connector_id: _req['connector_id'],
|
||||
search_word: _req['search_word'],
|
||||
};
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/connector/set_mini_program_domain
|
||||
*
|
||||
* 小程序域名管理
|
||||
*/
|
||||
SetMiniProgramDomain(
|
||||
req?: connector.SetMiniProgramDomainRequest,
|
||||
options?: T,
|
||||
): Promise<connector.SetMiniProgramDomainResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/connector/set_mini_program_domain');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
enterprise_id: _req['enterprise_id'],
|
||||
domain_list: _req['domain_list'],
|
||||
action: _req['action'],
|
||||
connector_id: _req['connector_id'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/connector/update_mini_program_domain */
|
||||
UpdateMiniProgramDomain(
|
||||
req: connector.UpdateMiniProgramDomainRequest,
|
||||
options?: T,
|
||||
): Promise<connector.UpdateMiniProgramDomainResponse> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/api/connector/update_mini_program_domain');
|
||||
const method = 'POST';
|
||||
const data = { id: _req['id'], domain: _req['domain'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -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 {
|
||||
LogID?: string;
|
||||
Caller?: string;
|
||||
Addr?: string;
|
||||
Client?: string;
|
||||
TrafficEnv?: TrafficEnv;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface BaseResp {
|
||||
StatusMessage?: string;
|
||||
StatusCode?: number;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface TrafficEnv {
|
||||
Open?: boolean;
|
||||
Env?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,436 @@
|
||||
/*
|
||||
* 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 ConnectorPublicType {
|
||||
Unknown = 0,
|
||||
Private = 1,
|
||||
Public = 2,
|
||||
}
|
||||
|
||||
export enum ManageAccountConnectorAction {
|
||||
/** 添加渠道 */
|
||||
Add = 0,
|
||||
/** 移除渠道 */
|
||||
Remove = 1,
|
||||
}
|
||||
|
||||
export enum MiniProgramDomainAction {
|
||||
/** 添加域名 */
|
||||
Add = 0,
|
||||
/** 移除域名 */
|
||||
Remove = 1,
|
||||
}
|
||||
|
||||
export enum SpaceConnectorType {
|
||||
/** 团队内自定义渠道 */
|
||||
Team = 1,
|
||||
/** 所有的公开渠道 */
|
||||
Public = 2,
|
||||
/** 官方渠道 */
|
||||
Official = 3,
|
||||
/** 已安装的公开渠道 */
|
||||
InstalledPublic = 4,
|
||||
}
|
||||
|
||||
export interface AccountConnector {
|
||||
/** 发布平台 connector_id */
|
||||
id?: string;
|
||||
/** 发布平台名称 */
|
||||
name?: string;
|
||||
/** 发布平台图标 */
|
||||
icon_url?: string;
|
||||
/** 发布平台图标 uri(更新可能会回传) */
|
||||
icon_uri?: string;
|
||||
/** 发布平台描述 */
|
||||
desc?: string;
|
||||
/** 0-智能体,1-应用 */
|
||||
agent_type?: Array<Int64>;
|
||||
/** 渠道类型, 1 自定义渠道, 2.公开渠道, 3.官方渠道 */
|
||||
connector_type?: SpaceConnectorType;
|
||||
/** 账号下已添加该渠道的空间数量 */
|
||||
added_space_count?: Int64;
|
||||
/** 账号下空间数量 */
|
||||
total_space_count?: Int64;
|
||||
/** 按空间查看时,展示渠道是否添加到该空间 */
|
||||
is_added_to_space?: boolean;
|
||||
/** 是否已添加到账号 */
|
||||
is_added_to_account?: boolean;
|
||||
/** 不允许安装 */
|
||||
cannot_install?: boolean;
|
||||
/** 详情页链接 */
|
||||
detail_url?: string;
|
||||
}
|
||||
|
||||
export interface BindSpaceConnectorRequest {
|
||||
connector_id_list?: Array<string>;
|
||||
space_id?: string;
|
||||
/** 卸载 */
|
||||
uninstall?: boolean;
|
||||
/** 空间列表 */
|
||||
space_id_list?: Array<string>;
|
||||
/** 组织账号ID */
|
||||
account_id?: string;
|
||||
/** 支持渠道在组织账号下的空间全部开启、全部关闭按钮 */
|
||||
operate_all_space?: boolean;
|
||||
}
|
||||
|
||||
export interface BindSpaceConnectorResponse {
|
||||
/** key: connector_id, value: 是否成功 */
|
||||
manage_result?: Record<string, boolean>;
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface ConnectorMetaInfo {
|
||||
/** 发布平台 connector_id */
|
||||
id?: string;
|
||||
/** 发布平台名称 */
|
||||
name?: string;
|
||||
/** 发布平台图标 */
|
||||
icon_url?: string;
|
||||
/** 发布平台图标 uri(更新可能会回传) */
|
||||
icon_uri?: string;
|
||||
/** 发布平台描述 */
|
||||
desc?: string;
|
||||
/** 公开类型 */
|
||||
public_type?: ConnectorPublicType;
|
||||
/** token 在获取列表时返回 */
|
||||
callback_url?: string;
|
||||
/** 发布空间 */
|
||||
space_id_list?: Array<string>;
|
||||
/** callback 用来校验签名的 token */
|
||||
callback_token?: string;
|
||||
/** oauth 配置 */
|
||||
oauth_config?: string;
|
||||
/** 创建时间 */
|
||||
create_time?: Int64;
|
||||
/** oauth 应用 id */
|
||||
oauth_app_id?: string;
|
||||
/** 是否添加到账号 */
|
||||
is_added_to_account?: boolean;
|
||||
}
|
||||
|
||||
export interface CopyLinkAreaInfo {
|
||||
link_list?: Array<CopyLinkItem>;
|
||||
/** 链接区域标题文本 */
|
||||
title_text?: string;
|
||||
/** 链接区域标题下描述 */
|
||||
description?: string;
|
||||
/** 步骤号,只是展示指定的步骤号,不影响SchemaArea的展示顺序。 */
|
||||
step_order?: Int64;
|
||||
}
|
||||
|
||||
export interface CopyLinkItem {
|
||||
/** copy link名称 */
|
||||
title?: string;
|
||||
link?: string;
|
||||
}
|
||||
|
||||
export interface CreateConnectorRequest {
|
||||
connector_title?: string;
|
||||
connector_desc?: string;
|
||||
connector_icon_uri?: string;
|
||||
oauth_app_id?: string;
|
||||
callback_url?: string;
|
||||
space_id_list?: Array<string>;
|
||||
account_id?: string;
|
||||
}
|
||||
|
||||
export interface CreateConnectorResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
callback_token?: string;
|
||||
}
|
||||
|
||||
export interface CreatePreviewVersionRequest {
|
||||
agent_id: string;
|
||||
/** 0-bot,1-project */
|
||||
agent_type: Int64;
|
||||
connector_ids?: Array<string>;
|
||||
'COZE-WX-TEMPLATE-ID'?: number;
|
||||
'COZE-DY-TEMPLATE-ID'?: number;
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface CreatePreviewVersionResponse {
|
||||
/** key: connector_id, value: link */
|
||||
preview_link_map?: Record<Int64, string>;
|
||||
BaseResp?: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface DeleteConnectorRequest {
|
||||
id?: string;
|
||||
}
|
||||
|
||||
export interface DeleteConnectorResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface FormSchemaItem {
|
||||
/** 提交字段key */
|
||||
name?: string;
|
||||
/** 展示字段名称 */
|
||||
title?: string;
|
||||
/** 'Input' | 'InputNumber' |'Select' | 'Radio' | 'Checkbox'; 渲染组件 */
|
||||
component?: string;
|
||||
/** Options[]当为'Select' | 'Radio' | 'Checkbox' 时提供 枚举值 */
|
||||
enums?: Array<Options>;
|
||||
/** 'string' | 'number' | 'boolean'; 字段类型 (目前没有 array / object场景,暂不考虑 array / object) */
|
||||
type?: string;
|
||||
/** 校验规则 */
|
||||
rules?: Array<FormSchemaRule>;
|
||||
/** 提示 */
|
||||
placeholder?: string;
|
||||
}
|
||||
|
||||
export interface FormSchemaRule {
|
||||
/** string最大长度 */
|
||||
max?: number;
|
||||
/** string最小长度 */
|
||||
min?: number;
|
||||
/** string精准长度 */
|
||||
len?: number;
|
||||
/** 正则 */
|
||||
pattern?: string;
|
||||
/** 校验错误时的提示信息,走 starling 配置 */
|
||||
message?: string;
|
||||
/** 是否必填 */
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
export interface GetAccountConnectorListRequest {
|
||||
page_token?: string;
|
||||
page_size?: number;
|
||||
/** 渠道搜索词 */
|
||||
search_word?: string;
|
||||
space_id?: string;
|
||||
connector_type?: SpaceConnectorType;
|
||||
/** 组织账号ID */
|
||||
account_id?: string;
|
||||
}
|
||||
|
||||
export interface GetAccountConnectorListResponse {
|
||||
data?: Array<AccountConnector>;
|
||||
has_more?: boolean;
|
||||
next_page_token?: string;
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface GetOauthConfigSchemaRequest {}
|
||||
|
||||
export interface GetOauthConfigSchemaResponse {
|
||||
oauth_schema?: OauthSchema;
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface GetPreviewConnectorRequest {
|
||||
Base?: base.Base;
|
||||
}
|
||||
|
||||
export interface GetPreviewConnectorResponse {
|
||||
connector_list?: Array<string>;
|
||||
BaseResp?: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface GetSpaceConnectorStatusRequest {
|
||||
connector_id?: string;
|
||||
space_id_list?: Array<string>;
|
||||
/** 组织账号ID */
|
||||
account_id?: string;
|
||||
}
|
||||
|
||||
export interface GetSpaceConnectorStatusResponse {
|
||||
/** key: space_id, value: 绑定状态,1-已绑定 */
|
||||
bind_status_map?: Record<string, number>;
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface ListConnectorRequest {
|
||||
page_token?: string;
|
||||
page_size?: number;
|
||||
account_id?: string;
|
||||
}
|
||||
|
||||
export interface ListConnectorResponse {
|
||||
data?: Array<ConnectorMetaInfo>;
|
||||
has_more?: boolean;
|
||||
next_page_token?: string;
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface ListMiniProgramDomainRequest {
|
||||
/** 企业ID */
|
||||
enterprise_id?: string;
|
||||
/** 渠道ID */
|
||||
connector_id?: string;
|
||||
/** 搜索词 */
|
||||
search_word?: string;
|
||||
}
|
||||
|
||||
export interface ListMiniProgramDomainResponse {
|
||||
data?: Array<MiniProgramDomain>;
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface ListSpaceConnectorRequest {
|
||||
page_token?: string;
|
||||
page_size?: number;
|
||||
connector_type?: SpaceConnectorType;
|
||||
search_word?: string;
|
||||
space_id?: string;
|
||||
}
|
||||
|
||||
export interface ListSpaceConnectorResponse {
|
||||
data?: Array<SpaceConnector>;
|
||||
has_more?: boolean;
|
||||
next_page_token?: string;
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface ManageAccountConnectorRequest {
|
||||
account_id?: string;
|
||||
connector_id_list?: Array<string>;
|
||||
/** 添加或移除渠道 */
|
||||
action?: ManageAccountConnectorAction;
|
||||
}
|
||||
|
||||
export interface ManageAccountConnectorResponse {
|
||||
/** key: connector_id, value: 是否成功 */
|
||||
manage_result?: Record<string, boolean>;
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface MiniProgramDomain {
|
||||
id?: string;
|
||||
domain?: string;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
export interface OauthSchema {
|
||||
schema_area?: SchemaAreaInfo;
|
||||
copy_link_area?: CopyLinkAreaInfo;
|
||||
title_text?: string;
|
||||
start_text?: string;
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
label?: string;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export interface SchemaAreaInfo {
|
||||
schema_list?: Array<FormSchemaItem>;
|
||||
/** 输入信息区域标题文本 */
|
||||
title_text?: string;
|
||||
/** 输入信息区域标题下描述 */
|
||||
description?: string;
|
||||
/** 步骤号,只是展示指定的步骤号,不影响SchemaArea的展示顺序。 */
|
||||
step_order?: Int64;
|
||||
}
|
||||
|
||||
export interface SetMiniProgramDomainRequest {
|
||||
/** 企业ID */
|
||||
enterprise_id?: string;
|
||||
domain_list?: Array<string>;
|
||||
action?: MiniProgramDomainAction;
|
||||
/** 渠道ID */
|
||||
connector_id?: string;
|
||||
}
|
||||
|
||||
export interface SetMiniProgramDomainResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface SpaceConnector {
|
||||
/** 发布平台 connector_id */
|
||||
id?: string;
|
||||
/** 发布平台名称 */
|
||||
name?: string;
|
||||
/** 发布平台图标 */
|
||||
icon_url?: string;
|
||||
/** 发布平台图标 uri(更新可能会回传) */
|
||||
icon_uri?: string;
|
||||
/** 发布平台描述 */
|
||||
desc?: string;
|
||||
/** 详情页链接 */
|
||||
detail_url?: string;
|
||||
/** 是否已添加 */
|
||||
is_added?: boolean;
|
||||
/** 0-智能体,1-应用 */
|
||||
agent_type?: Array<Int64>;
|
||||
/** 渠道类型, 1 团队内自定义渠道,2.公开渠道, 3.官方渠道 4,已安装的公开渠道 */
|
||||
connector_type?: SpaceConnectorType;
|
||||
/** 不允许下载 */
|
||||
cannot_install?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateConnectorRequest {
|
||||
id?: string;
|
||||
connector_title?: string;
|
||||
connector_desc?: string;
|
||||
connector_icon_uri?: string;
|
||||
oauth_app_id?: string;
|
||||
callback_url?: string;
|
||||
space_id_list?: Array<string>;
|
||||
account_id?: string;
|
||||
}
|
||||
|
||||
export interface UpdateConnectorResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
callback_token?: string;
|
||||
}
|
||||
|
||||
export interface UpdateMiniProgramDomainRequest {
|
||||
id: string;
|
||||
domain: string;
|
||||
}
|
||||
|
||||
export interface UpdateMiniProgramDomainResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface UpdateOauthConfigRequest {
|
||||
/** 渠道 ID */
|
||||
connector_id?: string;
|
||||
/** oauth 配置 */
|
||||
oauth_config?: string;
|
||||
}
|
||||
|
||||
export interface UpdateOauthConfigResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
* 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 InputComponentType {
|
||||
/** 文本输入框,图 4 控件 */
|
||||
Text = 1,
|
||||
/** 单选,图 4 控件 */
|
||||
SingleSelect = 2,
|
||||
/** 多选,图 4 控件 */
|
||||
MultiSelect = 3,
|
||||
/** 字段选择器,图 4 控件 */
|
||||
FieldSelector = 4,
|
||||
}
|
||||
|
||||
export enum OutputSubComponentType {
|
||||
/** 没有子 component */
|
||||
None = 0,
|
||||
/** 输出类型为 object */
|
||||
Object = 1,
|
||||
}
|
||||
|
||||
/** base 就是多维表格的英文名。所以飞书多维表格是 FeishuBase */
|
||||
export interface FeishuBaseConfig {
|
||||
/** markdown,对应“#配置多维飞书表格\n将你的...“ */
|
||||
description: string;
|
||||
/** 所有类型 id 到 info 的映射 */
|
||||
output_type_list: Array<OutputTypeInfo>;
|
||||
output_type: number;
|
||||
/** markdown, 对应“捷径输出类型”旁边的 i */
|
||||
output_desc?: string;
|
||||
output_sub_component: OutputSubComponent;
|
||||
input_config: Array<InputConfig>;
|
||||
/** markdown, 对应“配置多维表格字段”旁边的 i */
|
||||
input_desc?: string;
|
||||
input_type_list: Array<InputTypeInfo>;
|
||||
/** 输出类型选中 object 后,object value 可选的类型列表 */
|
||||
object_value_type_list: Array<OutputTypeInfo>;
|
||||
/** 完善上架信息, */
|
||||
to_complete_info?: ToCompleteInfo;
|
||||
}
|
||||
|
||||
export interface GetFeishuBaseConfigRequest {
|
||||
bot_id: string;
|
||||
}
|
||||
|
||||
export interface GetFeishuBaseConfigResponse {
|
||||
config?: FeishuBaseConfig;
|
||||
code: number;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
export interface InputComponent {
|
||||
type: InputComponentType;
|
||||
/** 仅 Type == Text 有用 */
|
||||
max_char?: number;
|
||||
/** Type in [SingleSelect, MultiSelect] */
|
||||
choice?: Array<string>;
|
||||
/** Type == FieldSelector */
|
||||
supported_type?: Array<number>;
|
||||
}
|
||||
|
||||
export interface InputConfig {
|
||||
field: string;
|
||||
title: string;
|
||||
placeholder?: string;
|
||||
input_component: InputComponent;
|
||||
required?: boolean;
|
||||
/** markdown, 对应 user_query 旁边的 i */
|
||||
desc?: string;
|
||||
/** 失效了。需要重新配置的时候才会出现 */
|
||||
invalid?: boolean;
|
||||
}
|
||||
|
||||
export interface InputTypeInfo {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface OutputSubComponent {
|
||||
type: OutputSubComponentType;
|
||||
/** 仅 Type == object 会有 */
|
||||
item_list?: Array<OutputSubComponentItem>;
|
||||
/** eg: 结构化输出配置右边的 i */
|
||||
struct_output_desc?: string;
|
||||
/** 结构化输出,id 列的说明 */
|
||||
struct_id_desc?: string;
|
||||
/** 结构化输出,主属性说明 */
|
||||
struct_primary_desc?: string;
|
||||
}
|
||||
|
||||
export interface OutputSubComponentItem {
|
||||
key: string;
|
||||
/** 同 FeishuBaseConfig.OutputType */
|
||||
output_type: number;
|
||||
/** 主属性, 标记该属性为用于排序的主属性。 */
|
||||
is_primary?: boolean;
|
||||
/** 标记该属性会作为Object字段的筛选、分组依据。 */
|
||||
is_group_by_key?: boolean;
|
||||
}
|
||||
|
||||
export interface OutputTypeInfo {
|
||||
/** 会增加,就不整成 enum 了。 */
|
||||
id: number;
|
||||
/** 名称,例如“文本”,“对象”等 */
|
||||
name: string;
|
||||
/** markdown, 对应图 3 中 “需要在 Persona ...“ */
|
||||
tips?: string;
|
||||
}
|
||||
|
||||
export interface ToCompleteInfo {
|
||||
/** 完善信息的填写地址 */
|
||||
url: string;
|
||||
/** 是否填好 */
|
||||
completed: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateFeishuBaseCompleteStatusRequest {
|
||||
bot_id: string;
|
||||
}
|
||||
|
||||
export interface UpdateFeishuBaseCompleteStatusResponse {
|
||||
code: number;
|
||||
msg?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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 ConnectorAuditStatus {
|
||||
/** 未知、无审核 */
|
||||
Unknown = 0,
|
||||
/** 审核中 */
|
||||
Progress = 1,
|
||||
/** 审核通过 */
|
||||
Audited = 2,
|
||||
/** 审核拒绝 */
|
||||
Reject = 3,
|
||||
}
|
||||
|
||||
export interface OpenAPIBindConnectorUserConfigRequest {
|
||||
connector_id?: string;
|
||||
configs?: Array<UserConfig>;
|
||||
Base: base.Base;
|
||||
}
|
||||
|
||||
export interface OpenAPIBindConnectorUserConfigResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface OpenAPIInstallConnectorToWorkspaceRequest {
|
||||
workspace_id?: string;
|
||||
connector_id?: string;
|
||||
Base: base.Base;
|
||||
}
|
||||
|
||||
export interface OpenAPIInstallConnectorToWorkspaceResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface OpenAPIUpdateConnectorBotRequest {
|
||||
bot_id?: string;
|
||||
audit_status?: ConnectorAuditStatus;
|
||||
reason?: string;
|
||||
share_link?: string;
|
||||
connector_id?: string;
|
||||
Base: base.Base;
|
||||
}
|
||||
|
||||
export interface OpenAPIUpdateConnectorBotResponse {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
BaseResp: base.BaseResp;
|
||||
}
|
||||
|
||||
export interface UserConfig {
|
||||
key?: string;
|
||||
enums?: Array<UserConfigEnum>;
|
||||
}
|
||||
|
||||
export interface UserConfigEnum {
|
||||
value?: string;
|
||||
label?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -0,0 +1,522 @@
|
||||
/*
|
||||
* 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_debugger_coze from './namespaces/flow_devops_debugger_coze';
|
||||
import * as flow_devops_debugger_ping from './namespaces/flow_devops_debugger_ping';
|
||||
import * as flow_devops_evaluation_callback_common from './namespaces/flow_devops_evaluation_callback_common';
|
||||
import * as flow_devops_evaluation_entity from './namespaces/flow_devops_evaluation_entity';
|
||||
import * as flow_devops_evaluation_evaluator_callback from './namespaces/flow_devops_evaluation_evaluator_callback';
|
||||
import * as flow_devops_evaluation_object_callback from './namespaces/flow_devops_evaluation_object_callback';
|
||||
import * as flow_devops_ob_query_telemetry from './namespaces/flow_devops_ob_query_telemetry';
|
||||
import * as flow_devops_ob_query_telemetry_common from './namespaces/flow_devops_ob_query_telemetry_common';
|
||||
import * as flow_devops_ob_query_telemetry_field_filter from './namespaces/flow_devops_ob_query_telemetry_field_filter';
|
||||
import * as flow_devops_ob_query_telemetry_span from './namespaces/flow_devops_ob_query_telemetry_span';
|
||||
import * as infra from './namespaces/infra';
|
||||
import * as mockset from './namespaces/mockset';
|
||||
import * as run_event from './namespaces/run_event';
|
||||
import * as structure_gen from './namespaces/structure_gen';
|
||||
import * as testcase from './namespaces/testcase';
|
||||
|
||||
export {
|
||||
base,
|
||||
flow_devops_debugger_coze,
|
||||
flow_devops_debugger_ping,
|
||||
flow_devops_evaluation_callback_common,
|
||||
flow_devops_evaluation_entity,
|
||||
flow_devops_evaluation_evaluator_callback,
|
||||
flow_devops_evaluation_object_callback,
|
||||
flow_devops_ob_query_telemetry,
|
||||
flow_devops_ob_query_telemetry_common,
|
||||
flow_devops_ob_query_telemetry_field_filter,
|
||||
flow_devops_ob_query_telemetry_span,
|
||||
infra,
|
||||
mockset,
|
||||
run_event,
|
||||
structure_gen,
|
||||
testcase,
|
||||
};
|
||||
export * from './namespaces/base';
|
||||
export * from './namespaces/flow_devops_debugger_coze';
|
||||
export * from './namespaces/flow_devops_debugger_ping';
|
||||
export * from './namespaces/flow_devops_evaluation_callback_common';
|
||||
export * from './namespaces/flow_devops_evaluation_entity';
|
||||
export * from './namespaces/flow_devops_evaluation_evaluator_callback';
|
||||
export * from './namespaces/flow_devops_evaluation_object_callback';
|
||||
export * from './namespaces/flow_devops_ob_query_telemetry';
|
||||
export * from './namespaces/flow_devops_ob_query_telemetry_common';
|
||||
export * from './namespaces/flow_devops_ob_query_telemetry_field_filter';
|
||||
export * from './namespaces/flow_devops_ob_query_telemetry_span';
|
||||
export * from './namespaces/infra';
|
||||
export * from './namespaces/mockset';
|
||||
export * from './namespaces/run_event';
|
||||
export * from './namespaces/structure_gen';
|
||||
export * from './namespaces/testcase';
|
||||
|
||||
export type Int64 = string | number;
|
||||
|
||||
export default class DebuggerApiService<T> {
|
||||
private request: any = () => {
|
||||
throw new Error('DebuggerApiService.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);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/devops/debugger/v1/ping
|
||||
*
|
||||
* KitexThrift
|
||||
*/
|
||||
Ping(
|
||||
req: flow_devops_debugger_ping.PingReq,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_ping.PingResp> {
|
||||
const _req = req;
|
||||
const url = this.genBaseURL('/api/devops/debugger/v1/ping');
|
||||
const method = 'GET';
|
||||
const params = { ping_message: _req['ping_message'], Base: _req['Base'] };
|
||||
return this.request({ url, method, params }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/devops/debugger/v1/coze/mockSetBindingInfos
|
||||
*
|
||||
* BindingInfo
|
||||
*/
|
||||
BindMockSet(
|
||||
req?: flow_devops_debugger_coze.BindMockSetRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.BindMockSetResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/mockSetBindingInfos',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
mockSetID: _req['mockSetID'],
|
||||
bizCtx: _req['bizCtx'],
|
||||
mockSubject: _req['mockSubject'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/mockSetBindingInfos/mget */
|
||||
MGetMockSetBinding(
|
||||
req?: flow_devops_debugger_coze.MGetMockSetBindingRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.MGetMockSetBindingResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/mockSetBindingInfos/mget',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
mockSubject: _req['mockSubject'],
|
||||
needMockSetDetail: _req['needMockSetDetail'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/devops/debugger/v1/coze/mockRules
|
||||
*
|
||||
* MockRule
|
||||
*/
|
||||
SaveMockRule(
|
||||
req?: flow_devops_debugger_coze.SaveMockRuleRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.SaveMockRuleResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/devops/debugger/v1/coze/mockRules');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
name: _req['name'],
|
||||
description: _req['description'],
|
||||
mocksetID: _req['mocksetID'],
|
||||
bizCtx: _req['bizCtx'],
|
||||
priority: _req['priority'],
|
||||
id: _req['id'],
|
||||
requestFilter: _req['requestFilter'],
|
||||
responseExpect: _req['responseExpect'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/mockRules/mget */
|
||||
MGetMockRule(
|
||||
req?: flow_devops_debugger_coze.MGetMockRuleRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.MGetMockRuleResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/devops/debugger/v1/coze/mockRules/mget');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
mockSetID: _req['mockSetID'],
|
||||
creatorID: _req['creatorID'],
|
||||
pageLimit: _req['pageLimit'],
|
||||
pageToken: _req['pageToken'],
|
||||
ids: _req['ids'],
|
||||
orderBy: _req['orderBy'],
|
||||
desc: _req['desc'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/mockSets/mget */
|
||||
MGetMockSet(
|
||||
req?: flow_devops_debugger_coze.MGetMockSetRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.MGetMockSetResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/devops/debugger/v1/coze/mockSets/mget');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
mockSubject: _req['mockSubject'],
|
||||
creatorID: _req['creatorID'],
|
||||
pageLimit: _req['pageLimit'],
|
||||
pageToken: _req['pageToken'],
|
||||
ids: _req['ids'],
|
||||
orderBy: _req['orderBy'],
|
||||
desc: _req['desc'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/mockSets/usage/get */
|
||||
GetMockSetUsageInfo(
|
||||
req?: flow_devops_debugger_coze.GetMockSetUsageInfoRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.GetMockSetUsageInfoResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/mockSets/usage/get',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
mockSetID: _req['mockSetID'],
|
||||
spaceID: _req['spaceID'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/devops/debugger/v1/coze/mockSets
|
||||
*
|
||||
* Manager
|
||||
*
|
||||
* MockSet
|
||||
*/
|
||||
SaveMockSet(
|
||||
req?: flow_devops_debugger_coze.SaveMockSetRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.SaveMockSetResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/devops/debugger/v1/coze/mockSets');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
name: _req['name'],
|
||||
description: _req['description'],
|
||||
mockSubject: _req['mockSubject'],
|
||||
bizCtx: _req['bizCtx'],
|
||||
id: _req['id'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/mockRules/delete */
|
||||
DeleteMockRule(
|
||||
req?: flow_devops_debugger_coze.DeleteMockRuleRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.DeleteMockRuleResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/mockRules/delete',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = { id: _req['id'], bizCtx: _req['bizCtx'], Base: _req['Base'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/mockSets/delete */
|
||||
DeleteMockSet(
|
||||
req?: flow_devops_debugger_coze.DeleteMockSetRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.DeleteMockSetResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/devops/debugger/v1/coze/mockSets/delete');
|
||||
const method = 'POST';
|
||||
const data = { id: _req['id'], bizCtx: _req['bizCtx'], Base: _req['Base'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/testcase/casedata/delete */
|
||||
DeleteCaseData(
|
||||
req?: flow_devops_debugger_coze.DeleteCaseDataReq,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.DeleteCaseDataResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/testcase/casedata/delete',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
caseIDs: _req['caseIDs'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/testcase/casedata/check */
|
||||
CheckCaseDuplicate(
|
||||
req?: flow_devops_debugger_coze.CheckCaseDuplicateReq,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.CheckCaseDuplicateResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/testcase/casedata/check',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
caseName: _req['caseName'],
|
||||
bizComponentSubject: _req['bizComponentSubject'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/devops/debugger/v1/coze/testcase/casedata/autogen
|
||||
*
|
||||
* case generate
|
||||
*/
|
||||
AutoGenerateCaseData(
|
||||
req?: flow_devops_debugger_coze.AutoGenerateCaseDataReq,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.AutoGenerateCaseDataResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/testcase/casedata/autogen',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
bizComponentSubject: _req['bizComponentSubject'],
|
||||
count: _req['count'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/devops/debugger/v1/coze/testcase/casedata/save
|
||||
*
|
||||
* ========================== Test Case ==============================
|
||||
*
|
||||
* case manage
|
||||
*/
|
||||
SaveCaseData(
|
||||
req?: flow_devops_debugger_coze.SaveCaseDataReq,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.SaveCaseDataResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/testcase/casedata/save',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
bizComponentSubject: _req['bizComponentSubject'],
|
||||
caseBase: _req['caseBase'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/devops/debugger/v1/coze/testcase/casedata/schema
|
||||
*
|
||||
* case schema
|
||||
*/
|
||||
GetSchemaByID(
|
||||
req?: flow_devops_debugger_coze.GetSchemaByIDReq,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.GetSchemaByIDResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/testcase/casedata/schema',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
bizComponentSubject: _req['bizComponentSubject'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/testcase/casedata/mget */
|
||||
MGetCaseData(
|
||||
req?: flow_devops_debugger_coze.MGetCaseDataReq,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.MGetCaseDataResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/testcase/casedata/mget',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
bizComponentSubject: _req['bizComponentSubject'],
|
||||
pageLimit: _req['pageLimit'],
|
||||
nextToken: _req['nextToken'],
|
||||
caseName: _req['caseName'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/devops/debugger/v1/coze/featureGates
|
||||
*
|
||||
* ========================== FeautureGates ==============================
|
||||
*/
|
||||
MGetDevopsFeatureGates(
|
||||
req?: flow_devops_debugger_coze.MGetDevopsFeatureGatesRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.MGetDevopsFeatureGatesResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL('/api/devops/debugger/v1/coze/featureGates');
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
fgNames: _req['fgNames'],
|
||||
spaceID: _req['spaceID'],
|
||||
botID: _req['botID'],
|
||||
userID: _req['userID'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/autogenMockDataTask/cancel */
|
||||
CancelMockDataAutoGenTask(
|
||||
req?: flow_devops_debugger_coze.CancelMockDataAutoGenTaskRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.CancelMockDataAutoGenTaskResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/autogenMockDataTask/cancel',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = { taskID: _req['taskID'], Base: _req['Base'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/devops/debugger/v1/coze/autogenMockDataTask
|
||||
*
|
||||
* AutoGen
|
||||
*/
|
||||
CreateMockDataAutoGenTask(
|
||||
req?: flow_devops_debugger_coze.CreateMockDataAutoGenTaskRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.CreateMockDataAutoGenTaskResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/autogenMockDataTask',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
mockSetID: _req['mockSetID'],
|
||||
quantity: _req['quantity'],
|
||||
desc: _req['desc'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/autogenMockDataTask/get */
|
||||
GetMockDataAutoGenTaskChoices(
|
||||
req?: flow_devops_debugger_coze.GetMockDataAutoGenTaskChoicesRequest,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.GetMockDataAutoGenTaskChoicesResponse> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/autogenMockDataTask/get',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = { taskID: _req['taskID'], Base: _req['Base'] };
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
|
||||
/** POST /api/devops/debugger/v1/coze/testcase/casedata/setDefault */
|
||||
SetDefaultTestCase(
|
||||
req?: flow_devops_debugger_coze.SetDefaultTestCaseReq,
|
||||
options?: T,
|
||||
): Promise<flow_devops_debugger_coze.SetDefaultTestCaseResp> {
|
||||
const _req = req || {};
|
||||
const url = this.genBaseURL(
|
||||
'/api/devops/debugger/v1/coze/testcase/casedata/setDefault',
|
||||
);
|
||||
const method = 'POST';
|
||||
const data = {
|
||||
bizCtx: _req['bizCtx'],
|
||||
bizComponentSubject: _req['bizComponentSubject'],
|
||||
caseID: _req['caseID'],
|
||||
Base: _req['Base'],
|
||||
};
|
||||
return this.request({ url, method, data }, options);
|
||||
}
|
||||
}
|
||||
/* eslint-enable */
|
||||
@@ -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 {
|
||||
LogID?: string;
|
||||
Caller?: string;
|
||||
Addr?: string;
|
||||
Client?: string;
|
||||
TrafficEnv?: TrafficEnv;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface BaseResp {
|
||||
StatusMessage?: string;
|
||||
StatusCode?: number;
|
||||
Extra?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface TrafficEnv {
|
||||
Open?: boolean;
|
||||
Env?: string;
|
||||
}
|
||||
/* eslint-enable */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user