anl 1.3.21 → 1.3.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.0",t={"/api/test":{get:{operationId:"AppController_apiTest",parameters:[],responses:{200:{description:""}},tags:["Test Server"]}},"/api/lsp/compile":{post:{operationId:"LspController_compile",summary:"Get code completions based on given input",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CompletionDto"}}}},responses:{200:{description:"Successfully fetched the completion list."},400:{description:"Failed to fetch the completion list."}},tags:["LSP"]}},"/api/manageGame/createGame":{post:{operationId:"ManageGameController_createGame",summary:"创建新的游戏",parameters:[],requestBody:{required:!0,description:"创建游戏报文",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameDto"}}}},responses:{200:{description:"游戏创建成功"}},tags:["Manage Game"]}},"/api/manageGame/gameList":{get:{operationId:"ManageGameController_getGameList",summary:"游戏列表",parameters:[],responses:{200:{description:"返回游戏列表"}},tags:["Manage Game"]}},"/api/manageGame/getGameConfig/{gameName}":{get:{operationId:"ManageGameController_getGameConfig",summary:"获取游戏的配置信息",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置"},400:{description:"获取游戏配置失败"}},tags:["Manage Game"]}},"/api/manageGame/rename":{post:{operationId:"ManageGameController_rename",summary:"游戏名称重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/delete":{post:{operationId:"ManageGameController_deleteFileOrDir",summary:"删除游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteGameDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/readGameAssets/{readDirPath}":{get:{operationId:"ManageGameController_readGameAssets",summary:"Read Game Assets",parameters:[{name:"readDirPath",required:!0,in:"path",description:"Path of the game directory to read assets from, including subdirectories.",schema:{type:"string"}}],responses:{200:{description:"Retrieve the assets of the specified game directory."}},tags:["Manage Game"]}},"/api/manageGame/readUserAssets/{readDirPath}":{get:{operationId:"ManageGameController_readUserAssets",summary:"读取用户资源",parameters:[{name:"readDirPath",required:!0,in:"path",description:"读取资产的用户目录路径,包括子目录.",schema:{type:"string"}}],responses:{200:{description:"检索指定用户目录下的资源."}},tags:["Manage Game"]}},"/api/manageGame/setGameConfig":{post:{operationId:"ManageGameController_setGameConfig",summary:"Set Game Configuration",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/GameConfigDto"}}}},responses:{200:{description:"Game configuration set successfully."},400:{description:"Failed to set the game configuration."}},tags:["Manage Game"]}},"/api/manageGame/resource/uploadFiles":{post:{operationId:"ManageGameController_uploadUserResource",summary:"上传用户资源文件",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UploadResourceDto"}}}},responses:{200:{description:"Files uploaded successfully."},400:{description:"Failed to upload files."}},tags:["Manage Game"]}},"/api/manageGame/resource/rename":{post:{operationId:"ManageGameController_resourceRename",summary:"用户资源文件重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed"}},tags:["Manage Game"]}},"/api/manageGame/resource/delete":{post:{operationId:"ManageGameController_resourceDelete",summary:"删除用户资源文件",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteResourceDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed"}},tags:["Manage Game"]}},"/api/manageGame/resource/mkdir":{post:{operationId:"ManageGameController_resourceMkDir",summary:"新建用户资源文件夹",parameters:[{name:"resource",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/MkDirDto"}}}},responses:{200:{description:"Directory created successfully."},400:{description:"Failed to create directory."}},tags:["Manage Game"]}},"/api/manageGame/openGameDict/{gameName}":{get:{operationId:"ManageGameController_openGameDict",summary:"Open Game Dictionary",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game.",schema:{type:"string"}}],responses:{200:{description:"Opens the dictionary for a specified game."}},tags:["Manage Game"]}},"/api/manageGame/openGameAssetsDict/{gameName}":{get:{operationId:"ManageGameController_openGameAssetsDict",summary:"Open Game Assets Dictionary",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game.",schema:{type:"string"}},{name:"subFolder",required:!0,in:"query",schema:{type:"string"}}],responses:{200:{description:"Opens the assets dictionary for a specified game."}},tags:["Manage Game"]}},"/api/manageGame/ejectGameAsWeb/{gameName}":{get:{operationId:"ManageGameController_ejectGameAsWeb",summary:"Eject Game As Web App",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game to be exported as web app.",schema:{type:"string"}}],responses:{200:{description:"Exports the specified game as a web app."}},tags:["Manage Game"]}},"/api/manageGame/ejectGameAsExe/{gameName}":{get:{operationId:"ManageGameController_ejectGameAsExe",summary:"Eject Game As EXE",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game to be exported as EXE.",schema:{type:"string"}}],responses:{200:{description:"Exports the specified game as an EXE (Windows Electron App)."}},tags:["Manage Game"]}},"/api/manageGame/ejectGameAsAndroid/{gameName}":{get:{operationId:"ManageGameController_ejectGameAsAndroid",summary:"Eject Game As Android App",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game to be exported as an Android app.",schema:{type:"string"}}],responses:{200:{description:"Exports the specified game as an Android app."}},tags:["Manage Game"]}},"/api/manageGame/deleteFile":{post:{operationId:"ManageGameController_deleteFile",summary:"Delete File",parameters:[],requestBody:{required:!0,description:"File deletion data",content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteFileDto"}}}},responses:{200:{description:"Successfully deleted the file."},400:{description:"Failed to delete the file."}},tags:["Manage Game"]}},"/api/manageGame/createNewScene":{post:{operationId:"ManageGameController_createNewScene",summary:"Create a New Scene",parameters:[],requestBody:{required:!0,description:"Scene creation data",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateNewSceneDto"}}}},responses:{200:{description:"Successfully created the scene."},400:{description:"Failed to create the scene or scene already exists."}},tags:["Manage Game"]}},"/api/manageGame/editScene":{post:{operationId:"ManageGameController_editScene",summary:"Edit Scene",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/EditSceneDto"}}}},responses:{200:{description:"Scene edited successfully."},400:{description:"Failed to edit the scene."}},tags:["Manage Game"]}},"/api/manageGame/editTextFile":{post:{operationId:"ManageGameController_editTextFile",summary:"Edit TextFile",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/EditTextFileDto"}}}},responses:{200:{description:"File edited successfully."},400:{description:"Failed to edit the file."}},tags:["Manage Game"]}},"/api/manageGame/uploadFiles":{post:{operationId:"ManageGameController_uploadFiles",summary:"Upload Files",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UploadFilesDto"}}}},responses:{200:{description:"Files uploaded successfully."},400:{description:"Failed to upload files."}},tags:["Manage Game"]}},"/api/manageGame/mkdir":{post:{operationId:"ManageGameController_mkDir",summary:"Create Directory",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/MkDirDto"}}}},responses:{200:{description:"Directory created successfully."},400:{description:"Failed to create directory."}},tags:["Manage Game"]}},"/api/manageGame/{gameName}/scene/{fileName}":{get:{operationId:"ManageGameController_laodSceneFile",summary:"read scene file",parameters:[{name:"gameName",required:!0,in:"path",description:"game name.",schema:{type:"string"}},{name:"fileName",required:!0,in:"path",description:"scene file name.",schema:{type:"string"}}],responses:{200:{description:"return zh and en scene file"}},tags:["Manage Game"]}},"/api/llm/txt/v2/cache":{post:{operationId:"LlmController_mCache",summary:"Kimi模型资源存储",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Llm"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/txt/v2/{tlmId}":{get:{operationId:"LlmController_txtV3",summary:"Maas文生文",parameters:[{name:"tlmId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/recommend/{rid}/features":{get:{operationId:"LlmController_recommendFeatures",summary:"推荐角色人格",parameters:[{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/recommend/{bgid}/category":{get:{operationId:"LlmController_recommendCategory",summary:"推荐背景分类",parameters:[{name:"bgid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/image/upload":{post:{operationId:"LlmController_imageUpload",summary:"大模型图片上传接口",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ImageUploadDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/sseTest":{get:{operationId:"LlmController_sse",parameters:[],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/upload/text":{post:{operationId:"LlmController_uploadText",summary:"上传文本文件返回文本,最大可接收5000字符",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/get/expression/list":{get:{operationId:"LlmController_getExpressionList",summary:"获取表情标签列表",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/draw/{event}/{reqId}":{get:{operationId:"LlmController_draw",summary:"获取绘图结果",parameters:[{name:"event",required:!0,in:"path",schema:{type:"string"}},{name:"reqId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/draw/task":{get:{operationId:"LlmController_drawing",summary:"获取该用户下正在绘图的Reqs",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/role/figure":{post:{operationId:"RoleController_createFigure",summary:"保存角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/AddRoleDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/role/figure/img":{post:{operationId:"RoleController_uploadFigureImg",summary:"保存立绘/表情差分图图片",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/AddFigureDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/role/list":{get:{operationId:"RoleController_listRole",summary:"获取该用户下角色列表",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/role/{rid}":{put:{operationId:"RoleController_updateRole",summary:"更新角色",parameters:[{name:"rid",required:!0,in:"path",description:"角色ID",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]},delete:{operationId:"RoleController_deletedRole",summary:"删除角色",parameters:[{name:"rid",required:!0,in:"path",description:"角色ID",schema:{type:"string"}}],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/role/test1":{get:{operationId:"RoleController_test",parameters:[],responses:{200:{description:""}},tags:["Role"]}},"/api/resource":{post:{operationId:"ResourceController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateResourceDto"}}}},responses:{201:{description:""}},tags:["Resource"]}},"/api/resource/{id}":{get:{operationId:"ResourceController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]},patch:{operationId:"ResourceController_update",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateResourceDto"}}}},responses:{200:{description:""}},tags:["Resource"]},delete:{operationId:"ResourceController_remove",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]}},"/api/bg/add":{post:{operationId:"BgController_createBg",summary:"保存背景信息",parameters:[],requestBody:{required:!0,description:"保存背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateBgDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bg"]}},"/api/bg/list":{get:{operationId:"BgController_list",summary:"获取背景信息列表",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bg"]}},"/api/bg/update/{bid}":{post:{operationId:"BgController_updateBg",summary:"更新背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"更新背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bg"]}},"/api/bg/uploadImage/{bid}":{post:{operationId:"BgController_uploadBgImg",summary:"保存背景图片",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UploadImageDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bg"]}},"/api/bg/remove/{bid}":{delete:{operationId:"BgController_remove",summary:"删除背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Bg"]}},"/api/user/login":{post:{operationId:"UserController_login",summary:"用户登录",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{200:{description:"Successfully."}},tags:["User"]}},"/api/user":{post:{operationId:"UserController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{201:{description:""}},tags:["User"]}},"/api/editor/addScenes":{post:{operationId:"EditorController_addScenes",summary:"创建章节/场景",parameters:[],requestBody:{required:!0,description:"请求体",content:{"application/json":{schema:{$ref:"#/components/schemas/AddSceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["Editor"]}},"/api/editor/createNewScene":{post:{operationId:"EditorController_createNewScene",summary:"创建章节/场景",parameters:[],requestBody:{required:!0,description:"创建章节/场景",content:{"application/json":{schema:{$ref:"#/components/schemas/DialogueDto"}}}},responses:{200:{description:"Successfully created the scene."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/deleteScene":{post:{operationId:"EditorController_deleteScene",summary:"删除章节/场景",parameters:[],requestBody:{required:!0,description:"删除章节/场景",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully delete the scene."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/sceneDetail":{post:{operationId:"EditorController_getSceneDetail",summary:"查询场景详情内容",parameters:[],requestBody:{required:!0,description:"查询场景详情内容",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editUiScene/upload":{post:{operationId:"EditorController_uploadUiSceneDialogue",summary:"上传文本更新UI对话资源",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DialogueDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editUiScene/dialogue":{post:{operationId:"EditorController_editUiSceneDialogue",summary:"更新UI编辑器对话资源",parameters:[],requestBody:{required:!0,description:"更新UI编辑器对话资源",content:{"application/json":{schema:{$ref:"#/components/schemas/DialogueDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/scene/command/{id}":{post:{operationId:"EditorController_commandLine",summary:"根据行ID获取指令行",parameters:[{name:"id",required:!0,in:"path",description:"id",schema:{type:"string"}}],requestBody:{required:!0,description:"场景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/scene/check":{post:{operationId:"EditorController_checkScene",summary:"校验场景信息",parameters:[],requestBody:{required:!0,description:"校验场景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editUiScene/resource":{post:{operationId:"EditorController_editUiSceneResource",summary:"更新UI编辑器场景资源",parameters:[],requestBody:{required:!0,description:"更新UI编辑器场景资源",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateUiResourceDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editTxtScene/upload":{post:{operationId:"EditorController_uploadTxtSceneDialogue",summary:"上传文本更新TXT对话资源",parameters:[],requestBody:{required:!0,description:"更新文本编辑器内容",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateTxtSceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editTxtScene":{post:{operationId:"EditorController_editTxtScene",summary:"更新文本编辑器内容",parameters:[],requestBody:{required:!0,description:"更新文本编辑器内容",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateTxtSceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/rename":{post:{operationId:"EditorController_sceneFileRename",summary:"场景文件重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SceneReNameDto"}}}},responses:{200:{description:"Rename successfully."},400:{description:"Failed"}},tags:["Editor"]}},"/api/editor/getSectionSceneList/{gameName}":{post:{operationId:"EditorController_getSectionSceneList",summary:"获取章节场景列表数据",parameters:[{name:"gameName",required:!0,in:"path",description:"游戏名称",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/launch/{gameName}":{get:{operationId:"EditorController_launchGame",summary:"发布游戏",parameters:[{name:"gameName",required:!0,in:"path",description:"游戏名称",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/variable/global/record":{post:{operationId:"VariableController_recordVariable",summary:"记录变量信息",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateVariableDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ResultData"}}}}},tags:["Variable"]}},"/api/variable/global/{gameName}/list":{get:{operationId:"VariableController_varList",summary:"获取游戏变量信息列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/variable/{id}":{get:{operationId:"VariableController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Variable"]}},"/api/variable/global/{id}/remove":{delete:{operationId:"VariableController_remove",summary:"删除变量信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/canvas/record":{post:{operationId:"CanvasController_record",summary:"记录画布数据",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RecordCanvasDto"}}}},responses:{200:{description:""},500:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ValidateCanvas"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/view":{get:{operationId:"CanvasController_view",summary:"获取最新的画布节点数据",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasBody"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/revise/history":{get:{operationId:"CanvasController_history",summary:"获取历史修订列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CanvasHistory"}}}}}},tags:["Canvas"]}},"/api/canvas/{id}/revise/detail":{get:{operationId:"CanvasController_detail",summary:"获取指定修订详情",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasBody"}}}}},tags:["Canvas"]}}},r={title:"UMPAY.NETA Terre API",description:"API Refrence of UMPAY.NETA Terre Editor",version:"1.0",contact:{}},s=[],a=[{url:"http://10.10.77.121/dev-api"}],i={schemas:{CompletionDto:{type:"object",properties:{editorValue:{type:"string",description:"Editor input value for which the completion is required"},sceneType:{type:"string",description:"scene file type en or zh"},params:{type:"object",description:"Parameters required for completion"}},required:["editorValue","sceneType","params"]},CreateGameDto:{type:"object",properties:{gameName:{type:"string",description:"The name of the game to be created"}},required:["gameName"]},RenameDto:{type:"object",properties:{source:{type:"string",description:"The source path of the file or directory to be renamed"},newName:{type:"string",description:"New name for renaming the file or directory"}},required:["source","newName"]},DeleteGameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"}},required:["gameName"]},GameConfigDto:{type:"object",properties:{gameName:{type:"string",description:"The name of the game"},newConfig:{type:"string",description:"New game configuration"}},required:["gameName","newConfig"]},UploadResourceDto:{type:"object",properties:{folder:{type:"string",description:"资源所属文件夹"}},required:["folder"]},DeleteResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"}},required:["name"]},MkDirDto:{type:"object",properties:{source:{type:"string",description:"已有的资源文件夹"},name:{type:"string",description:"Name for the new directory"}},required:["source","name"]},DeleteFileDto:{type:"object",properties:{path:{type:"string",description:"The path to the file to be deleted"}},required:["path"]},CreateNewSceneDto:{type:"object",properties:{gameName:{type:"string",description:"The name of the game"},sceneName:{type:"string",description:"The name of the scene"}},required:["gameName","sceneName"]},EditSceneDto:{type:"object",properties:{gameName:{type:"string",description:"The name of the game"},sceneName:{type:"string",description:"The name of the scene"},type:{type:"string",description:"Scene data type en or zh"},sceneData:{type:"string",description:"Scene data content",format:"{ value: string }"}},required:["gameName","sceneName","type","sceneData"]},EditTextFileDto:{type:"object",properties:{path:{type:"string",description:"The path of textfile"},textFile:{type:"string",description:"Text data content"}},required:["path","textFile"]},UploadFilesDto:{type:"object",properties:{targetDirectory:{type:"string",description:"Target directory for the uploaded files"}},required:["targetDirectory"]},Llm:{type:"object",properties:{}},ImageUploadDto:{type:"object",properties:{category:{type:"string",description:"图片类别"},original:{type:"string",description:"蒙版对应原始图片名称"}},required:["category","original"]},AddRoleDto:{type:"object",properties:{name:{type:"string",description:"角色名字"},gender:{type:"string",description:"性别",enum:["male","female"]},style:{type:"string",description:"立绘风格"},age:{type:"string",description:"年纪",enum:["child","adult","hoariness"]}},required:["name","gender","style","age"]},AddFigureDto:{type:"object",properties:{fileUrl:{type:"string",description:"需要保存的文件地址"},rid:{type:"string",description:"角色ID"},expression:{type:"string",description:"差分名"}},required:["fileUrl","rid","expression"]},UpdateRoleDto:{type:"object",properties:{fileUrl:{type:"string",description:"主立绘的图片地址"},fileLink:{type:"string",description:"主立绘图片链接"},seed:{type:"string",description:"主立绘随机种子"},tlmId:{type:"string",description:"角色对应的大模型信息ID"},feature:{type:"string",description:"人格"},referPic:{type:"string",description:"人格参考图"},expression:{type:"string",description:"差分名"},prompts:{type:"string",description:"提示词"},figures:{description:"表情差分图",type:"array",items:{type:"string"}}},required:["fileUrl","fileLink","seed","tlmId","feature","referPic","expression","prompts","figures"]},CreateResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"},path:{type:"string",description:"资源路径"},type:{type:"string",description:"资源类型"},uid:{type:"string",description:"用户ID"},pid:{type:"string",description:"父级资源ID"},remark:{type:"string",description:"备注"}},required:["name","path","type","uid","pid","remark"]},UpdateResourceDto:{type:"object",properties:{}},CreateBgDto:{type:"object",properties:{name:{type:"string",description:"背景名称"},style:{type:"string",description:"背景风格"}},required:["name","style"]},UpdateBgDto:{type:"object",properties:{prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"背景对应大模型输出ID"},bgPath:{type:"string",description:"背景图片的相对地址"},category:{type:"string",description:"背景分类"},referPic:{type:"string",description:"背景分类参考图"}},required:["prompts","tlmId","bgPath","category","referPic"]},UploadImageDto:{type:"object",properties:{imageName:{type:"string",description:"图片名称"},imageUrl:{type:"string",description:"图片地址"},imageRelevancy:{type:"string",description:"图片所属:用户"},imageCategory:{type:"string",description:"图片类别"}},required:["imageName","imageUrl","imageRelevancy","imageCategory"]},CreateUserDto:{type:"object",properties:{username:{type:"string",description:"用户名"},password:{type:"string",description:"密码"},nickname:{type:"string",description:"昵称(可选填)"}},required:["username","password","nickname"]},ResultData:{type:"object",properties:{code:{type:"number",default:200},msg:{type:"string",default:"ok"},data:{type:"any",default:null,nullable:!0}},required:["code","msg","data"]},AddSceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{description:"场景列表",type:"array",items:{type:"string"}}},required:["gameName","sceneName"]},DialogueDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},dialogue:{type:"string",description:"更新对话"}},required:["gameName","sectionName","sceneName","editorType","dialogue"]},SceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"}},required:["gameName","sectionName","sceneName","editorType"]},SceneDetailDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},sceneType:{type:"string",description:"场景类型"}},required:["gameName","sectionName","sceneName","editorType","sceneType"]},UpdateUiResourceDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},bg:{type:"string",description:"更新背景"},bgm:{type:"string",description:"更新音乐"}},required:["gameName","sectionName","sceneName","editorType","bg","bgm"]},UpdateTxtSceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},text:{type:"string",description:"编辑文本"}},required:["gameName","sectionName","sceneName","editorType","text"]},SceneReNameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},newSectionName:{type:"string",description:"新章节名称"},newSceneName:{type:"string",description:"新场景名称"}},required:["gameName","sectionName","sceneName","editorType","newSectionName","newSceneName"]},UpdateVariableDto:{type:"object",properties:{id:{type:"string",description:"变量表ID"}},required:["id"]},Variable:{type:"object",properties:{id:{type:"string"},name:{type:"string"}},required:["id","name"]},ExpValue:{type:"object",properties:{value:{type:"number"},exp:{type:"string"}},required:["value","exp"]},ICondition:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"下限",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"上限",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},IOptions:{type:"object",properties:{name:{type:"string",description:"选项名称"},nodeId:{type:"string",description:"关联的节点"},sound:{type:"string",description:"绑定音频"},varId:{type:"string",description:"选定的变量"},varValue:{type:"number",description:"设定的变量值"},advanced:{description:"高级选项",allOf:[{$ref:"#/components/schemas/ICondition"}]}},required:["name","nodeId","sound","varId","varValue","advanced"]},NodeData:{type:"object",properties:{label:{type:"string",description:"节点名称"},chapterId:{type:"string",description:"章节id"},background:{type:"string",description:"绑定背景"},options:{description:"选项",type:"array",items:{$ref:"#/components/schemas/IOptions"}}},required:["label","chapterId","background","options"]},Node:{type:"object",properties:{id:{type:"string",description:"id"},type:{type:"string",description:"类型"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/NodeData"}]}},required:["id","type","data"]},EdgeData:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"下限",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"上限",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},Edge:{type:"object",properties:{id:{type:"string",description:"id"},source:{type:"string"},target:{type:"string"},data:{$ref:"#/components/schemas/EdgeData"}},required:["id","source","target","data"]},CanvasBody:{type:"object",properties:{nodes:{description:"节点信息",allOf:[{$ref:"#/components/schemas/Node"}]},edges:{description:"边信息",allOf:[{$ref:"#/components/schemas/Edge"}]}},required:["nodes","edges"]},Valid:{type:"object",properties:{id:{type:"string"},msg:{type:"string"}},required:["id","msg"]},ValidateCanvas:{type:"object",properties:{only:{description:"节点重复集",allOf:[{$ref:"#/components/schemas/Valid"}]},scene:{description:"场景报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},branch:{description:"节点报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},edge:{description:"边报错集",allOf:[{$ref:"#/components/schemas/Valid"}]}},required:["only","scene","branch","edge"]},CanvasHistory:{type:"object",properties:{_id:{type:"string",description:"画布ID"},updatedAt:{type:"string",description:"更新时间"},createdAt:{type:"string",description:"创建时间"}},required:["_id","updatedAt","createdAt"]},RecordCanvasDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},nodes:{description:"画布节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"画布边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["gameName","nodes","edges"]}}},o={openapi:e,paths:t,info:r,tags:s,servers:a,components:i};exports.components=i,exports.default=o,exports.info=r,exports.openapi=e,exports.paths=t,exports.servers=a,exports.tags=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.0",t={"/api/test":{get:{operationId:"AppController_apiTest",parameters:[],responses:{200:{description:""}},tags:["Test Server"]}},"/api/manageGame/createGame":{post:{operationId:"ManageGameController_createGame",summary:"创建新的游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameDto"}}}},responses:{200:{description:"返回游戏列表",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGame"}}}}},tags:["Manage Game"]}},"/api/manageGame/gameList":{get:{operationId:"ManageGameController_getGameList",summary:"游戏列表",parameters:[],responses:{200:{description:"返回游戏列表"}},tags:["Manage Game"]}},"/api/manageGame/{gameName}/getGameConfig":{get:{operationId:"ManageGameController_getGameConfig",summary:"获取游戏的配置信息",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置",content:{"application/json":{schema:{$ref:"#/components/schemas/Config"}}}}},tags:["Manage Game"]}},"/api/manageGame/rename":{post:{operationId:"ManageGameController_rename",summary:"游戏名称重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/delete":{post:{operationId:"ManageGameController_deleteFileOrDir",summary:"删除游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteGameDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/{gameName}/relation":{get:{operationId:"ManageGameController_gameRelation",summary:"游戏与资源的关联",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully.",content:{"application/json":{schema:{$ref:"#/components/schemas/GameRelationVo"}}}}},tags:["Manage Game"]}},"/api/llm/{schema}/{type}/{id}/txt/v2":{get:{operationId:"LlmController_txtV2",summary:"Maas文生文",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"type",required:!0,in:"path",schema:{type:"string"}},{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{rid}/features":{get:{operationId:"LlmController_recommendFeatures",summary:"推荐角色人格",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{bgid}/category":{get:{operationId:"LlmController_recommendCategory",summary:"推荐背景分类",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"bgid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/image/upload":{post:{operationId:"LlmController_imageUpload",summary:"大模型图片上传接口",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ImageUploadDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/upload/text":{post:{operationId:"LlmController_uploadText",summary:"上传文本文件返回文本信息",parameters:[],responses:{201:{description:""}},tags:["LLM"]}},"/api/llm/extract/file":{post:{operationId:"LlmController_extractFile",summary:"提取文件内容",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ExtractFileDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchExtraction"}}}}},tags:["LLM"]}},"/api/llm/extract/task":{get:{operationId:"LlmController_extractTask",summary:"获取AI提取任务",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchExtraction"}}}}},tags:["LLM"]}},"/api/llm/extract/{id}/destroy":{delete:{operationId:"LlmController_extractDestroy",summary:"删除AI提取任务",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/add":{post:{operationId:"LlmController_extractAddRole",summary:"添加角色",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/update":{put:{operationId:"LlmController_extractUpdateRole",summary:"更新角色",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/{id}/del":{delete:{operationId:"LlmController_extractDelRole",summary:"删除角色",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}},{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/add":{post:{operationId:"LlmController_extractAddBg",summary:"添加背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/update":{put:{operationId:"LlmController_extractUpdateBg",summary:"更新背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/{id}/del":{delete:{operationId:"LlmController_extractDelBg",summary:"删除背景",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}},{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/batchUpdate":{put:{operationId:"LlmController_extractBatchUpdate",summary:"批量更新角色和背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/batchConfirm":{post:{operationId:"LlmController_extractBatchConfirm",summary:"批量确认保存",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchConfirmRspDto"}}}}},tags:["LLM"]}},"/api/role/role":{post:{operationId:"RoleController_createRole",summary:"保存角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Role"]}},"/api/role/list":{post:{operationId:"RoleController_listRole",summary:"获取该用户下角色列表",parameters:[],requestBody:{required:!0,description:"获取该用户下角色列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}}},tags:["Role"]}},"/api/role/update":{put:{operationId:"RoleController_updateRole",summary:"更新角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"Successfully."}},tags:["Role"]}},"/api/role/batchUpdate":{put:{operationId:"RoleController_batchUpdateRole",summary:"批量更新角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}}},tags:["Role"]}},"/api/role/{rid}":{delete:{operationId:"RoleController_deletedRole",summary:"删除角色",parameters:[{name:"rid",required:!0,in:"path",description:"角色ID",schema:{type:"string"}}],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/resource":{post:{operationId:"ResourceController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateResourceDto"}}}},responses:{201:{description:""}},tags:["Resource"]}},"/api/resource/{id}":{get:{operationId:"ResourceController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]},patch:{operationId:"ResourceController_update",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateResourceDto"}}}},responses:{200:{description:""}},tags:["Resource"]},delete:{operationId:"ResourceController_remove",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]}},"/api/bg/add":{post:{operationId:"BgController_createBg",summary:"保存背景信息",parameters:[],requestBody:{required:!0,description:"保存背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Bg"]}},"/api/bg/list":{post:{operationId:"BgController_list",summary:"获取背景信息列表",parameters:[],requestBody:{required:!0,description:"获取背景信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindBgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Bg"]}},"/api/bg/update":{put:{operationId:"BgController_updateBg",summary:"更新背景信息",parameters:[],requestBody:{required:!0,description:"更新背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Bg"]}},"/api/bg/batchUpdate":{put:{operationId:"BgController_batchUpdateBg",summary:"批量更新背景信息",parameters:[],requestBody:{required:!0,description:"批量更新背景信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}}}}},tags:["Bg"]}},"/api/bg/remove/{bid}":{delete:{operationId:"BgController_remove",summary:"删除背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Bg"]}},"/api/prop/add":{post:{operationId:"PropController_createProp",summary:"保存道具信息",parameters:[],requestBody:{required:!0,description:"保存道具信息",content:{"application/json":{schema:{$ref:"#/components/schemas/PropDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Prop"]}},"/api/prop/list":{post:{operationId:"PropController_list",summary:"获取道具信息列表",parameters:[],requestBody:{required:!0,description:"获取道具信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindPropDto"}}}},responses:{200:{description:"Successfully."}},tags:["Prop"]}},"/api/prop/update":{put:{operationId:"PropController_updateProp",summary:"更新道具信息",parameters:[],requestBody:{required:!0,description:"更新道具信息",content:{"application/json":{schema:{$ref:"#/components/schemas/PropDto"}}}},responses:{200:{description:"Successfully."}},tags:["Prop"]}},"/api/prop/batchUpdate":{put:{operationId:"PropController_batchUpdateProp",summary:"批量更新道具信息",parameters:[],requestBody:{required:!0,description:"批量更新道具信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PropDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PropDto"}}}}}},tags:["Prop"]}},"/api/prop/remove/{id}":{delete:{operationId:"PropController_remove",summary:"删除道具信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Prop"]}},"/api/cg/add":{post:{operationId:"CgController_createCg",summary:"保存Cg信息",parameters:[],requestBody:{required:!0,description:"保存Cg信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Cg"]}},"/api/cg/list":{post:{operationId:"CgController_list",summary:"获取Cg信息列表",parameters:[],requestBody:{required:!0,description:"获取Cg信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindCgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}}},tags:["Cg"]}},"/api/cg/update":{put:{operationId:"CgController_updateCg",summary:"更新Cg信息",parameters:[],requestBody:{required:!0,description:"更新Cg信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Cg"]}},"/api/cg/batchUpdate":{put:{operationId:"CgController_batchUpdateCg",summary:"批量更新Cg信息",parameters:[],requestBody:{required:!0,description:"批量更新Cg信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}}},tags:["Cg"]}},"/api/cg/remove/{id}":{delete:{operationId:"CgController_remove",summary:"删除Cg信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Cg"]}},"/api/editor/addScenes":{post:{operationId:"EditorController_addScenes",summary:"创建章节/场景",parameters:[],requestBody:{required:!0,description:"请求体",content:{"application/json":{schema:{$ref:"#/components/schemas/AddSceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["Editor"]}},"/api/editor/sceneDetail":{post:{operationId:"EditorController_getSceneDetail",summary:"查询场景详情内容",parameters:[],requestBody:{required:!0,description:"查询场景详情内容",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editScene/dialogue":{post:{operationId:"EditorController_editUiSceneDialogue",summary:"更新编辑器对话资源",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DialogueReq"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/editUiScene/resource":{post:{operationId:"EditorController_editUiSceneResource",summary:"更新UI编辑器场景资源",parameters:[],requestBody:{required:!0,description:"更新UI编辑器场景资源",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateUiResourceDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editUiScene/upload":{post:{operationId:"EditorController_uploadUiSceneDialogue",summary:"上传文本更新UI对话资源",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SceneInfoReq"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editTxtScene/upload":{post:{operationId:"EditorController_uploadTxtSceneDialogue",summary:"上传文本更新TXT对话资源",parameters:[],requestBody:{required:!0,description:"更新文本编辑器内容",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneInfoReq"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/scene/command/{id}":{post:{operationId:"EditorController_commandLine",summary:"根据行ID获取指令行",parameters:[{name:"id",required:!0,in:"path",description:"id",schema:{type:"string"}}],requestBody:{required:!0,description:"场景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/bgm/{category}/table":{get:{operationId:"BgmController_table",summary:"获取音乐库数据",parameters:[{name:"category",required:!0,in:"path",schema:{type:"string"}}],responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BgmTableDto"}}}}},tags:["Bgm"]}},"/api/bgm/all":{get:{operationId:"BgmController_all",summary:"获取音乐搜索列表",parameters:[],responses:{default:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BgmListDto"}}}}}},tags:["Bgm"]}},"/api/bgm/link/scene":{post:{operationId:"BgmController_linkScene",summary:"音乐裁剪",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/AudioCutDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bgm"]}},"/api/bgm/excelConvertDb":{post:{operationId:"BgmController_excelConvertDb",parameters:[],responses:{201:{description:""}},tags:["Bgm"]}},"/api/bgm/clearBgm":{post:{operationId:"BgmController_clearBgm",parameters:[],responses:{201:{description:""}},tags:["Bgm"]}},"/api/dict/{type}/{name}":{get:{operationId:"DictController_create",summary:"添加字典数据",parameters:[{name:"type",required:!0,in:"path",schema:{type:"string"}},{name:"name",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Dict"]}},"/api/dict/list":{get:{operationId:"DictController_findAll",summary:"字典列表",parameters:[],responses:{200:{description:""}},tags:["Dict"]}},"/api/canvas/record":{post:{operationId:"CanvasController_record",summary:"记录画布数据",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RecordCanvasDto"}}}},responses:{200:{description:""},500:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ValidateCanvas"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/view":{get:{operationId:"CanvasController_view",summary:"获取最新的画布节点数据",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasView"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/revise/history":{get:{operationId:"CanvasController_history",summary:"获取历史修订列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CanvasHistory"}}}}}},tags:["Canvas"]}},"/api/canvas/{id}/revise/detail":{get:{operationId:"CanvasController_detail",summary:"获取指定修订详情",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasBody"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/node/preview":{post:{operationId:"CanvasController_nodePreview",summary:"节点预览",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},responses:{200:{description:""}},tags:["Canvas"]}},"/api/canvas/{gameName}/revise/remove":{delete:{operationId:"CanvasController_update",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Canvas"]}},"/api/variable/global/record":{post:{operationId:"VariableController_recordVariable",summary:"记录变量信息",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateVariableDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ResultData"}}}}},tags:["Variable"]}},"/api/variable/global/{gameName}/list":{get:{operationId:"VariableController_varList",summary:"获取游戏变量信息列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/variable/{id}":{get:{operationId:"VariableController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Variable"]}},"/api/variable/global/{id}/remove":{delete:{operationId:"VariableController_remove",summary:"删除变量信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/user/login":{post:{operationId:"UserController_login",summary:"用户登录",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{200:{description:"Successfully."}},tags:["User"]}},"/api/user":{post:{operationId:"UserController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{201:{description:""}},tags:["User"]}},"/api/vocal/binding":{post:{operationId:"VocalController_binding",summary:"配音绑定",parameters:[],requestBody:{required:!0,description:"配音绑定",content:{"application/json":{schema:{$ref:"#/components/schemas/VocalBindingDto"}}}},responses:{201:{description:""}},tags:["Vocal"]}},"/api/vocal/record/{event}/{reqId}":{get:{operationId:"VocalController_record",summary:"获取配音结果",parameters:[{name:"event",required:!0,in:"path",schema:{type:"string"}},{name:"reqId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Vocal"]}},"/api/auth/captcha":{get:{operationId:"AuthController_getCaptcha",summary:"获取图形验证码",parameters:[],responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CaptchaRsp"}}}}},tags:["身份鉴权"]}}},r={title:"UMPAY.NETA Terre API",description:"API Refrence of UMPAY.NETA Terre Editor",version:"1.0",contact:{}},s=[],i=[{url:"http://10.10.77.121/dev-api"}],o={schemas:{CompletionDto:{type:"object",properties:{editorValue:{type:"string",description:"Editor input value for which the completion is required"},sceneType:{type:"string",description:"scene file type en or zh"},params:{type:"object",description:"Parameters required for completion"}},required:["editorValue","sceneType","params"]},CreateGameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},gameType:{type:"string",description:"游戏类型"},renderMode:{type:"string",description:"编辑器模式"}},required:["gameName","sectionName","sceneName","editorType","gameType","renderMode"]},Config:{type:"object",properties:{Game_name:{type:"string",description:"游戏名称"},Game_key:{type:"string",description:"游戏标识"},Package_name:{type:"string",description:"所属包名"},Description:{type:"string",description:"游戏描述"},Title_img:{type:"string",description:"标题背景"},Title_bgm:{type:"string",description:"标题背景音乐"},Game_Logo:{type:"string",description:"游戏LOGO"},Debug:{type:"string",description:""},GameNum:{type:"string",description:""},GameNum_Double:{type:"string",description:""},Render_mode:{type:"string",description:"编辑器模式"},Game_type:{type:"string",description:"游戏类型"},Start_node:{type:"string",description:"开始节点"}},required:["Game_name","Game_key","Package_name","Description","Title_img","Title_bgm","Game_Logo","Debug","GameNum","GameNum_Double","Render_mode","Game_type","Start_node"]},GameInfo:{type:"object",properties:{name:{type:"string",description:"游戏名称"},path:{type:"string",description:"游戏路径"},config:{description:"游戏配置",allOf:[{$ref:"#/components/schemas/Config"}]}},required:["name","path","config"]},Progress:{type:"object",properties:{current:{type:"number",description:"进度"},status:{type:"string",description:"进度状态",enum:["0","1","2","3"]},msg:{type:"string",description:"生成信息"}},required:["current","status","msg"]},Picture:{type:"object",properties:{url:{type:"string",description:"图片地址"},check:{type:"boolean",description:"是否选中"}},required:["url","check"]},UpdateBgDto:{type:"object",properties:{id:{type:"string",description:"背景ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"背景名称"},style:{type:"string",description:"背景风格"},original:{type:"string",description:"原文(背景描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"背景图片"},list:{description:"背景图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},word:{type:"string",description:"背景正向提示词"},tlmId:{type:"string",description:"背景对应大模型输出ID"},category:{description:"背景分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},stage:{type:"string",description:"生成阶段",enum:["prompts","bg"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","url","list","word","tlmId","category","stage","progress"]},BatchBg:{type:"object",properties:{progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},list:{description:"背景数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}},required:["progress","list"]},Frame:{type:"object",properties:{eyesHalfOpen:{type:"string",description:"半闭眼"},eyesClose:{type:"string",description:"闭眼"},mouthHalfOpen:{type:"string",description:"半张嘴"},mouthOpen:{type:"string",description:"张嘴"}},required:["eyesHalfOpen","eyesClose","mouthHalfOpen","mouthOpen"]},Category:{type:"object",properties:{categoryValue:{type:"string",description:"表情差分类别值(一级)"},categoryLabel:{type:"string",description:"表情差分类别标签(一级)"},value:{type:"string",description:"表情差分值(二级)"},label:{type:"string",description:"表情差分标签(二级)"}},required:["categoryValue","categoryLabel","value","label"]},Expression:{type:"object",properties:{url:{type:"string",description:"差分图片"},list:{description:"表情变体图",type:"array",items:{$ref:"#/components/schemas/Picture"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},category:{description:"差分类别",allOf:[{$ref:"#/components/schemas/Category"}]},applyGame:{description:"序列帧应用游戏列表",type:"array",items:{type:"string"}}},required:["url","list","frame","category","applyGame"]},UpdateRoleDto:{type:"object",properties:{uid:{type:"string",description:"用户ID"},id:{type:"string",description:"角色ID"},name:{type:"string",description:"角色名字"},gender:{type:"string",description:"性别",enum:["male","female"]},style:{type:"string",description:"风格"},age:{type:"string",description:"年纪",enum:["child","adult","hoariness"]},original:{type:"string",description:"原文(角色描述)"},url:{type:"string",description:"主立绘图片"},list:{description:"备选角色变体",type:"array",items:{$ref:"#/components/schemas/Picture"}},tlmId:{type:"string",description:"角色对应的大模型信息ID"},feature:{type:"string",description:"人格"},word:{type:"string",description:"角色正向提示词"},prompts:{type:"string",description:"提示词(修饰词)"},expressions:{description:"表情差分图",type:"array",items:{$ref:"#/components/schemas/Expression"}},stage:{type:"string",description:"生成阶段",enum:["prompts","figure","expression","frame"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["uid","id","name","gender","style","age","original","url","list","tlmId","feature","word","prompts","expressions","stage","progress"]},BatchRole:{type:"object",properties:{list:{description:"角色数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["list","progress"]},BatchExtraction:{type:"object",properties:{bg:{description:"背景数据",allOf:[{$ref:"#/components/schemas/BatchBg"}]},role:{description:"角色数据",allOf:[{$ref:"#/components/schemas/BatchRole"}]},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]},id:{type:"string",description:"批量提取ID"},uid:{type:"string",description:"用户ID"},gameName:{type:"string",description:"游戏名称"},type:{type:"string",description:"批处理类型",enum:["extract","picture"]}},required:["bg","role","progress","id","uid","gameName","type"]},CreateGame:{type:"object",properties:{gameList:{description:"游戏信息",type:"array",items:{$ref:"#/components/schemas/GameInfo"}},batch:{description:"批量提取任务",allOf:[{$ref:"#/components/schemas/BatchExtraction"}]}},required:["gameList","batch"]},RenameDto:{type:"object",properties:{source:{type:"string",description:"The source path of the file or directory to be renamed"},newName:{type:"string",description:"New name for renaming the file or directory"}},required:["source","newName"]},DeleteGameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"}},required:["gameName"]},RoleRelation:{type:"object",properties:{id:{type:"string",description:"id"},name:{type:"string",description:"角色名字"},url:{type:"string",description:"地址"}},required:["id","name","url"]},GameRelationVo:{type:"object",properties:{role:{description:"角色关联信息",type:"array",items:{$ref:"#/components/schemas/RoleRelation"}}},required:["role"]},ImageUploadDto:{type:"object",properties:{category:{type:"string",description:"图片类别"},original:{type:"string",description:"蒙版对应原始图片名称"}},required:["category","original"]},ExtractFileDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名"}},required:["gameName"]},IDRspDto:{type:"object",properties:{id:{type:"string",description:"ID"}},required:["id"]},BatchBgRoleReqDto:{type:"object",properties:{bg:{description:"背景数据",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}},role:{description:"角色数据",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}},required:["bg","role"]},IdNameDto:{type:"object",properties:{id:{type:"string",description:"ID"},name:{type:"string",description:"名称"}},required:["id","name"]},BatchConfirmRspDto:{type:"object",properties:{success:{description:"成功数据",type:"array",items:{$ref:"#/components/schemas/IdNameDto"}},fail:{description:"失败数据",type:"array",items:{$ref:"#/components/schemas/IdNameDto"}}},required:["success","fail"]},FindRoleDto:{type:"object",properties:{name:{type:"string",description:"角色名称"}},required:["name"]},Remark:{type:"object",properties:{applyFrame:{description:"应用差分帧图",type:"array",items:{type:"string"}}},required:["applyFrame"]},CreateResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"},path:{type:"string",description:"资源路径"},list:{description:"备选图",type:"array",items:{type:"string"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},type:{type:"string",description:"资源类型",enum:["figure","background","bgm"]},uid:{type:"string",description:"用户ID"},pid:{type:"string",description:"父级资源ID"},category:{description:"分类",allOf:[{$ref:"#/components/schemas/Category"}]},remark:{description:"备注",allOf:[{$ref:"#/components/schemas/Remark"}]}},required:["name","path","list","frame","type","uid","pid","category","remark"]},UpdateResourceDto:{type:"object",properties:{}},FindBgDto:{type:"object",properties:{name:{type:"string",description:"背景名称"}},required:["name"]},PropDto:{type:"object",properties:{id:{type:"string",description:"道具ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"道具名称"},style:{type:"string",description:"道具风格"},original:{type:"string",description:"原文(道具描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"道具图片"},list:{description:"道具图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},tlmId:{type:"string",description:"道具对应大模型输出ID"},category:{description:"道具分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},size:{type:"string",description:"道具大小",example:"middle"},stage:{type:"string",description:"生成阶段",enum:["prompts","prop"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","url","list","tlmId","category","size","stage","progress"]},FindPropDto:{type:"object",properties:{name:{type:"string",description:"道具名称"}},required:["name"]},CgDto:{type:"object",properties:{id:{type:"string",description:"Cg ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"Cg名称"},style:{type:"string",description:"Cg风格"},original:{type:"string",description:"原文(Cg描述)"},prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"Cg对应大模型输出ID"},mood:{description:"角色情绪",type:"array",items:{type:"string"}},role:{type:"string",description:"关联角色ID"},factor:{description:"影响因子",type:"array",items:{type:"string"}},atmosphere:{type:"string",description:"画面氛围"},url:{type:"string",description:"Cg图片"},list:{description:"Cg图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},stage:{type:"string",description:"生成阶段",enum:["prompts","cg"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","list","stage","progress"]},FindCgDto:{type:"object",properties:{name:{type:"string",description:"Cg名称"}},required:["name"]},ResultData:{type:"object",properties:{code:{type:"number",default:200},msg:{type:"string",default:"ok"},data:{type:"any",default:null,nullable:!0}},required:["code","msg","data"]},AddSceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称"},sceneName:{description:"场景列表",type:"array",items:{type:"string"}}},required:["gameName","sectionName","sceneName"]},SceneDetailDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},sceneType:{type:"string",description:"场景类型"}},required:["gameName","sectionName","sceneName","editorType","sceneType"]},Role:{type:"object",properties:{id:{type:"string",description:"角色ID"},emotion:{type:"string",description:"表情"},name:{type:"string",description:"角色名称"},gender:{type:"string",description:"角色性别",enum:["male","female"]}},required:["id","emotion","name","gender"]},Vocal:{type:"object",properties:{hash:{type:"string",description:"hash"},timbre:{type:"string",description:"音色"},vocal:{type:"string",description:"配音文件(不包含路径)"},url:{type:"string",description:"配音地址"}},required:["hash","timbre","vocal","url"]},Prop:{type:"object",properties:{id:{type:"string",description:"道具ID"},name:{type:"string",description:"道具名称"}},required:["id","name"]},LineDto:{type:"object",properties:{id:{type:"string",description:"行ID"},content:{type:"string",description:"内容"},command:{type:"array",description:"命令",items:{type:"string",enum:["prop","narr","clp","bst","bgi","bgm","cg","cp"]}},role:{description:"角色",allOf:[{$ref:"#/components/schemas/Role"}]},vocal:{description:"配音",allOf:[{$ref:"#/components/schemas/Vocal"}]},prop:{description:"道具",allOf:[{$ref:"#/components/schemas/Prop"}]}},required:["id","content","command","role","vocal","prop"]},DialogueReq:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}}},required:["gameName","sectionName","sceneName","editorType","dialogues"]},Figure:{type:"object",properties:{name:{type:"string",description:"立绘名称"},path:{type:"string",description:"图片路径"}},required:["name","path"]},BgmVO:{type:"object",properties:{audio:{type:"string",description:"音乐"},url:{type:"string",description:"URL"},loop:{type:"boolean",description:"是否循环"},volume:{type:"number",description:"音量0-100"},rate:{type:"number",description:"播放速度"}},required:["audio","url","loop","volume","rate"]},SceneDetailRsp:{type:"object",properties:{scene:{type:"string",description:"场景文件名"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}},figures:{description:"立绘信息(拥有资源的角色)",type:"array",items:{$ref:"#/components/schemas/Figure"}},bg:{type:"string",description:"背景"},cg:{type:"string",description:"CG"},bgm:{description:"音乐",allOf:[{$ref:"#/components/schemas/BgmVO"}]},isBatchVocal:{type:"boolean",description:"批量配音"}},required:["scene","dialogues","figures","bg","cg","bgm","isBatchVocal"]},UpdateUiResourceDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},bg:{type:"string",description:"更新背景"},cg:{type:"string",description:"更新CG"},clearBg:{type:"boolean",description:"清除背景"},clearCg:{type:"boolean",description:"清除CG"}},required:["gameName","sectionName","sceneName","editorType","bg","cg","clearBg","clearCg"]},SceneInfoReq:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"}},required:["gameName","sectionName","sceneName","editorType"]},SceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"}},required:["gameName","sectionName","sceneName","editorType"]},Title:{type:"object",properties:{column:{type:"string",description:"列标签"},name:{type:"string",description:"列名称"}},required:["column","name"]},StockColumnData:{type:"object",properties:{locationId:{type:"string",description:"位置ID"},id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐相对地址"}},required:["locationId","id","name","url"]},StockColumn:{type:"object",properties:{column:{type:"string",description:"列值"},data:{description:"行标签对应列数据",type:"array",items:{$ref:"#/components/schemas/StockColumnData"}}},required:["column","data"]},Stock:{type:"object",properties:{name:{type:"string",description:"行标签名称"},columns:{description:"行标签对应列数据",type:"array",items:{$ref:"#/components/schemas/StockColumn"}}},required:["name","columns"]},BgmTableDto:{type:"object",properties:{title:{description:"音乐库表头",type:"array",items:{$ref:"#/components/schemas/Title"}},stock:{description:"音乐库数据",type:"array",items:{$ref:"#/components/schemas/Stock"}}},required:["title","stock"]},BgmListDto:{type:"object",properties:{locationId:{type:"string",description:"位置ID"},id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐地址"},category:{type:"string",description:"音乐类型"}},required:["locationId","id","name","url","category"]},AudioCutDto:{type:"object",properties:{uid:{type:"string",description:"用户ID"},gameName:{type:"string",description:"游戏名"},sceneName:{type:"string",description:"场景名称"},audio:{type:"string",description:"音乐名"},url:{type:"string",description:"音乐库地址"},loop:{type:"string",description:"是否循环"},volume:{type:"number",description:"音量0-100"},rate:{type:"number",description:"播放速度"}},required:["uid","gameName","sceneName","audio","url","loop","volume","rate"]},Variable:{type:"object",properties:{id:{type:"string"},alias:{type:"string"},name:{type:"string"}},required:["id","alias","name"]},ExpValue:{type:"object",properties:{value:{type:"number"},exp:{type:"string"}},required:["value","exp"]},ICondition:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},IOptions:{type:"object",properties:{name:{type:"string",description:"选项名称"},nodeId:{type:"string",description:"关联的节点"},sound:{type:"string",description:"绑定音频"},varId:{type:"string",description:"选定的变量ID"},alias:{type:"string",description:"选定的变量"},varValue:{type:"number",description:"设定的变量值"},advanced:{description:"高级选项",allOf:[{$ref:"#/components/schemas/ICondition"}]}},required:["name","nodeId","sound","varId","alias","varValue","advanced"]},NodeData:{type:"object",properties:{label:{type:"string",description:"节点名称"},chapterId:{type:"string",description:"章节id"},background:{type:"string",description:"绑定背景"},options:{description:"选项",type:"array",items:{$ref:"#/components/schemas/IOptions"}}},required:["label","chapterId","background","options"]},Node:{type:"object",properties:{id:{type:"string",description:"id"},type:{type:"string",description:"类型"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/NodeData"}]}},required:["id","type","data"]},EdgeData:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},Edge:{type:"object",properties:{id:{type:"string",description:"id"},source:{type:"string"},target:{type:"string"},data:{$ref:"#/components/schemas/EdgeData"}},required:["id","source","target","data"]},CanvasBody:{type:"object",properties:{nodes:{description:"节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["nodes","edges"]},Valid:{type:"object",properties:{id:{type:"string"},msg:{type:"string"},type:{type:"string"}},required:["id","msg","type"]},ValidateCanvas:{type:"object",properties:{only:{description:"节点重复集",allOf:[{$ref:"#/components/schemas/Valid"}]},scene:{description:"场景报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},branch:{description:"节点报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},edge:{description:"边报错集",allOf:[{$ref:"#/components/schemas/Valid"}]}},required:["only","scene","branch","edge"]},CanvasHistory:{type:"object",properties:{_id:{type:"string",description:"画布ID"},updatedAt:{type:"string",description:"更新时间"},createdAt:{type:"string",description:"创建时间"}},required:["_id","updatedAt","createdAt"]},RecordCanvasDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},nodes:{description:"画布节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"画布边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["gameName","nodes","edges"]},CanvasView:{type:"object",properties:{canvas:{description:"节点信息",allOf:[{$ref:"#/components/schemas/CanvasBody"}]},valid:{description:"校验信息",allOf:[{$ref:"#/components/schemas/ValidateCanvas"}]}},required:["canvas","valid"]},UpdateVariableDto:{type:"object",properties:{id:{type:"string",description:"变量表ID"}},required:["id"]},CreateUserDto:{type:"object",properties:{_id:{type:"string",description:"ID"},username:{type:"string",description:"用户名"},password:{type:"string",description:"密码"},nickname:{type:"string",description:"昵称(可选填)"},caId:{type:"string",description:"验证码ID"},captcha:{type:"string",description:"用户输入验证码"},secret:{type:"string",description:""}},required:["_id","username","password","nickname","caId","captcha","secret"]},VocalBindingDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},uid:{type:"string",description:"用户标识"},sentence:{type:"string",description:"行标识"},timbre:{type:"string",description:"音色"},url:{type:"string",description:"配音相对地址"}},required:["gameName","sectionName","sceneName","editorType","uid","sentence","timbre","url"]},VocalUntieDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},uid:{type:"string",description:"用户标识"},sentence:{type:"string",description:"行标识"},url:{type:"string",description:"解绑配音相对地址"}},required:["gameName","sectionName","sceneName","editorType","uid","sentence","url"]},CaptchaRsp:{type:"object",properties:{id:{type:"string",description:"id"},data:{type:"string",description:"svg image"}},required:["id","data"]}}},a={openapi:e,paths:t,info:r,tags:s,servers:i,components:o};exports.components=o,exports.default=a,exports.info=r,exports.openapi=e,exports.paths=t,exports.servers=i,exports.tags=s;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.3.20",i="FE command line tool",s="bin/an-cli.js",t={dev:"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript -w",build:"rimraf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",pub:"bash publish.sh",ts:"tsc ./src/int.ts --noEmit --watch"},p={anl:"bin/an-cli.js"},l="Gleason <bianliuzhu@gmail.com>",r={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.3","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},o={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"^10.0.0",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},n=["typescript","cli","typescript 脚手架","ts 脚手架","ts-cli","脚手架"],c=["package.json","README.md","lib","template"],u={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},a="commonjs",g={name:"anl",version:e,description:i,main:s,scripts:t,bin:p,author:l,license:"ISC",devDependencies:r,dependencies:o,keywords:n,files:c,repository:u,type:a};exports.author=l,exports.bin=p,exports.default=g,exports.dependencies=o,exports.description=i,exports.devDependencies=r,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=t,exports.type=a,exports.version=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.3.23",i="FE command line tool",s="bin/an-cli.js",t={dev:"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript -w",build:"rimraf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",pub:"bash publish.sh",ts:"tsc ./src/int.ts --noEmit --watch"},p={anl:"bin/an-cli.js"},l="Gleason <bianliuzhu@gmail.com>",r={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.3","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},o={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"^10.0.0",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},n=["typescript","cli","typescript 脚手架","ts 脚手架","ts-cli","脚手架"],c=["package.json","README.md","lib","template"],u={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},a="commonjs",g={name:"anl",version:e,description:i,main:s,scripts:t,bin:p,author:l,license:"ISC",devDependencies:r,dependencies:o,keywords:n,files:c,repository:u,type:a};exports.author=l,exports.bin=p,exports.default=g,exports.dependencies=o,exports.description=i,exports.devDependencies=r,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=t,exports.type=a,exports.version=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const r="\t";exports.default=class{defaultReturn={headerRef:"",renderStr:""};schemas={};schemasMap=new Map;config;constructor(e,r){this.schemas=e,this.config=r}typeNameToFileName(e){return e.replace(/_/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().replace(/-+/g,"-")}nameTheHumpCenterStroke(e){const r=e.replace("#/components/schemas/","");return{typeName:r,fileName:this.typeNameToFileName(r)}}parseRef(e){if(!e)return{headerRefStr:"",typeName:""};const{fileName:r,typeName:t}=this.nameTheHumpCenterStroke(e);return{headerRefStr:`import type { ${t} } from './${r}';`,typeName:t}}parseObject(e,r){let t="",s="";if("object"===e.type){const a=e;if("object"==typeof a.additionalProperties){const e=this.parseArray(a.additionalProperties,r)??this.defaultReturn;t=e.headerRef,s=e.renderStr}}return{headerRef:t,renderStr:s}}parseArray(e,t){let s="",a="";const n=e;if(n.items?.$ref){const{headerRefStr:e,typeName:i}=this.parseRef(n.items.$ref);s=e,a=`${r}${t}?: Array<${i}>;`}else{const e=n.items;a=`${r}${t}?: Array<${"integer"===e.type?"number":e.type}>;`}return{headerRef:s,renderStr:a}}parseBoolean(e,t){return"boolean"===e.type?`${r}${t}?: boolean;`:""}parseEnum(e,t){if("integer"===e.type&&Array.isArray(e.enum)){return[`export enum ${t} {`,...e.enum.map((e=>`${r}NUMBER_${e} = ${e},`)),"}"].join("\n")}return""}parseInteger(e,t){return Array.isArray(e.enum)?this.parseEnum(e,t):`${r}${t}?: number;`}parseNumber(e,t){return"number"===e.type?`${r}${t}?: number;`:""}parseString(e,t){return"string"===e.type?{headerRef:"",renderStr:`${r}${t}?: string;`}:null}parseProperties(e,t){const s=[],a=[];for(const t in e){const n=e[t];if(n?.$ref){const{headerRefStr:e,typeName:i}=this.parseRef(n.$ref);a.includes(e)||a.push(e),s.push(`${r}${t}?: ${i};`)}else{if("allOf"in n){const e=n.allOf?.[0];if(e?.$ref){const{headerRefStr:n,typeName:i}=this.parseRef(e.$ref);a.includes(n)||a.push(n),s.push(`${r}${t}?: ${i};`);continue}}switch(n.type){case"array":{const e=this.parseArray(n,t)??this.defaultReturn;s.push(e.renderStr),a.includes(e.headerRef)||a.push(e.headerRef)}break;case"boolean":s.push(this.parseBoolean(n,t));break;case"integer":s.push(this.parseInteger(n,t));break;case"number":s.push(this.parseNumber(n,t));break;case"string":s.push(this.parseString(n,t)?.renderStr??"");break;case"object":{const{headerRef:e,renderStr:r}=this.parseObject(n,t)??this.defaultReturn;s.push(r),a.includes(e)||a.push(e)}}}}const n=`export interface ${t} {`;return[...a,"\n",n,...s,"}"].join("\n")}async parse(){for(const e in this.schemas){const r=this.schemas[e],t=r;if("$ref"in r){console.warn("ReferenceObject 未处理");continue}const s="type"in t?t:null,a=this.typeNameToFileName(e);if(s)if("items"in s)console.log("未处理---------------------------\x3e",s.items);else{let r="";switch(s.type){case"boolean":r=this.parseBoolean(s,e);break;case"integer":r=this.parseInteger(s,e);break;case"number":r=this.parseNumber(s,e);break;case"object":r=this.parseProperties(s.properties,e);break;case"string":r=this.parseString(s,e)?.renderStr??""}this.schemasMap.set(e,{fileName:a,content:r})}}}async writeFileHandler(){const r=[],t=[],s=`${this.config.saveTypeFolderPath}/models/`;for(const[,a]of this.schemasMap){const n=async({fileName:r,content:a})=>{t.push(`export * from './${r}';`),await e.writeFileRecursive(`${s}${r}.ts`,a)};r.push(n(a))}await Promise.all(r),await e.writeFileRecursive(`${s}/index.ts`,t.join("\n")),console.log("components done!")}async handle(){await this.parse(),await this.writeFileHandler()}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const r="\t";exports.default=class{defaultReturn={headerRef:"",renderStr:""};schemas={};schemasMap=new Map;config;constructor(e,r){this.schemas=e,this.config=r}fieldComment(e){const{description:r}=e;if(r){return["\t","/**","\n",`\t * ${r}`,"\n","\t */"].join("")}return""}typeNameToFileName(e){return e.replace(/_/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().replace(/-+/g,"-")}nameTheHumpCenterStroke(e){const r=e.replace("#/components/schemas/","");return{typeName:r,fileName:this.typeNameToFileName(r)}}parseRef(e){if(!e?.trim())return{headerRefStr:"",typeName:""};const{fileName:r,typeName:t}=this.nameTheHumpCenterStroke(e);return{headerRefStr:`import type { ${t} } from './${r}';`,typeName:t}}parseObject(e,t){let s="",n="";if("object"===e.type){const a=e;if("object"==typeof a.additionalProperties){const e=this.parseArray(a.additionalProperties,t)??this.defaultReturn;s=e.headerRef,n=e.renderStr}else n=`${r}${t}: ${e.type};`}return{headerRef:s,renderStr:n}}parseArray(e,t){const{items:s={},nullable:n}=e,a=s?.$ref;if(a){const{headerRefStr:e,typeName:s}=this.parseRef(a);return{headerRef:e,renderStr:`${r}${t}${n?"?":""}: Array<${s}>;`}}const i=s?.type;return{headerRef:"",renderStr:`${r}${t}${n?"?":""}: Array<${"integer"===i?"number":i}>;`}}parseBoolean(e,t){return"boolean"===e.type?`${r}${t}: boolean;`:""}parseEnum(e,t){if("integer"===e.type&&Array.isArray(e.enum)){return[`export enum ${t} {`,...e.enum.map((e=>`${r}NUMBER_${e} = ${e},`)),"}"].join("\n")}return""}parseInteger(e,t){return Array.isArray(e.enum)?this.parseEnum(e,t):`${r}${t}: number;`}parseNumber(e,t){return"number"===e.type?`${r}${t}: number;`:""}parseString(e,t){return"string"===e.type?{headerRef:"",renderStr:`${r}${t}: string;`}:null}parseProperties(e,t){const s=[],n=[];for(const t in e){const a=e[t];if(a?.$ref){const{headerRefStr:e,typeName:i}=this.parseRef(a.$ref);n.includes(e)||n.push(e),s.push(`${r}${t}: ${i};`);continue}if("allOf"in a){const e=a.allOf?.[0];if(e?.$ref){const{headerRefStr:a,typeName:i}=this.parseRef(e.$ref);n.includes(a)||n.push(a),s.push(`${r}${t}: ${i};`);continue}}const i=this.fieldComment(a);switch(""!==i&&s.push(i),a.type){case"array":{const e=this.parseArray(a,t)??this.defaultReturn;s.push(e.renderStr),n.includes(e.headerRef)||n.push(e.headerRef)}break;case"boolean":s.push(this.parseBoolean(a,t));break;case"integer":s.push(this.parseInteger(a,t));break;case"number":s.push(this.parseNumber(a,t));break;case"string":s.push(this.parseString(a,t)?.renderStr??"");break;case"object":{const{headerRef:e,renderStr:r}=this.parseObject(a,t)??this.defaultReturn;s.push(r),n.includes(e)||n.push(e)}}}const a=[`export interface ${t} {`,...s,"}"];if(n.length>0){const e=n.filter((e=>""!==e));e.length>0&&e.push(""),a.unshift(...e)}return a.join("\n")}async parse(){try{if(!this.schemas)return void console.warn("schemas 为空");for(const[e,r]of Object.entries(this.schemas)){if("$ref"in r){console.warn(`跳过 ReferenceObject: ${e}`);continue}const t="type"in r?r:null;if(!t?.type){console.warn(`无效的 schema 对象: ${e}`);continue}const s=this.typeNameToFileName(e),n=await this.generateContent(t,e);n&&this.schemasMap.set(e,{fileName:s,content:n})}}catch(e){throw console.error("解析过程出错:",e),e}}async generateContent(e,r){if("items"in e)return console.warn(`数组类型未处理: ${r}`,e.items),"";switch(e.type){case"boolean":return this.parseBoolean(e,r);case"integer":return this.parseInteger(e,r);case"number":return this.parseNumber(e,r);case"object":return this.parseProperties(e.properties,r);case"string":return this.parseString(e,r)?.renderStr??"";default:return""}}async writeFileHandler(){const r=[],t=[],s=`${this.config.saveTypeFolderPath}/models/`;for(const[,n]of this.schemasMap){const a=async({fileName:r,content:n})=>{t.push(`export * from './${r}';`),await e.writeFileRecursive(`${s}${r}.ts`,n)};r.push(a(n))}await Promise.all(r),await e.writeFileRecursive(`${s}/index.ts`,t.join("\n")),console.log("components done!")}async handle(){await this.parse(),await this.writeFileHandler()}};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),s=require("../../data/umf.json.js"),t=require("../utils/index.js"),r=require("./core/components.js"),a=require("./core/get-data.js"),n=require("./core/path.js"),o=require("shelljs");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=i(e);const l={saveTypeFolderPath:"apps/types",apiListFilePath:"apps/services",swaggerJsonUrl:"",requestMethodsImportPath:"./fetch",indent:"\t",headers:{}};class c{schemas={};paths={};handle(e){return"development"===process.env.NODE_ENV?new Promise(((t,a)=>{const o=s.default;this.schemas=o.components?.schemas,this.paths=o.paths;new r.default(this.schemas,e).handle();return new n.PathParse(this.paths,e).handle(),t(!0)})):new Promise((s=>{if(!e.swaggerJsonUrl)return s({});a.getSwaggerJson(e).then((t=>{const a=t;this.schemas=a.components?.schemas,this.paths=a.paths;new r.default(this.schemas,e).handle();new n.PathParse(this.paths,e).handle(),s({})})).catch((()=>{s({})}))}))}initialize(){const e=process.cwd()+"/an.config.json";t.isFileExisted(e).then((()=>{h.default.readFile(e,"utf8",((e,s)=>{if(e)return void console.error(e);const r=JSON.parse(s);console.log("config ----\x3e",r),t.clearDir(r.saveTypeFolderPath).then((()=>{this.handle(r).then((e=>{console.log("format: ",`npx prettier --write "${r.saveTypeFolderPath}/**/*.{ts,d.ts}"`),o.exec(`npx prettier --write "${r.saveTypeFolderPath}/**/*.{ts,d.ts}"`)})).catch((e=>{console.log(e)}))}))}))})).catch((s=>{console.error("配置文件不存在,将自动创建配置文件!"),t.clearDir(l.saveTypeFolderPath).then((()=>{t.writeFileRecursive(e,JSON.stringify(l,null,2)).catch((e=>{console.log(e)})).finally((()=>{this.handle(l)}))}))}))}}if("development"===process.env.NODE_ENV){(new c).initialize()}exports.Main=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),s=require("../../data/umf.json.js"),t=require("../utils/index.js"),r=require("./core/components.js"),a=require("./core/get-data.js"),n=require("./core/path.js"),i=require("shelljs");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=o(e);const l={saveTypeFolderPath:"apps/types",apiListFilePath:"apps/services",swaggerJsonUrl:"",requestMethodsImportPath:"./fetch",indent:"\t",headers:{}};class c{schemas={};paths={};handle(e){return"development"===process.env.NODE_ENV?new Promise(((t,a)=>{const i=s.default;this.schemas=i.components?.schemas,this.paths=i.paths;new r.default(this.schemas,e).handle();return new n.PathParse(this.paths,e).handle(),t(!0)})):new Promise((s=>{if(!e.swaggerJsonUrl)return s({});a.getSwaggerJson(e).then((t=>{const a=t;this.schemas=a.components?.schemas,this.paths=a.paths;new r.default(this.schemas,e).handle();new n.PathParse(this.paths,e).handle(),s({})})).catch((()=>{s({})}))}))}initialize(){const e=process.cwd()+"/an.config.json";t.isFileExisted(e).then((()=>{h.default.readFile(e,"utf8",((e,s)=>{if(e)return void console.error(e);const r=JSON.parse(s);console.log("config ----\x3e",r),t.clearDir(r.saveTypeFolderPath).then((()=>{this.handle(r).then((()=>{i.exec(`npx prettier --write "${r.saveTypeFolderPath}/**/*.{ts,d.ts}"`),t.log.warning(`format: npx prettier --write "${r.saveTypeFolderPath}/**/*.{ts,d.ts}"`)})).catch((e=>{console.log(e)}))}))}))})).catch((()=>{t.log.warning("配置文件不存在,将自动创建配置文件!"),t.clearDir(l.saveTypeFolderPath).then((()=>{t.writeFileRecursive(e,JSON.stringify(l,null,2)).catch((e=>{t.log.error(e)})).finally((()=>{this.handle(l)}))}))}))}}if("development"===process.env.NODE_ENV){(new c).initialize()}exports.Main=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("chalk"),r=require("fs"),t=require("ora");require("path");var o=require("shelljs");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(e),n=s(r);const u={info:e=>console.log(l.default.dim(e)),error:e=>console.log(l.default.red( ${e}`)),success:e=>console.log(l.default.green(`✔ ${e}`)),warning:e=>console.log(l.default.yellow(`⚠️ ${e}`)),load:e=>console.log(l.default.dim(`☯︎ ${e}`))},i=s(t).default(),a={stop:()=>i.stop(),error:e=>i.fail(`❌ ${l.default.red(e)}`),start:e=>{i.text=l.default.blue(e),i.start()},success:e=>{i.stopAndPersist({symbol:l.default.green("✔"),text:l.default.green(e)})}};exports.clearDir=function(e){return new Promise(((r,t)=>{try{o.exec(`rm -rf ${e}`),r(!0)}catch(e){console.error(e),t(!1)}}))},exports.isFileExisted=function(e){return new Promise(((r,t)=>{n.default.access(e,(e=>{e?t(!1):r(!0)}))}))},exports.log=u,exports.spinner=a,exports.writeFileRecursive=function(e,r){return new Promise(((t,o)=>{try{const s=e.substring(0,e.lastIndexOf("/"));n.default.mkdir(s,{recursive:!0},(s=>{if(s)return o(!1);n.default.writeFile(e,r,(function(e){if(e)return o(!1);t(!0)}))}))}catch(e){console.error(e),o(e)}}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("chalk"),r=require("fs"),t=require("ora");require("path");var o=require("shelljs");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(e),n=s(r);const u={info:e=>console.log(l.default.dim(e)),error:e=>console.log(l.default.red(`❌ ${e}`)),success:e=>console.log(l.default.green(`🥂 ${e}`)),warning:e=>console.log(l.default.yellow(`❗️ ${e}`)),load:e=>console.log(l.default.dim(`🌐 ${e}`))},i=s(t).default(),a={stop:()=>i.stop(),error:e=>i.fail(`❌ ${l.default.red(e)}`),start:e=>{i.text=l.default.blue(e),i.start()},success:e=>{i.stopAndPersist({symbol:l.default.green("✔"),text:l.default.green(e)})}};exports.clearDir=function(e){return new Promise(((r,t)=>{try{o.exec(`rm -rf ${e}`),r(!0)}catch(e){console.error(e),t(!1)}}))},exports.isFileExisted=function(e){return new Promise(((r,t)=>{n.default.access(e,(e=>{e?t(!1):r(!0)}))}))},exports.log=u,exports.spinner=a,exports.writeFileRecursive=function(e,r){return new Promise(((t,o)=>{try{const s=e.substring(0,e.lastIndexOf("/"));n.default.mkdir(s,{recursive:!0},(s=>{if(s)return o(!1);n.default.writeFile(e,r,(function(e){if(e)return o(!1);t(!0)}))}))}catch(e){console.error(e),o(e)}}))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anl",
3
- "version": "1.3.21",
3
+ "version": "1.3.23",
4
4
  "description": "FE command line tool",
5
5
  "main": "bin/an-cli.js",
6
6
  "scripts": {