chore: re-generate api schema (#380)

This commit is contained in:
tecvan 2025-07-31 13:07:55 +08:00 committed by GitHub
parent a1f3a9aead
commit b7ada0cb6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 74 additions and 63 deletions

View File

@ -4,7 +4,7 @@ const path = require('path');
const config = [ const config = [
{ {
idlRoot: '../../../../opencoze', // IDL root directory idlRoot: path.resolve(__dirname, '../../../../'), // IDL root directory
entries: { entries: {
passport: './idl/passport/passport.thrift', // Entry service name and path passport: './idl/passport/passport.thrift', // Entry service name and path
explore: explore:

View File

@ -16,4 +16,3 @@
declare const _schemas: any[]; declare const _schemas: any[];
export default _schemas; export default _schemas;

View File

@ -22,36 +22,36 @@ export enum ProductEntityType {
/** Workflow = 3 , */ /** Workflow = 3 , */
SocialScene = 4, SocialScene = 4,
Project = 6, Project = 6,
/** History workflow, no more in the future (abandoned) */ /** 历史工作流,后续不会再有(废弃) */
WorkflowTemplate = 13, WorkflowTemplate = 13,
/** Historical image stream template, no more in the future (obsolete) */ /** 历史图像流模板,后续不会再有(废弃) */
ImageflowTemplate = 15, ImageflowTemplate = 15,
/** Template universal identification, only used to bind template-related configurations, not bind products */ /** 模板通用标识,仅用于绑定模板相关的配置,不绑定商品 */
TemplateCommon = 20, TemplateCommon = 20,
/** Bot template */ /** Bot 模板 */
BotTemplate = 21, BotTemplate = 21,
/** workflow template */ /** 工作流模板 */
WorkflowTemplateV2 = 23, WorkflowTemplateV2 = 23,
/** Image stream template (this type has been offline and merged into workflow, but historical data will be preserved, and the front end will be treated as workflow display) */ /** 图像流模板(该类型已下线,合并入 workflow但历史数据会保留前端视作 workflow 展示) */
ImageflowTemplateV2 = 25, ImageflowTemplateV2 = 25,
/** project template */ /** 项目模板 */
ProjectTemplate = 26, ProjectTemplate = 26,
/** Coze token products, theoretically there will only be one */ /** coze token 类商品,理论上只会有一个 */
CozeToken = 50, CozeToken = 50,
/** Subscribe to the traffic package of credit, theoretically there will only be one */ /** 订阅 credit 的流量包,理论上只会有一个 */
MsgCredit = 55, MsgCredit = 55,
/** There is only one subscription product in theory */ /** 消息订阅类商品,理论上只有一个 */
SubsMsgCredit = 60, SubsMsgCredit = 60,
Common = 99, Common = 99,
/** Special Topics (Compatible with previous designs) */ /** 专题(兼容之前的设计) */
Topic = 101, Topic = 101,
} }
export enum SortType { export enum SortType {
Heat = 1, Heat = 1,
Newest = 2, Newest = 2,
/** collection time */ /** 收藏时间 */
FavoriteTime = 3, FavoriteTime = 3,
/** Correlation, only for search scenarios */ /** 相关性,只用于搜索场景 */
Relative = 4, Relative = 4,
} }
export enum ProductPublishMode { export enum ProductPublishMode {
@ -59,9 +59,9 @@ export enum ProductPublishMode {
ClosedSource = 2, ClosedSource = 2,
} }
export enum ProductListSource { export enum ProductListSource {
/** recommended list page */ /** 推荐列表页 */
Recommend = 1, Recommend = 1,
/** personalized recommendation */ /** 个性化推荐 */
CustomizedRecommend = 2, CustomizedRecommend = 2,
} }
export enum PluginType { export enum PluginType {
@ -77,7 +77,7 @@ export interface CommercialSetting {
commercial_type: ProductPaidType commercial_type: ProductPaidType
} }
export enum ProductStatus { export enum ProductStatus {
/** It never hit the shelves. */ /** 从未上架 */
NeverListed = 0, NeverListed = 0,
Listed = 1, Listed = 1,
Unlisted = 2, Unlisted = 2,
@ -103,20 +103,20 @@ export interface ImageInfo {
url: string, url: string,
} }
export enum ProductDraftStatus { export enum ProductDraftStatus {
/** default */ /** 默认 */
Default = 0, Default = 0,
/** Under review. */ /** 审核中 */
Pending = 1, Pending = 1,
/** approved */ /** 审核通过 */
Approved = 2, Approved = 2,
/** The review failed. */ /** 审核不通过 */
Rejected = 3, Rejected = 3,
/** Abandoned */ /** 已废弃 */
Abandoned = 4, Abandoned = 4,
} }
export type AuditStatus = ProductDraftStatus; export type AuditStatus = ProductDraftStatus;
export interface OpeningDialog { export interface OpeningDialog {
/** Bot opening line */ /** Bot开场白 */
content: string content: string
} }
export enum InputType { export enum InputType {
@ -131,27 +131,27 @@ export enum PluginParamTypeFormat {
ImageUrl = 1, ImageUrl = 1,
} }
export enum WorkflowNodeType { export enum WorkflowNodeType {
/** start */ /** 开始 */
Start = 1, Start = 1,
/** end */ /** 结束 */
End = 2, End = 2,
/** Large model */ /** 大模型 */
LLM = 3, LLM = 3,
/** plugin */ /** 插件 */
Api = 4, Api = 4,
/** code */ /** 代码 */
Code = 5, Code = 5,
/** Knowledge Base */ /** 知识库 */
Dataset = 6, Dataset = 6,
/** selector */ /** 选择器 */
If = 8, If = 8,
/** Workflow */ /** 工作流 */
SubWorkflow = 9, SubWorkflow = 9,
/** variable */ /** 变量 */
Variable = 11, Variable = 11,
/** database */ /** 数据库 */
Database = 12, Database = 12,
/** message */ /** 消息 */
Message = 13, Message = 13,
} }
export enum SocialSceneRoleType { export enum SocialSceneRoleType {
@ -161,11 +161,11 @@ export enum SocialSceneRoleType {
} }
export enum UIPreviewType { export enum UIPreviewType {
/** /**
* UI preview type, defining alignment UI Builder, currently used in Project * UI UI Builder Project
* web page *
*/ */
Web = 1, Web = 1,
/** mobile end */ /** 移动端 */
Client = 2, Client = 2,
} }
export interface ChargeSKUExtra { export interface ChargeSKUExtra {
@ -173,7 +173,7 @@ export interface ChargeSKUExtra {
is_self_define: boolean, is_self_define: boolean,
} }
export enum FavoriteListSource { export enum FavoriteListSource {
/** Created by users themselves */ /** 用户自己创建的 */
CreatedByMe = 1, CreatedByMe = 1,
} }
export interface FavoriteEntity { export interface FavoriteEntity {
@ -182,13 +182,13 @@ export interface FavoriteEntity {
name: string, name: string,
icon_url: string, icon_url: string,
description: string, description: string,
/** Abandoned, using UserInfo */ /** 废弃,使用UserInfo */
seller: SellerInfo, seller: SellerInfo,
/** Use to jump to the bot edit page */ /** 用于跳转到Bot编辑页 */
space_id: string, space_id: string,
/** Does the user have permissions to the space where the entity is located? */ /** 用户是否有该实体所在Space的权限 */
has_space_permission: boolean, has_space_permission: boolean,
/** collection time */ /** 收藏时间 */
favorite_at: string, favorite_at: string,
product_extra?: FavoriteProductExtra, product_extra?: FavoriteProductExtra,
user_info: UserInfo, user_info: UserInfo,

View File

@ -225,6 +225,16 @@ export interface UserBehaviorInfo {
/** 最近使用时间戳 */ /** 最近使用时间戳 */
used_at?: string, used_at?: string,
} }
export enum PluginAuthMode {
/** 不需要授权 */
NoAuth = 0,
/** 需要授权,但无授权配置 */
Required = 1,
/** 需要授权,且已经配置 */
Configured = 2,
/** 需要授权,但授权配置可能是用户级别,可由用户自己配置 */
Supported = 3,
}
export interface PluginExtraInfo { export interface PluginExtraInfo {
tools?: PluginToolInfo[], tools?: PluginToolInfo[],
total_api_count: number, total_api_count: number,
@ -247,6 +257,8 @@ export interface PluginExtraInfo {
material_id?: string, material_id?: string,
connectors: PluginConnectorInfo[], connectors: PluginConnectorInfo[],
plugin_type?: product_common.PluginType, plugin_type?: product_common.PluginType,
/** for opencoze */
auth_mode?: PluginAuthMode,
} }
export interface ToolParameter { export interface ToolParameter {
name: string, name: string,

View File

@ -17,20 +17,20 @@
import * as base from './../../base'; import * as base from './../../base';
export { base }; export { base };
export interface Price { export interface Price {
/** amount */ /** 金额 */
amount: string, amount: string,
/** Currencies such as USD and CNY */ /** 币种如USD、CNY */
currency: string, currency: string,
/** decimal places */ /** 小数位数 */
decimal_num: number, decimal_num: number,
} }
export enum FollowType { export enum FollowType {
/** It doesn't matter. */ /** 无关系 */
Unknown = 0, Unknown = 0,
/** follow */ /** 关注 */
Followee = 1, Followee = 1,
/** fan */ /** 粉丝 */
Follower = 2, Follower = 2,
/** Follow each other */ /** 互相关注 */
MutualFollow = 3, MutualFollow = 3,
} }

View File

@ -19,7 +19,7 @@ export interface AppUserInfo {
user_unique_name: string user_unique_name: string
} }
export interface User { export interface User {
/** Align with the original interface field name */ /** 与原接口字段名对齐 */
user_id_str: string, user_id_str: string,
name: string, name: string,
user_unique_name: string, user_unique_name: string,
@ -92,7 +92,7 @@ export interface UserUpdateProfileResponse {
code: number, code: number,
msg: string, msg: string,
} }
/** Email password registration */ /** 邮箱密码注册 */
export const PassportWebEmailRegisterV2Post = /*#__PURE__*/createAPI<PassportWebEmailRegisterV2PostRequest, PassportWebEmailRegisterV2PostResponse>({ export const PassportWebEmailRegisterV2Post = /*#__PURE__*/createAPI<PassportWebEmailRegisterV2PostRequest, PassportWebEmailRegisterV2PostResponse>({
"url": "/api/passport/web/email/register/v2/", "url": "/api/passport/web/email/register/v2/",
"method": "POST", "method": "POST",
@ -105,7 +105,7 @@ export const PassportWebEmailRegisterV2Post = /*#__PURE__*/createAPI<PassportWeb
"schemaRoot": "api://schemas/idl_passport_passport", "schemaRoot": "api://schemas/idl_passport_passport",
"service": "passport" "service": "passport"
}); });
/** log out */ /** 退出登录 */
export const PassportWebLogoutGet = /*#__PURE__*/createAPI<PassportWebLogoutGetRequest, PassportWebLogoutGetResponse>({ export const PassportWebLogoutGet = /*#__PURE__*/createAPI<PassportWebLogoutGetRequest, PassportWebLogoutGetResponse>({
"url": "/api/passport/web/logout/", "url": "/api/passport/web/logout/",
"method": "GET", "method": "GET",
@ -116,7 +116,7 @@ export const PassportWebLogoutGet = /*#__PURE__*/createAPI<PassportWebLogoutGetR
"schemaRoot": "api://schemas/idl_passport_passport", "schemaRoot": "api://schemas/idl_passport_passport",
"service": "passport" "service": "passport"
}); });
/** Email account password login */ /** 邮箱帐密登录 */
export const PassportWebEmailLoginPost = /*#__PURE__*/createAPI<PassportWebEmailLoginPostRequest, PassportWebEmailLoginPostResponse>({ export const PassportWebEmailLoginPost = /*#__PURE__*/createAPI<PassportWebEmailLoginPostRequest, PassportWebEmailLoginPostResponse>({
"url": "/api/passport/web/email/login/", "url": "/api/passport/web/email/login/",
"method": "POST", "method": "POST",
@ -129,7 +129,7 @@ export const PassportWebEmailLoginPost = /*#__PURE__*/createAPI<PassportWebEmail
"schemaRoot": "api://schemas/idl_passport_passport", "schemaRoot": "api://schemas/idl_passport_passport",
"service": "passport" "service": "passport"
}); });
/** Reset password via email */ /** 通过邮箱重置密码 */
export const PassportWebEmailPasswordResetGet = /*#__PURE__*/createAPI<PassportWebEmailPasswordResetGetRequest, PassportWebEmailPasswordResetGetResponse>({ export const PassportWebEmailPasswordResetGet = /*#__PURE__*/createAPI<PassportWebEmailPasswordResetGetRequest, PassportWebEmailPasswordResetGetResponse>({
"url": "/api/passport/web/email/password/reset/", "url": "/api/passport/web/email/password/reset/",
"method": "GET", "method": "GET",
@ -142,7 +142,7 @@ export const PassportWebEmailPasswordResetGet = /*#__PURE__*/createAPI<PassportW
"schemaRoot": "api://schemas/idl_passport_passport", "schemaRoot": "api://schemas/idl_passport_passport",
"service": "passport" "service": "passport"
}); });
/** account information */ /** 账号信息 */
export const PassportAccountInfoV2 = /*#__PURE__*/createAPI<PassportAccountInfoV2Request, PassportAccountInfoV2Response>({ export const PassportAccountInfoV2 = /*#__PURE__*/createAPI<PassportAccountInfoV2Request, PassportAccountInfoV2Response>({
"url": "/api/passport/account/info/v2/", "url": "/api/passport/account/info/v2/",
"method": "POST", "method": "POST",