anl 1.7.6 → 1.7.7
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.
- package/README.ar.md +0 -1
- package/README.es.md +0 -1
- package/README.fr.md +0 -1
- package/README.jp.md +0 -1
- package/README.md +0 -1
- package/README.ru.md +0 -1
- package/README.zh.md +0 -1
- package/lib/data/umf.json.js +1 -0
- package/lib/package.json.js +1 -1
- package/lib/src/build-type/core/components.js +1 -1
- package/lib/src/build-type/index.js +1 -1
- package/package.json +1 -1
- package/lib/data/openapi.json.js +0 -1
package/README.ar.md
CHANGED
|
@@ -158,7 +158,6 @@ project/
|
|
|
158
158
|
│ │ ├── models/ # جميع ملفات تعريف الأنواع (باستثناء أنواع التعداد) غير مُتحكم به
|
|
159
159
|
│ │ ├── connectors/ # تعريفات نوع API (ملفات تعريف الواجهة) غير مُتحكم به
|
|
160
160
|
│ └── api/ # ملف الطلب: محدد بواسطة عنصر التكوين saveApiListFolderPath
|
|
161
|
-
│ │ ├── fetch.ts # تنفيذ طريقة الطلب غير مُتحكم به
|
|
162
161
|
│ │ └── index.ts # قائمة دوال طلبات API غير مُتحكم به
|
|
163
162
|
│ │ └── api-type.d.ts # ملف تعريف نوع الطلب غير مُتحكم به
|
|
164
163
|
│ │ └── config.ts # الطلب، اعتراض الاستجابة، تكوين الطلب غير مُتحكم به
|
package/README.es.md
CHANGED
|
@@ -156,7 +156,6 @@ project/
|
|
|
156
156
|
│ │ ├── models/ # Todos los archivos de definición de tipos (sin incluir tipos enum) no controlado
|
|
157
157
|
│ │ ├── connectors/ # Definiciones de tipos API (archivos de definición de interfaz) no controlado
|
|
158
158
|
│ └── api/ # Archivos de solicitud: especificado por el elemento de configuración saveApiListFolderPath
|
|
159
|
-
│ │ ├── fetch.ts # Implementación de métodos de solicitud no controlado
|
|
160
159
|
│ │ └── index.ts # Lista de funciones de solicitud API no controlado
|
|
161
160
|
│ │ └── api-type.d.ts # Archivo de definición de tipos de solicitud no controlado
|
|
162
161
|
│ │ └── config.ts # Solicitud, interceptor de respuesta, configuración de solicitud no controlado
|
package/README.fr.md
CHANGED
|
@@ -158,7 +158,6 @@ project/
|
|
|
158
158
|
│ │ ├── models/ # Tous les fichiers de définition de types (excluant les types enum) non contrôlé
|
|
159
159
|
│ │ ├── connectors/ # Définitions de types API (fichiers de définition d'interface) non contrôlé
|
|
160
160
|
│ └── api/ # Fichiers de requête : Spécifié par l'élément de configuration saveApiListFolderPath
|
|
161
|
-
│ │ ├── fetch.ts # Implémentation des méthodes de requête non contrôlé
|
|
162
161
|
│ │ └── index.ts # Liste des fonctions de requête API non contrôlé
|
|
163
162
|
│ │ └── api-type.d.ts # Fichier de définition de types de requête non contrôlé
|
|
164
163
|
│ │ └── config.ts # Configuration de requête, interception de requête/réponse non contrôlé
|
package/README.jp.md
CHANGED
|
@@ -158,7 +158,6 @@ project/
|
|
|
158
158
|
│ │ ├── models/ # すべての型定義ファイル(列挙型を除く)制御外
|
|
159
159
|
│ │ ├── connectors/ # API 型定義(インターフェース定義ファイル)制御外
|
|
160
160
|
│ └── api/ # リクエストファイル:saveApiListFolderPath 設定項目で指定
|
|
161
|
-
│ │ ├── fetch.ts # リクエストメソッド実装 制御外
|
|
162
161
|
│ │ └── index.ts # API リクエスト関数リスト 制御外
|
|
163
162
|
│ │ └── api-type.d.ts # リクエスト型定義ファイル 制御外
|
|
164
163
|
│ │ └── config.ts # リクエスト、レスポンスインターセプター、リクエスト設定 制御外
|
package/README.md
CHANGED
|
@@ -156,7 +156,6 @@ project/
|
|
|
156
156
|
│ │ ├── models/ # All type definition files (excluding enum types) uncontrolled
|
|
157
157
|
│ │ ├── connectors/ # API type definitions (interface definition files) uncontrolled
|
|
158
158
|
│ └── api/ # Request files: Specified by saveApiListFolderPath configuration item
|
|
159
|
-
│ │ ├── fetch.ts # Request method implementation uncontrolled
|
|
160
159
|
│ │ └── index.ts # API request function list uncontrolled
|
|
161
160
|
│ │ └── api-type.d.ts # Request type definition file uncontrolled
|
|
162
161
|
│ │ └── config.ts # Request, response interceptor, request configuration uncontrolled
|
package/README.ru.md
CHANGED
|
@@ -158,7 +158,6 @@ project/
|
|
|
158
158
|
│ │ ├── models/ # Все файлы определений типов (не включая типы enum) неконтролируемые
|
|
159
159
|
│ │ ├── connectors/ # Определения типов API (файлы определений интерфейсов) неконтролируемые
|
|
160
160
|
│ └── api/ # Файлы запросов: указывается элементом конфигурации saveApiListFolderPath
|
|
161
|
-
│ │ ├── fetch.ts # Реализация методов запросов неконтролируемая
|
|
162
161
|
│ │ └── index.ts # Список функций API-запросов неконтролируемый
|
|
163
162
|
│ │ └── api-type.d.ts # Файл определений типов запросов неконтролируемый
|
|
164
163
|
│ │ └── config.ts # Конфигурация запросов, перехватчиков ответов, конфигурация запросов неконтролируемая
|
package/README.zh.md
CHANGED
|
@@ -158,7 +158,6 @@ project/
|
|
|
158
158
|
│ │ ├── models/ # 所有类型定义文件(不包含枚举类型) 不受控
|
|
159
159
|
│ │ ├── connectors/ # API 类型定义(接口定义文件)不受控
|
|
160
160
|
│ └── api/ # 请求文件:由 saveApiListFolderPath 配置项指定
|
|
161
|
-
│ │ ├── fetch.ts # 请求方法实现 不受控
|
|
162
161
|
│ │ └── index.ts # API 请求函数列表 不受控
|
|
163
162
|
│ │ └── api-type.d.ts # 请求类型定义文件 不受控
|
|
164
163
|
│ │ └── config.ts # 请求、响应拦截、请求配置 不受控
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.0",t={"/api/games":{post:{operationId:"GameController_createGame",summary:"创建新的游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameDTO"}}}},responses:{200:{description:"返回游戏列表",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameRspVo"}}}}},tags:["游戏"]},get:{operationId:"GameController_getGameList",summary:"游戏列表",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/GameVO"}}}}}},tags:["游戏"]}},"/api/games/{gameId}/config":{get:{operationId:"GameController_getGameConfig",summary:"获取游戏配置信息",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置",content:{"application/json":{schema:{$ref:"#/components/schemas/GameVO"}}}}},tags:["游戏"]}},"/api/games/{gameId}":{patch:{operationId:"GameController_rename",summary:"游戏名称重命名",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully"}},tags:["游戏"]},delete:{operationId:"GameController_deleteFileOrDir",summary:"删除游戏",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully"}},tags:["游戏"]}},"/api/games/{gameId}/sync":{get:{operationId:"GameController_getGameChapterSync",summary:"游戏发布到商城",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/GameChapterSyncVO"}}}}},tags:["游戏"]},post:{operationId:"GameController_pushGameChapterSync",summary:"游戏发布到商城",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"节点信息",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}},responses:{201:{description:""}},tags:["游戏"]}},"/api/engine/config":{get:{operationId:"EngineController_getGameConfig",summary:"获取游戏配置信息",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置",content:{"application/json":{schema:{$ref:"#/components/schemas/GameConfigVo"}}}}},tags:["游戏引擎侧接口"]}},"/api/engine/resource":{get:{operationId:"EngineController_getGameResourceRouters",summary:"游戏资源路由列表",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/GameResourceRouterVo"}}}}}},tags:["游戏引擎侧接口"]}},"/api/engine/start":{get:{operationId:"EngineController_getStartTxt",summary:"获取游戏入口启动文件",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:"成功返回纯文本",content:{"text/plain":{schema:{type:"string",example:"start.txt内容"}}}}},tags:["游戏引擎侧接口"]}},"/api/engine/progress":{get:{operationId:"EngineController_getProgress",summary:"获取用户作品阅读进度",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["游戏引擎侧接口"]},post:{operationId:"EngineController_saveProgress",summary:"保存用户作品阅读进度",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SaveProgressDTO"}}}},responses:{200:{description:""}},tags:["游戏引擎侧接口"]}},"/api/engine/setting":{get:{operationId:"EngineController_getSetting",summary:"获取用户配置信息",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:""}},tags:["游戏引擎侧接口"]},post:{operationId:"EngineController_saveSetting",summary:"保存用户配置信息",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SaveUserSettingDTO"}}}},responses:{200:{description:""}},tags:["游戏引擎侧接口"]}},"/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}/{rid}/role/union":{get:{operationId:"LlmController_recommends",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:{$ref:"#/components/schemas/RecommendRoleDTO"}}}}},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/recommend/{schema}/{rid}/timbre":{get:{operationId:"LlmController_recommendTimbre",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/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"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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:""},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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:""},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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/BatchUpdateRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchValidRoleBgSensitiveWordsDTO"}}}}},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"}}}},4030:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchValidRoleBgSensitiveWordsDTO"}}}}},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"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},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"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["背景"]}},"/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:["背景"]}},"/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."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["背景"]}},"/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"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["背景"]}},"/api/bg/remove/{bid}":{delete:{operationId:"BgController_remove",summary:"删除背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["背景"]}},"/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,description:"音乐裁剪",content:{"application/json":{schema:{$ref:"#/components/schemas/AudioCutDto"}}}},responses:{200:{description:"Successfully."}},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/editor/scene":{post:{operationId:"EditorController_getSceneDetail",summary:"查询场景详情内容",parameters:[],requestBody:{required:!0,description:"查询场景详情内容",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/scene/dialogue":{put:{operationId:"EditorController_editSceneDialogue",summary:"更新编辑器对话资源",parameters:[],requestBody:{required:!0,description:"更新编辑器对话资源",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneReq"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/uiScene/resource":{put:{operationId:"EditorController_editUiSceneResource",summary:"更新UI编辑器场景资源",parameters:[],requestBody:{required:!0,description:"更新UI编辑器场景资源",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateUiResourceDto"}}}},responses:{200:{description:"Successfully."}},tags:["Editor"]}},"/api/editor/scene/upload":{post:{operationId:"EditorController_uploadSceneDialogue",summary:"上传文本更新对话资源",parameters:[],requestBody:{required:!0,content:{"multipart/form-data":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/scene/command/{lineId}":{post:{operationId:"EditorController_applyCommandLine",summary:"根据行ID获取指令行",parameters:[{name:"lineId",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."}},tags:["Editor"]}},"/api/editor/check":{post:{operationId:"EditorController_checkContentSensitiveWords",summary:"敏感词校验",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CheckContentSensitiveWordsReq"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CheckContentSensitiveWordsDTO"}}}}}},tags:["Editor"]}},"/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:["配音"]}},"/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:["配音"]}},"/api/vocal/ready/{sceneid}":{get:{operationId:"VocalController_getReadyVocalList",summary:"获取准备配音的列表",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalReadyDTO"}}}}}},tags:["配音"]}},"/api/vocal/start/{sceneid}":{post:{operationId:"VocalController_startVocalList",summary:"开始批量配音任务",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"需要配音的数据",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalReadyDTO"}}}}},responses:{201:{description:""}},tags:["配音"]}},"/api/vocal/batch/{sceneid}":{get:{operationId:"VocalController_getBatchVocal",summary:"获取正在配音列表",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchGenerateVocal"}}}}}},tags:["配音"]},post:{operationId:"VocalController_saveBatchVocal",summary:"保存配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{201:{description:""}},tags:["配音"]}},"/api/vocal/retry/{sceneid}":{put:{operationId:"VocalController_retryBatchVocal",summary:"重试单条配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"需要重试的配音",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalBaseLineDTO"}}}}},responses:{200:{description:""}},tags:["配音"]}},"/api/vocal/batch/{sceneid}/{lineId}":{delete:{operationId:"VocalController_deleteLineVocalForBatchVocal",summary:"删除单条配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}},{name:"lineId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["配音"]}},"/api/vocal/cancel/{sceneid}":{post:{operationId:"VocalController_cancelBatchVocal",summary:"取消配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{201:{description:""}},tags:["配音"]}},"/api/chapter/{gameId}/chapter":{post:{operationId:"GameChapterController_addChapter",summary:"新增章节",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"新增章节",content:{"application/json":{schema:{$ref:"#/components/schemas/AddChapterCanvasDTO"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]}},"/api/chapter/{gameId}/stories":{post:{operationId:"GameChapterController_addStories",summary:"新增故事线",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"新增故事线",content:{"application/json":{schema:{$ref:"#/components/schemas/AddChapterCanvasDTO"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]},put:{operationId:"GameChapterController_updateStories",summary:"更新故事线",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"更新故事线",content:{"application/json":{schema:{$ref:"#/components/schemas/AddChapterCanvasDTO"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]}},"/api/chapter/{gameId}/{chapterId}/rename":{patch:{operationId:"GameChapterController_renameChapter",summary:"章节重命名",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"章节重命名",content:{"application/json":{schema:{$ref:"#/components/schemas/RenameChapterDTO"}}}},responses:{200:{description:""}},tags:["Chapter"]}},"/api/chapter/{gameId}/{chapterId}":{delete:{operationId:"GameChapterController_deleteChapter",summary:"删除章节",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]}},"/api/chapter/{gameId}/{chapterId}/check":{get:{operationId:"GameChapterController_check",summary:"检查章节操作",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CheckChapterRspDTO"}}}}},tags:["Chapter"]}},"/api/chapter/{gameId}":{get:{operationId:"GameChapterController_getChapterDetail",summary:"获取章节详情",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]}},"/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/{gameId}/list":{get:{operationId:"VariableController_varList",summary:"获取游戏变量信息列表",parameters:[{name:"gameId",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/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"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},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"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},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"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},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/covers":{post:{operationId:"CoverController_createCover",summary:"创建封面信息",parameters:[],requestBody:{required:!0,description:"保存封面信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CoverDTO"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"string"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["游戏封面"]},get:{operationId:"CoverController_list",summary:"获取封面信息列表",parameters:[{name:"gameId",required:!0,in:"query",description:"当前游戏ID",schema:{type:"string"}},{name:"name",required:!1,in:"query",description:"封面名称",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CoverVO"}}}}}},tags:["游戏封面"]},put:{operationId:"CoverController_updateCover",summary:"更新封面信息",parameters:[],requestBody:{required:!0,description:"更新封面信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CoverDTO"}}}},responses:{200:{description:"Successfully."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["游戏封面"]}},"/api/covers/batch":{put:{operationId:"CoverController_batchUpdateCover",summary:"批量更新封面信息",parameters:[],requestBody:{required:!0,description:"批量更新封面信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CoverDTO"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CoverDTO"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["游戏封面"]}},"/api/covers/{id}":{delete:{operationId:"CoverController_remove",summary:"删除封面信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["游戏封面"]}},"/api/covers/upload":{post:{operationId:"CoverController_uploadStream",summary:"上传游戏封面",parameters:[],requestBody:{required:!0,description:"游戏名",content:{"multipart/form-data":{schema:{$ref:"#/components/schemas/CoverGameDTO"}}}},responses:{201:{description:""}},tags:["游戏封面"]}},"/api/covers/apply/cg":{post:{operationId:"CoverController_chooseCgImg",summary:"选择CG图片",parameters:[],requestBody:{required:!0,description:"使用CG图片",content:{"application/json":{schema:{$ref:"#/components/schemas/CgToCoverDTO"}}}},responses:{201:{description:""}},tags:["游戏封面"]}},"/api/covers/{gameId}/cover/{cid}":{post:{operationId:"CoverController_applyCover",summary:"设置封面",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"cid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."}},tags:["游戏封面"]}},"/api/effect/list":{get:{operationId:"EffectController_list",summary:"获取音效列表",parameters:[{name:"style",required:!1,in:"query",description:"游戏风格",schema:{type:"string"}}],responses:{default:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/EffectListDto"}}}}}},tags:["音效"]}},"/api/effect/cache/clear":{post:{operationId:"EffectController_refresh",parameters:[{name:"secret",required:!1,in:"query",description:"secret",schema:{type:"string"}}],responses:{201:{description:""}},tags:["音效"]}},"/api/canvas/scene/add":{post:{operationId:"CanvasController_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:["Canvas"]}},"/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/{gameId}/{chapterId}/view":{get:{operationId:"CanvasController_view",summary:"获取最新的画布节点数据",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasView"}}}}},tags:["Canvas"]}},"/api/canvas/{gameId}/{chapterId}/revise/history":{get:{operationId:"CanvasController_history",summary:"获取历史修订列表",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",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/{gameId}/{chapterId}/node/preview":{post:{operationId:"CanvasController_nodePreview",summary:"节点预览",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"string"}}}}},tags:["Canvas"]}},"/api/user/oauth2/login":{post:{operationId:"UserController_oauthLogin",summary:"用户oauth2登录",parameters:[{name:"code",required:!0,in:"query",description:"认证code",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/UserVO"}}}}},tags:["用户模块"]}},"/api/user/logout":{put:{operationId:"UserController_logout",summary:"退出登录",parameters:[],responses:{200:{description:""}},tags:["用户模块"]}},"/api/user/check/login":{get:{operationId:"UserController_loginCheck",summary:"oauth2登录检查",parameters:[],responses:{200:{description:""}},tags:["用户模块"]}},"/api/cron/analyseUserEdit":{get:{operationId:"CronController_analyseUserEditTask",parameters:[{name:"secret",required:!0,in:"query",schema:{type:"string"}},{name:"date",required:!0,in:"query",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Cron"]}},"/api/cron/userEditCollect":{get:{operationId:"CronController_userEditCollectTask",parameters:[{name:"secret",required:!0,in:"query",schema:{type:"string"}},{name:"months",required:!0,in:"query",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Cron"]}},"/api/sensitive/test":{get:{operationId:"SensitiveWordsController_test",parameters:[{name:"content",required:!0,in:"query",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Sensitive"]}}},r={title:"万色星辰 API",description:"万色星辰编辑器接口",version:"5.0",contact:{}},s=[],o=[],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"]},GameStyleEnum:{type:"string",description:"游戏风格",enum:["solvePuzzles","otome","watercolor"]},EditorTypeEnum:{type:"string",description:"编辑器类型",enum:["ui","txt"]},CreateGameDTO:{type:"object",properties:{name:{type:"string",description:"游戏名称"},style:{example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome","Watercolor":"watercolor"}',$ref:"#/components/schemas/GameStyleEnum"},editorType:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"}},required:["name","style","editorType"]},GameVO:{type:"object",properties:{id:{type:"string",description:"游戏id"},name:{type:"string",description:"游戏名称"},editorType:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"},gameStyle:{example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome","Watercolor":"watercolor"}',$ref:"#/components/schemas/GameStyleEnum"},cover:{type:"string"},bgm:{type:"string"},logo:{type:"string"},startChapterId:{type:"string"},startSceneId:{type:"string"}},required:["id","name","editorType","gameStyle","cover","bgm","logo","startChapterId","startSceneId"]},ProgressStatusEnum:{type:"string",description:"进度状态",enum:["0","1","2","3"]},Progress:{type:"object",properties:{current:{type:"number",description:"进度"},status:{example:'{"INIT":"0","ING":"1","DONE":"2","ERR":"3"}',$ref:"#/components/schemas/ProgressStatusEnum"},msg:{type:"string",description:"生成信息"}},required:["current","status","msg"]},ImageStyleEnum:{type:"string",description:"道具风格",enum:["anime","romantic","watercolor"]},Picture:{type:"object",properties:{url:{type:"string",description:"图片地址"},check:{type:"boolean",description:"是否选中"}},required:["url","check"]},BgGenerateStageEnum:{type:"string",description:"生成阶段",enum:["prompts","bg"]},UpdateBgDto:{type:"object",properties:{id:{type:"string",description:"背景ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"背景名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{example:'{"Anime":"anime","Romantic":"romantic","Watercolor":"watercolor"}',$ref:"#/components/schemas/ImageStyleEnum"},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:{example:'{"PROMPTS":"prompts","BG":"bg"}',$ref:"#/components/schemas/BgGenerateStageEnum"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","unrestricted","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:"张嘴"},mainFigure:{type:"string",description:"正常图"}},required:["eyesHalfOpen","eyesClose","mouthHalfOpen","mouthOpen","mainFigure"]},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"]},GenderEnum:{type:"string",description:"角色性别",enum:["male","female","nonhuman"]},AgeEnum:{type:"string",description:"年纪",enum:["child","teenager","youth","adult","elder"]},RoleGenerateStageEnum:{type:"string",description:"生成阶段",enum:["prompts","figure","expression","frame"]},UpdateRoleDto:{type:"object",properties:{uid:{type:"string",description:"用户ID"},id:{type:"string",description:"角色ID"},name:{type:"string",description:"角色名字"},unrestricted:{type:"boolean",description:"自由画风开关"},timbre:{type:"string",description:"音色"},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"}},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},gender:{example:'{"MALE":"male","FEMALE":"female","NONHUMAN":"nonhuman"}',$ref:"#/components/schemas/GenderEnum"},style:{example:'{"Anime":"anime","Romantic":"romantic","Watercolor":"watercolor"}',$ref:"#/components/schemas/ImageStyleEnum"},age:{example:'{"CHILD":"child","TEENAGER":"teenager","YOUNG":"youth","ADULT":"adult","ELDER":"elder"}',$ref:"#/components/schemas/AgeEnum"},stage:{example:'{"PROMPTS":"prompts","FIGURE":"figure","EXPRESSION":"expression","FRAME":"frame"}',$ref:"#/components/schemas/RoleGenerateStageEnum"}},required:["uid","id","name","unrestricted","timbre","original","url","list","tlmId","feature","word","prompts","expressions","progress","gender","style","age","stage"]},BatchRole:{type:"object",properties:{list:{description:"角色数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["list","progress"]},Title:{type:"object",properties:{column:{type:"string",description:"列标签"},name:{type:"string",description:"列名称"}},required:["column","name"]},BatchBgm:{type:"object",properties:{progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},title:{description:"音乐表头",type:"array",items:{$ref:"#/components/schemas/Title"}},stock:{type:"object",description:"音乐数据"},more:{type:"object",description:"More"}},required:["progress","title","stock","more"]},ExtractTypeEnum:{type:"string",description:"批处理类型",enum:["extract","picture"]},BatchExtraction:{type:"object",properties:{bg:{description:"背景数据",allOf:[{$ref:"#/components/schemas/BatchBg"}]},role:{description:"角色数据",allOf:[{$ref:"#/components/schemas/BatchRole"}]},bgm:{description:"BGM",allOf:[{$ref:"#/components/schemas/BatchBgm"}]},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]},id:{type:"string",description:"批量提取ID"},uid:{type:"string",description:"用户ID"},gameId:{type:"string",description:"游戏ID"},type:{example:'{"EXTRACT":"extract","PICTURE":"picture"}',$ref:"#/components/schemas/ExtractTypeEnum"}},required:["bg","role","bgm","progress","id","uid","gameId","type"]},CreateGameRspVo:{type:"object",properties:{list:{description:"游戏列表",type:"array",items:{$ref:"#/components/schemas/GameVO"}},batch:{description:"批量提取任务",allOf:[{$ref:"#/components/schemas/BatchExtraction"}]}},required:["list","batch"]},RenameDto:{type:"object",properties:{newName:{type:"string",description:"新游戏名称"}},required:["newName"]},ChapterNodeTypeEnum:{type:"string",description:"类型",enum:["chapter","start"]},ChapterNodeData:{type:"object",properties:{label:{type:"string",description:"章节名称"},startSceneId:{type:"string",description:"开始节点"},isPublish:{type:"boolean",description:"是否已发布",default:!1,example:!1},isRead:{type:"boolean",description:"是否已读",default:!1,example:!1},isBuy:{type:"boolean",description:"是否已购买",default:!1,example:!1},isHide:{type:"boolean",description:"是否隐藏",default:!1,example:!1}},required:["label","startSceneId"]},ChapterNode:{type:"object",properties:{id:{type:"string",description:"章节id"},type:{example:'{"chapter":"chapter","start":"start"}',$ref:"#/components/schemas/ChapterNodeTypeEnum"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/ChapterNodeData"}]}},required:["id","type","data"]},ChapterEdgeData:{type:"object",properties:{label:{type:"string",description:"标题, 对应source章节中结束节点标题"},endSceneId:{type:"string",description:"结束场景ID, 对应source章节中结束场景节点ID"}},required:["label","endSceneId"]},ChapterEdge:{type:"object",properties:{id:{type:"string",description:"线ID"},source:{type:"string",description:"起点章节 ID"},target:{type:"string",description:"终点章节 ID"},data:{$ref:"#/components/schemas/ChapterEdgeData"}},required:["id","source","target","data"]},GameChapterSyncVO:{type:"object",properties:{uid:{type:"string",description:"用户ID"},gameId:{type:"string",description:"游戏ID"},gameName:{type:"string",description:"游戏名"},nodes:{description:"章节节点",type:"array",items:{$ref:"#/components/schemas/ChapterNode"}},edges:{description:"章节连线",type:"array",items:{$ref:"#/components/schemas/ChapterEdge"}}},required:["uid","gameId","gameName","nodes","edges"]},GameConfigVo:{type:"object",properties:{gameId:{type:"string",description:"游戏id"},gameName:{type:"string",description:"游戏名称"},gameStyle:{example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome","Watercolor":"watercolor"}',$ref:"#/components/schemas/GameStyleEnum"},gameCover:{type:"string"},gameBgm:{type:"string"},gameLogo:{type:"string"}},required:["gameId","gameName","gameStyle","gameCover","gameBgm","gameLogo"]},GameResourceRouterVo:{type:"object",properties:{key:{type:"string",description:"资源 key"},url:{type:"string",description:"资源 url"}},required:["key","url"]},StoryLine:{type:"object",properties:{id:{type:"string",description:"故事线id"},name:{type:"string",description:"故事线名称"},desc:{type:"string",description:"故事线描述"},isMain:{type:"boolean",description:"是否为主线",default:!1,example:!1},edgeIds:{description:"故事线所经过的线ID",type:"array",items:{type:"string"}},chapterIds:{description:"故事线所经过的章节ID",type:"array",items:{type:"string"}},color:{type:"string",description:"故事线的颜色值"}},required:["id","name","desc","edgeIds","chapterIds","color"]},ChapterCanvasRspDTO:{type:"object",properties:{nodes:{description:"节点",type:"array",items:{$ref:"#/components/schemas/ChapterNode"}},edges:{description:"线",type:"array",items:{$ref:"#/components/schemas/ChapterEdge"}},stories:{description:"故事线",type:"array",items:{$ref:"#/components/schemas/StoryLine"}}},required:["nodes","edges","stories"]},SaveProgressDTO:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"}},required:["gameId","chapterId"]},SaveUserSettingDTO:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},data:{type:"object",description:"保存 JSON 数据"}},required:["gameId","data"]},RecommendRoleDTO:{type:"object",properties:{features:{description:"推荐人格",type:"array",items:{type:"string"}},timbre:{type:"string",description:"推荐音色"}},required:["features","timbre"]},ImageUploadDto:{type:"object",properties:{category:{type:"string",description:"图片类别"},original:{type:"string",description:"蒙版对应原始图片名称"}},required:["category","original"]},ExtractFileDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"}},required:["gameId"]},IDRspDto:{type:"object",properties:{id:{type:"string",description:"ID"}},required:["id"]},ValidSensitiveWordsDTO:{type:"object",properties:{field:{type:"string",description:"敏感字段"},word:{type:"string",description:"处理后的文本"}},required:["field","word"]},BgmConfirm:{type:"object",properties:{column:{type:"string",description:"列名"},locationId:{description:"位置ID",type:"array",items:{type:"string"}}},required:["column","locationId"]},BatchBgRoleReqDto:{type:"object",properties:{bg:{description:"背景数据",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}},role:{description:"角色数据",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},bgm:{description:"确认BGM",type:"array",items:{$ref:"#/components/schemas/BgmConfirm"}}},required:["bg","role","bgm"]},BatchUpdateRspDto:{type:"object",properties:{bg:{description:"背景数据",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}},role:{description:"角色数据",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},bgm:{description:"确认BGM",allOf:[{$ref:"#/components/schemas/BatchBgm"}]}},required:["bg","role","bgm"]},BatchValidSensitiveWordsDTO:{type:"object",properties:{id:{type:"string",description:"ID"},valids:{description:"校验列表",type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}},required:["id","valids"]},BatchValidRoleBgSensitiveWordsDTO:{type:"object",properties:{role:{description:"角色列表",type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}},bg:{description:"背景列表",type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}},required:["role","bg"]},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"]},ResourceTypeEnum:{type:"string",description:"资源类型",enum:["figure","background","bgm"]},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:{example:'{"FIGURE":"figure","BACKGROUND":"background","BGM":"bgm"}',$ref:"#/components/schemas/ResourceTypeEnum"},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"]},StockColumnData:{type:"object",properties:{id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐相对地址"},locationId:{type:"string",description:"位置ID"},checked:{type:"boolean",description:"勾选"}},required:["id","name","url","locationId","checked"]},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:{sceneId:{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:["sceneId","audio","url","loop","volume","rate"]},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"]},SceneDetailDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"}},required:["gameId","chapterId","sceneId"]},EditorCommandEnum:{type:"string",description:"命令",enum:["narr","clp","bst","bgi","bgm","cg","cp"]},Role:{type:"object",properties:{id:{type:"string",description:"角色ID"},emotion:{type:"string",description:"表情"},name:{type:"string",description:"角色名称"},gender:{example:'{"MALE":"male","FEMALE":"female","NONHUMAN":"nonhuman"}',$ref:"#/components/schemas/GenderEnum"},style:{example:'{"Anime":"anime","Romantic":"romantic","Watercolor":"watercolor"}',$ref:"#/components/schemas/ImageStyleEnum"},timbre:{type:"string",description:"音色"}},required:["id","emotion","name","gender","style","timbre"]},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:"道具名称"},disabled:{type:"boolean",description:"是否失效, true-失效|false-有效",default:!1}},required:["id","name"]},SoundEffectTypeEnum:{type:"string",description:"音效类型",enum:["flow","scene"]},SoundEffect:{type:"object",properties:{id:{type:"string",description:"id"},ids:{description:"音效对应ID层级",type:"array",items:{type:"string"}},type:{example:'{"FLOW":"flow","SCENE":"scene"}',$ref:"#/components/schemas/SoundEffectTypeEnum"},label:{type:"string",description:"音效标签"},loop:{type:"boolean",description:"是否循环",default:!1},volume:{type:"number",description:"音量0-100",default:50,minimum:0,maximum:100},disabled:{type:"boolean",description:"是否失效, true-失效|false-有效",default:!1}},required:["id","ids","type","label","loop","volume"]},LineDto:{type:"object",properties:{id:{type:"string",description:"行ID"},content:{type:"string",description:"内容"},command:{type:"array",example:'{"Narrator":"narr","ClearPorp":"clp","BlackScreenText":"bst","BackgroundImage":"bgi","BackgroundMusic":"bgm","ComputerGraphics":"cg","CharacterPortrait":"cp"}',items:{$ref:"#/components/schemas/EditorCommandEnum"}},role:{description:"角色",allOf:[{$ref:"#/components/schemas/Role"}]},vocal:{description:"配音",allOf:[{$ref:"#/components/schemas/Vocal"}]},prop:{description:"道具",allOf:[{$ref:"#/components/schemas/Prop"}]},soundEffects:{description:"音效",type:"array",items:{$ref:"#/components/schemas/SoundEffect"}}},required:["id","content","command","role","vocal","prop","soundEffects"]},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:"是否循环",default:!0},volume:{type:"number",description:"音量0-100",default:100},rate:{type:"number",description:"播放速度",default:1}},required:["audio","url","loop","volume","rate"]},SceneDetailRsp:{type:"object",properties:{sceneId:{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:"批量配音"},recommendBgm:{description:"推荐音乐",type:"array",items:{$ref:"#/components/schemas/BgmListDto"}}},required:["sceneId","dialogues","figures","bg","cg","bgm","isBatchVocal","recommendBgm"]},SceneReq:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}}},required:["gameId","chapterId","sceneId","dialogues"]},UpdateUiResourceDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},bg:{type:"string",description:"更新背景"},cg:{type:"string",description:"更新CG"},clearBg:{type:"boolean",description:"清除背景"},clearCg:{type:"boolean",description:"清除CG"}},required:["gameId","chapterId","sceneId","bg","cg","clearBg","clearCg"]},SceneDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"}},required:["gameId","chapterId","sceneId"]},CheckContentSensitiveWordsReq:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},lineId:{type:"string",description:"行ID"}},required:["gameId","chapterId","sceneId"]},SpliceContentTypeEnum:{type:"string",description:"类型",enum:["pass","err"]},SpliceContent:{type:"object",properties:{type:{$ref:"#/components/schemas/SpliceContentTypeEnum"},part:{type:"string",description:"片段"}},required:["type","part"]},CheckContentSensitiveWordsDTO:{type:"object",properties:{id:{type:"string",description:"行ID"},command:{type:"array",example:'{"Narrator":"narr","ClearPorp":"clp","BlackScreenText":"bst","BackgroundImage":"bgi","BackgroundMusic":"bgm","ComputerGraphics":"cg","CharacterPortrait":"cp"}',items:{$ref:"#/components/schemas/EditorCommandEnum"}},role:{description:"角色",allOf:[{$ref:"#/components/schemas/Role"}]},vocal:{description:"配音",allOf:[{$ref:"#/components/schemas/Vocal"}]},prop:{description:"道具",allOf:[{$ref:"#/components/schemas/Prop"}]},soundEffects:{description:"音效",type:"array",items:{$ref:"#/components/schemas/SoundEffect"}},content:{description:"校验内容",type:"array",items:{$ref:"#/components/schemas/SpliceContent"}}},required:["id","command","role","vocal","prop","soundEffects","content"]},VocalBindingDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},id:{type:"string",description:"行标识"},timbre:{type:"string",description:"音色"},url:{type:"string",description:"配音相对地址"}},required:["gameId","chapterId","sceneId","id","timbre","url"]},VocalUntieDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},id:{type:"string",description:"行标识"},url:{type:"string",description:"解绑配音相对地址"}},required:["gameId","chapterId","sceneId","id","url"]},VocalBaseLineDTO:{type:"object",properties:{lineId:{type:"string",description:"行标识"},content:{type:"string",description:"行内容"},category:{type:"string",description:"表情大类英文"},categoryLabel:{type:"string",description:"表情大类中文"},emotion:{type:"string",description:"表情小类中文"},timbre:{type:"string",description:"音色"}},required:["lineId","content","category","categoryLabel","emotion","timbre"]},VocalReadyDTO:{type:"object",properties:{subject:{type:"string",description:"角色名/旁白"},subjectId:{type:"string",description:"角色名ID/narr"},timbre:{type:"string",description:"音色ID"},style:{type:"string",description:"风格"},vocals:{description:"剧本语句",type:"array",items:{$ref:"#/components/schemas/VocalBaseLineDTO"}}},required:["subject","subjectId","timbre","style","vocals"]},LineVocal:{type:"object",properties:{lineId:{type:"string",description:"行ID"},content:{type:"string",description:"行内容"},hash:{type:"string",description:"hash"},style:{type:"string",description:"角色风格"},timbre:{type:"string",description:"音色"},category:{type:"string",description:"表情大类英文"},categoryLabel:{type:"string",description:"表情大类中文"},emotion:{type:"string",description:"表情小类中文"},vocal:{type:"string",description:"配音文件(不包含路径)"},url:{type:"string",description:"配音地址"},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["lineId","content","hash","style","timbre","category","categoryLabel","emotion","vocal","url","progress"]},BatchVocal:{type:"object",properties:{vocals:{description:"配音列表",type:"array",items:{$ref:"#/components/schemas/LineVocal"}},subject:{type:"string",description:"主题"}},required:["vocals","subject"]},BatchGenerateVocal:{type:"object",properties:{batchs:{description:"配音列表",type:"array",items:{$ref:"#/components/schemas/BatchVocal"}},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["batchs","progress"]},AddChapterCanvasDTO:{type:"object",properties:{nodes:{description:"新增节点",type:"array",items:{$ref:"#/components/schemas/ChapterNode"}},edges:{description:"新增线",type:"array",items:{$ref:"#/components/schemas/ChapterEdge"}}},required:["nodes","edges"]},RenameChapterDTO:{type:"object",properties:{name:{type:"string",description:"名称"}},required:["name"]},EndNode:{type:"object",properties:{id:{type:"string",description:"节点id"},label:{type:"string",description:"节点标签"}},required:["id","label"]},CheckChapterRspDTO:{type:"object",properties:{isAddChapter:{type:"boolean",description:"新增章节",default:!0},isAddStoryLine:{type:"boolean",description:"新增故事线",default:!0},isUpdateStoryLine:{type:"boolean",description:"更新故事线",default:!0},isRename:{type:"boolean",description:"重命名",default:!0},isDelete:{type:"boolean",description:"刪除",default:!0},endNodes:{description:"结束节点列表",type:"array",items:{$ref:"#/components/schemas/EndNode"}}},required:["isAddChapter","isAddStoryLine","isUpdateStoryLine","isRename","isDelete","endNodes"]},UpdateVariableDto:{type:"object",properties:{id:{type:"string",description:"变量表ID"}},required:["id"]},PropSizeEnum:{type:"string",description:"道具大小",enum:["small","middle","big"]},PropGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","prop"]},PropDto:{type:"object",properties:{id:{type:"string",description:"道具ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"道具名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{example:'{"Anime":"anime","Romantic":"romantic","Watercolor":"watercolor"}',$ref:"#/components/schemas/ImageStyleEnum"},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:{example:'{"SMALL":"small","MIDDLE":"middle","BIG":"big"}',$ref:"#/components/schemas/PropSizeEnum"},stage:{example:'{"PROMPTS":"prompts","PROP":"prop"}',$ref:"#/components/schemas/PropGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","unrestricted","style","original","prompts","url","list","tlmId","category","size","stage","progress"]},FindPropDto:{type:"object",properties:{name:{type:"string",description:"道具名称"}},required:["name"]},CgGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","cg"]},CgDto:{type:"object",properties:{id:{type:"string",description:"Cg ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"Cg名称"},unrestricted:{type:"boolean",description:"自由画风开关"},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:{example:'{"PROMPTS":"prompts","CG":"cg"}',$ref:"#/components/schemas/CgGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","unrestricted","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","list","stage","progress"]},FindCgDto:{type:"object",properties:{name:{type:"string",description:"Cg名称"}},required:["name"]},ImageFromEnum:{type:"string",description:"图片来源",enum:["aigc","upload"]},CoverGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","drawing"]},CoverDTO:{type:"object",properties:{id:{type:"string",description:"封面ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"封面名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{type:"string",description:"封面风格"},original:{type:"string",description:"原文(封面描述)"},prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"封面对应大模型输出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:"封面图片"},cgid:{type:"string",description:"CGID"},list:{description:"封面图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},from:{example:'{"AIGC":"aigc","UPLOAD":"upload"}',$ref:"#/components/schemas/ImageFromEnum"},stage:{example:'{"PROMPTS":"prompts","COVER":"drawing"}',$ref:"#/components/schemas/CoverGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","unrestricted","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","cgid","list","from","stage","progress"]},CoverVO:{type:"object",properties:{id:{type:"string",description:"封面ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"封面名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{type:"string",description:"封面风格"},original:{type:"string",description:"原文(封面描述)"},prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"封面对应大模型输出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:"封面图片"},cgid:{type:"string",description:"CGID"},list:{description:"封面图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},from:{example:'{"AIGC":"aigc","UPLOAD":"upload"}',$ref:"#/components/schemas/ImageFromEnum"},stage:{example:'{"PROMPTS":"prompts","COVER":"drawing"}',$ref:"#/components/schemas/CoverGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},active:{type:"boolean",description:"激活状态"}},required:["id","uid","name","unrestricted","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","cgid","list","from","stage","progress","active"]},CoverGameDTO:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"}},required:["gameId"]},CgToCoverDTO:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},cgid:{type:"string",description:"CGID"}},required:["gameId","cgid"]},EffectListDto:{type:"object",properties:{value:{type:"string",description:"音效ID"},label:{type:"string",description:"音效名"},style:{type:"string",description:"风格",nullable:!0},tags:{description:"音效标签",nullable:!0,type:"array",items:{type:"string"}},url:{type:"string",description:"资源文件路径",nullable:!0},children:{description:"下级分类",nullable:!0,type:"array",items:{$ref:"#/components/schemas/EffectListDto"}}},required:["value","label","style","tags","url","children"]},CanvasNodeTypeEnum:{type:"string",description:"类型",enum:["start","scene","branch","end"]},Variable:{type:"object",properties:{id:{type:"string"},alias:{type:"string"},name:{type:"string"}},required:["id","alias","name"]},EscapeCharacterEnum:{type:"string",description:"转义字符",enum:["lt","le","eq","ne","ge","gt"]},ExpValue:{type:"object",properties:{value:{type:"number"},exp:{example:'{"LT":"lt","LE":"le","EQ":"eq","NE":"ne","GE":"ge","GT":"gt"}',$ref:"#/components/schemas/EscapeCharacterEnum"}},required:["value","exp"]},LogicalOperatorEnum:{type:"string",description:"条件",enum:["and","or",""]},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:{example:'{"AND":"and","OR":"or","NULL":""}',$ref:"#/components/schemas/LogicalOperatorEnum"}},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:{example:'{"START":"start","SCENE":"scene","BRANCH":"branch","END":"end"}',$ref:"#/components/schemas/CanvasNodeTypeEnum"},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:{example:'{"AND":"and","OR":"or","NULL":""}',$ref:"#/components/schemas/LogicalOperatorEnum"}},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:"节点重复集",type:"array",items:{$ref:"#/components/schemas/Valid"}},scene:{description:"场景报错集",type:"array",items:{$ref:"#/components/schemas/Valid"}},branch:{description:"节点报错集",type:"array",items:{$ref:"#/components/schemas/Valid"}},edge:{description:"边报错集",type:"array",items:{$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"]},AddScene:{type:"object",properties:{id:{type:"string",description:"场景ID"},type:{example:'{"START":"start","SCENE":"scene","BRANCH":"branch","END":"end"}',$ref:"#/components/schemas/CanvasNodeTypeEnum"}},required:["id","type"]},AddSceneDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},scenes:{description:"场景列表",type:"array",items:{$ref:"#/components/schemas/AddScene"}}},required:["gameId","chapterId","scenes"]},RecordCanvasDto:{type:"object",properties:{editorType:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"},gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},nodes:{description:"画布节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"画布边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["editorType","gameId","chapterId","nodes","edges"]},CanvasView:{type:"object",properties:{canvas:{description:"节点信息",allOf:[{$ref:"#/components/schemas/CanvasBody"}]},valid:{description:"校验信息",allOf:[{$ref:"#/components/schemas/ValidateCanvas"}]}},required:["canvas","valid"]},UserVO:{type:"object",properties:{uid:{type:"string",description:"用户ID"},nickname:{type:"string",description:"昵称"},avatar:{type:"string",description:"头像"},gender:{type:"number",description:"性别"}},required:["uid","nickname","avatar","gender"]}}},n={openapi:e,paths:t,info:r,tags:s,servers:o,components:i};exports.components=i,exports.default=n,exports.info=r,exports.openapi=e,exports.paths=t,exports.servers=o,exports.tags=s;
|
package/lib/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.7.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.7.7",i="FE command line tool",s="bin/an-cli.js",p={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",blink:"npm run build && npm link","sync-docs":"node scripts/sync-docs.js"},l={anl:"bin/an-cli.js"},o="Gleason <bianliuzhu@gmail.com>",t={"@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.7","@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-copy":"^3.5.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},r={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"14.0.1",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",m={name:"anl",version:e,description:i,main:s,scripts:p,bin:l,author:o,license:"ISC",devDependencies:t,dependencies:r,keywords:n,files:c,repository:u,type:a};exports.author=o,exports.bin=l,exports.default=m,exports.dependencies=r,exports.description=i,exports.devDependencies=t,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=p,exports.type=a,exports.version=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const t="\t";exports.default=class{config;schemas={};enumsMap=new Map;schemasMap=new Map;defaultReturn={headerRef:"",renderStr:"",comment:"",typeName:""};requiredFieldS=[];constructor(e,t){this.schemas=e,this.config=t}nullable(e){return""+(e?" | null":"")}getEnumTypeName(e){return this.config.erasableSyntaxOnly?`${e}Type`:e}fieldComment(e){const{description:t}=e;if(t){return["\t","/**","\n",`\t * ${t}`,"\n","\t */"].join("")}return""}typeNameToFileName(e){return e.replace(/_/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().replace(/-+/g,"-")}nameTheHumpCenterStroke(e){const t=e.replace("#/components/schemas/",""),n={typeName:t,fileName:this.typeNameToFileName(t),dataType:""};if(this.schemas){const e=this.schemas[t];e.enum?n.dataType="enum":n.dataType=e.type}return n}parseRef(e){if(!e?.trim())return{headerRefStr:"",typeName:"",dataType:""};const{fileName:t,typeName:n,dataType:r=""}=this.nameTheHumpCenterStroke(e);let s;if("enum"===r){s=`import type { ${this.getEnumTypeName(n)} } from '${this.config.importEnumPath}';`}else s=`import type { ${n} } from './${t}';`;return{headerRefStr:s,typeName:n,dataType:r}}parseObject(e,n){let r="",s="";if("object"===e.type){const i=e;if("object"==typeof i.additionalProperties){const e=this.parseArray(i.additionalProperties,n)??this.defaultReturn;r=e?.headerRef??"",s=e?.renderStr??""}else s=`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: ${e.type}${this.nullable(e.nullable)};`}return{headerRef:r,renderStr:s}}parseArray(n,r){const s=n,{items:i={},nullable:a,example:o}=s,u=i?.$ref;if(u){const{headerRefStr:n,typeName:s,dataType:i}=this.parseRef(u);if("enum"===i&&e.isValidJSON(o)){const e=this.typeNameToFileName(s),t=this.convertJsonToEnumString(o,s);this.enumsMap.set(e,{fileName:e,content:t})}const l="enum"===i?this.getEnumTypeName(s):s;return{headerRef:n,renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: Array<${l}>${this.nullable(a)};`,typeName:l}}const l=i?.type,p="integer"===l?"number":l;return{headerRef:"",renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: Array<${p}>${this.nullable(a)};`,typeName:p}}parseBoolean(e,n){return"boolean"===e.type?`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: boolean${this.nullable(e.nullable)};`:""}parseEnum(e,n){if(!Array.isArray(e.enum))return null;if(this.config.erasableSyntaxOnly){if("integer"===e.type){return{headerRef:"",renderStr:[`export const ${n} = {`,...e.enum.map(e=>`${t}NUMBER_${e}: ${e},`),"} as const;","",`export type ${this.getEnumTypeName(n)} = typeof ${n}[keyof typeof ${n}];`].join("\n")}}if("string"===e.type){const r=e.enum.every(e=>!isNaN(Number(e)));return{headerRef:"",renderStr:[`export const ${n} = {`,...e.enum.map(e=>r?`${t}NUMBER_${e}: '${e}',`:`${t}${e.toUpperCase()}: '${e}',`),"} as const;","",`export type ${this.getEnumTypeName(n)} = typeof ${n}[keyof typeof ${n}];`].join("\n")}}}else{if("integer"===e.type){return{headerRef:"",renderStr:[`export enum ${n} {`,...e.enum.map(e=>`${t}NUMBER_${e} = ${e},`),"}"].join("\n")}}if("string"===e.type){const r=e.enum.every(e=>!isNaN(Number(e)));return{headerRef:"",renderStr:[`export enum ${n} {`,...e.enum.map(e=>r?`${t}NUMBER_${e} = '${e}',`:`${t}${e.toUpperCase()} = '${e}',`),"}"].join("\n")}}}return null}parseInteger(e,n){if(Array.isArray(e.enum)){const t=n.charAt(0).toUpperCase()+n.slice(1);return this.parseEnum(e,t)?.renderStr??""}return`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: number${this.nullable(e.nullable)};`}parseNumber(e,n){return"number"===e.type?`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: number${this.nullable(e.nullable)};`:""}convertJsonToEnumString(e,n){try{const r=JSON.parse(e);if(this.config.erasableSyntaxOnly){return`export const ${n} = {\n${Object.entries(r).map(([e,n])=>`${t}${e}: '${n}'`).join(",\n")}\n} as const;\n\nexport type ${this.getEnumTypeName(n)} = typeof ${n}[keyof typeof ${n}];`}return`export enum ${n} {\n${Object.entries(r).map(([e,n])=>`${t}${e} = '${n}'`).join(",\n")}\n}`}catch(e){return console.error("JSON 解析失败:",e),""}}parseString(n,r){if("string"===n.type){if(n.enum){const s=r.charAt(0).toUpperCase()+r.slice(1);if(e.isValidJSON(n.example)){const e=this.convertJsonToEnumString(n.example,s),i=this.getEnumTypeName(s);return{headerRef:"",renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: ${i}${this.nullable(n.nullable)};`,comment:e}}{const e=this.typeNameToFileName(s),t=this.parseEnum(n,s);if(t&&!this.enumsMap.has(e))return this.enumsMap.set(e,{fileName:e,content:t.renderStr}),{headerRef:"",renderStr:""}}}return{headerRef:"",renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: string${this.nullable(n.nullable)};`}}return null}parseProperties(n,r){const s=[],i=[];for(const a in n){const o=n[a];if(o?.$ref){const{headerRefStr:n,typeName:r,dataType:u}=this.parseRef(o.$ref);i.includes(n)||i.push(n);const l="enum"===u?this.getEnumTypeName(r):r;s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const t="\t";exports.default=class{config;schemas={};enumsMap=new Map;schemasMap=new Map;defaultReturn={headerRef:"",renderStr:"",comment:"",typeName:""};requiredFieldS=[];constructor(e,t){this.schemas=e,this.config=t}nullable(e){return""+(e?" | null":"")}getEnumTypeName(e){return this.config.erasableSyntaxOnly?`${e}Type`:e}fieldComment(e){const{description:t}=e;if(t){return["\t","/**","\n",`\t * ${t}`,"\n","\t */"].join("")}return""}typeNameToFileName(e){return e.replace(/_/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().replace(/-+/g,"-")}nameTheHumpCenterStroke(e){const t=e.replace("#/components/schemas/",""),n={typeName:t,fileName:this.typeNameToFileName(t),dataType:""};if(this.schemas){const e=this.schemas[t];e.enum?n.dataType="enum":n.dataType=e.type}return n}parseRef(e){if(!e?.trim())return{headerRefStr:"",typeName:"",dataType:""};const{fileName:t,typeName:n,dataType:r=""}=this.nameTheHumpCenterStroke(e);let s;if("enum"===r){s=`import type { ${this.getEnumTypeName(n)} } from '${this.config.importEnumPath}';`}else s=`import type { ${n} } from './${t}';`;return{headerRefStr:s,typeName:n,dataType:r}}parseObject(e,n){let r="",s="";if("object"===e.type){const i=e;if("object"==typeof i.additionalProperties){const e=this.parseArray(i.additionalProperties,n)??this.defaultReturn;r=e?.headerRef??"",s=e?.renderStr??""}else s=`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: ${e.type}${this.nullable(e.nullable)};`}return{headerRef:r,renderStr:s}}parseArray(n,r){const s=n,{items:i={},nullable:a,example:o}=s,u=i?.$ref;if(u){const{headerRefStr:n,typeName:s,dataType:i}=this.parseRef(u);if("enum"===i&&e.isValidJSON(o)){const e=this.typeNameToFileName(s),t=this.convertJsonToEnumString(o,s);this.enumsMap.set(e,{fileName:e,content:t})}const l="enum"===i?this.getEnumTypeName(s):s;return{headerRef:n,renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: Array<${l}>${this.nullable(a)};`,typeName:l}}const l=i?.type,p="integer"===l?"number":l;return{headerRef:"",renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: Array<${p}>${this.nullable(a)};`,typeName:p}}parseBoolean(e,n){return"boolean"===e.type?`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: boolean${this.nullable(e.nullable)};`:""}parseEnum(e,n){if(!Array.isArray(e.enum))return null;if(this.config.erasableSyntaxOnly){if("integer"===e.type){return{headerRef:"",renderStr:[`export const ${n} = {`,...e.enum.map(e=>`${t}NUMBER_${e}: ${e},`),"} as const;","",`export type ${this.getEnumTypeName(n)} = typeof ${n}[keyof typeof ${n}];`].join("\n")}}if("string"===e.type){const r=e.enum.every(e=>!isNaN(Number(e)));return{headerRef:"",renderStr:[`export const ${n} = {`,...e.enum.map(e=>r?`${t}NUMBER_${e}: '${e}',`:`${t}${e.toUpperCase()}: '${e}',`),"} as const;","",`export type ${this.getEnumTypeName(n)} = typeof ${n}[keyof typeof ${n}];`].join("\n")}}}else{if("integer"===e.type){return{headerRef:"",renderStr:[`export enum ${n} {`,...e.enum.map(e=>`${t}NUMBER_${e} = ${e},`),"}"].join("\n")}}if("string"===e.type){const r=e.enum.every(e=>!isNaN(Number(e)));return{headerRef:"",renderStr:[`export enum ${n} {`,...e.enum.map(e=>r?`${t}NUMBER_${e} = '${e}',`:`${t}${e.toUpperCase()} = '${e}',`),"}"].join("\n")}}}return null}parseInteger(e,n){if(Array.isArray(e.enum)){const t=n.charAt(0).toUpperCase()+n.slice(1);return this.parseEnum(e,t)?.renderStr??""}return`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: number${this.nullable(e.nullable)};`}parseNumber(e,n){return"number"===e.type?`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: number${this.nullable(e.nullable)};`:""}convertJsonToEnumString(e,n){try{const r=JSON.parse(e);if(this.config.erasableSyntaxOnly){return`export const ${n} = {\n${Object.entries(r).map(([e,n])=>`${t}${e}: '${n}'`).join(",\n")}\n} as const;\n\nexport type ${this.getEnumTypeName(n)} = typeof ${n}[keyof typeof ${n}];`}return`export enum ${n} {\n${Object.entries(r).map(([e,n])=>`${t}${e} = '${n}'`).join(",\n")}\n}`}catch(e){return console.error("JSON 解析失败:",e),""}}parseString(n,r){if("string"===n.type){if(n.enum){const s=r.charAt(0).toUpperCase()+r.slice(1);if(e.isValidJSON(n.example)){const e=this.convertJsonToEnumString(n.example,s),i=this.getEnumTypeName(s);return{headerRef:"",renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: ${i}${this.nullable(n.nullable)};`,comment:e}}{const e=this.typeNameToFileName(s),t=this.parseEnum(n,s);if(t&&!this.enumsMap.has(e))return this.enumsMap.set(e,{fileName:e,content:t.renderStr}),{headerRef:"",renderStr:""}}}return{headerRef:"",renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: string${this.nullable(n.nullable)};`}}return null}parseProperties(n,r){const s=[],i=[];for(const a in n){const o=n[a];if(o?.$ref){const{headerRefStr:n,typeName:r,dataType:u}=this.parseRef(o.$ref);i.includes(n)||i.push(n);const l=o,p=this.fieldComment(l);""!==p&&s.push(p);const c="enum"===u?this.getEnumTypeName(r):r;s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${c};`);const h=o.example;if("enum"===u&&h&&e.isValidJSON(h)){const e=this.typeNameToFileName(r),t=this.convertJsonToEnumString(h,r);this.enumsMap.set(e,{fileName:e,content:t})}continue}if("allOf"in o){const e=o.allOf?.[0];if(e?.$ref){const{headerRefStr:n,typeName:r}=this.parseRef(e.$ref);i.includes(n)||i.push(n);const u=o,l=this.fieldComment(u);""!==l&&s.push(l),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${r}${this.nullable(o.nullable)};`);continue}}const u=o,l=this.fieldComment(u);switch(""!==l&&s.push(l),u.type){case"array":{const e=this.parseArray(u,a)??this.defaultReturn;s.push(e?.renderStr??""),i.includes(e.headerRef)||r===e.typeName||i.push(e.headerRef)}break;case"boolean":s.push(this.parseBoolean(u,a));break;case"integer":s.push(this.parseInteger(u,a));break;case"number":s.push(this.parseNumber(u,a));break;case"string":if(u.enum){const n=a.charAt(0).toUpperCase()+a.slice(1);if(u.example&&e.isValidJSON(u.example)){const e=this.getEnumTypeName(n),r=`import type { ${e} } from '${this.config.importEnumPath}';`;i.includes(r)||i.push(r);const o=this.typeNameToFileName(n);if(!this.enumsMap.has(o)){const e=this.convertJsonToEnumString(u.example,n);this.enumsMap.set(o,{fileName:o,content:e})}s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${e}${this.nullable(u.nullable)};`)}else{const e=this.parseEnum(u,n);if(e?.renderStr){const r=this.getEnumTypeName(n),o=`import type { ${r} } from '${this.config.importEnumPath}';`;i.includes(o)||i.push(o);const l=this.typeNameToFileName(n);this.enumsMap.has(l)||this.enumsMap.set(l,{fileName:l,content:e.renderStr}),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${r}${this.nullable(u.nullable)};`)}}}else s.push(this.parseString(u,a)?.renderStr??"");break;case"object":{const{headerRef:e,renderStr:t}=this.parseObject(u,a)??this.defaultReturn;s.push(t),i.includes(e)||i.push(e)}}}const a=[`export interface ${r} {`,...s,"}"];if(i.length>0){const e=i.filter(e=>""!==e);e.length>0&&e.push(""),a.unshift(...e)}const o=a.join("\n");return{headerRef:i.join("\n"),renderStr:o}}async generateContent(e,t){if("items"in e)return console.warn(`数组类型未处理: ${t}`,e.items),"";switch(e.type){case"boolean":return this.parseBoolean(e,t);case"integer":return this.parseInteger(e,t);case"number":return this.parseNumber(e,t);case"object":{const n=this.parseProperties(e.properties,t);return n?.renderStr??""}case"string":{const n=this.parseString(e,t);return n?.renderStr??""}default:return""}}async parseData(){try{if(!this.schemas)return void console.warn("schemas 为空");for(const[e,t]of Object.entries(this.schemas)){if("$ref"in t){console.warn(`跳过 ReferenceObject: ${e}`);continue}const n="type"in t?t:null;if(!n?.type){console.warn(`无效的 schema 对象: ${e}`);continue}this.requiredFieldS=t.required??[];const r=this.typeNameToFileName(e),s=await this.generateContent(n,e);if(s){(s.includes("export enum ")||s.includes("export const ")&&s.includes("as const"))&&!this.enumsMap.has(r)?this.enumsMap.set(r,{fileName:r,content:s}):this.schemasMap.set(e,{fileName:r,content:s})}}}catch(e){throw console.error("解析过程出错:",e),e}}async writeEnums(){const t=[],n=[];for(const[,r]of this.enumsMap){const s=async({fileName:t,content:r})=>{n.push(`export * from './${t}';`);const s=`${this.config.saveEnumFolderPath}/${t}.ts`;await e.writeFileRecursive(s,r),e.log.info(`${s.padEnd(80)} - Write done!`)};t.push(s(r))}await Promise.all(t),await e.writeFileRecursive(`${this.config.saveEnumFolderPath}/index.ts`,n.join("\n")),e.log.success("Enums write done!")}async writeFile(){const t=[],n=[],r=`${this.config.saveTypeFolderPath}/models/`;for(const[,s]of this.schemasMap){const i=async({fileName:t,content:s})=>{n.push(`export * from './${t}';`);const i=`${r}${t}.ts`;await e.writeFileRecursive(i,s),e.log.info(`${i.padEnd(80)} - Write done!`)};t.push(i(s))}await Promise.all(t),await e.writeFileRecursive(`${r}index.ts`,n.join("\n")),e.log.success("Component parse & write done!")}async handle(){await this.parseData(),await this.writeFile(),await this.writeEnums()}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../utils/index.js"),a=require("./core/components.js"),s=require("./core/get-data.js"),r=require("./core/path.js"),o=require("shelljs"),i=require("chalk"),n=require("path");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(e),d=l(i),u=l(n);let p;const f="development"===process.env.NODE_ENV,h={saveTypeFolderPath:f?"apps/types":"src/api/types",saveApiListFolderPath:f?"apps/types":"src/api",saveEnumFolderPath:f?"apps/types/enums":"src/enums",importEnumPath:"../../../enums",requestMethodsImportPath:"./fetch",publicPrefix:"/api",dataLevel:"serve",swaggerJsonUrl:"https://generator3.swagger.io/openapi.json",headers:{},formatting:{indentation:"\t",lineEnding:"\n"},includeInterface:[],excludeInterface:[],erasableSyntaxOnly:!1,parameterSeparator:"_"};class g{schemas={};paths={};async handle(e){try{let t;if(t=f?(await Promise.resolve().then(function(){return require("../../data/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../utils/index.js"),a=require("./core/components.js"),s=require("./core/get-data.js"),r=require("./core/path.js"),o=require("shelljs"),i=require("chalk"),n=require("path");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(e),d=l(i),u=l(n);let p;const f="development"===process.env.NODE_ENV,h={saveTypeFolderPath:f?"apps/types":"src/api/types",saveApiListFolderPath:f?"apps/types":"src/api",saveEnumFolderPath:f?"apps/types/enums":"src/enums",importEnumPath:"../../../enums",requestMethodsImportPath:"./fetch",publicPrefix:"/api",dataLevel:"serve",swaggerJsonUrl:"https://generator3.swagger.io/openapi.json",headers:{},formatting:{indentation:"\t",lineEnding:"\n"},includeInterface:[],excludeInterface:[],erasableSyntaxOnly:!1,parameterSeparator:"_"};class g{schemas={};paths={};async handle(e){try{let t;if(t=f?(await Promise.resolve().then(function(){return require("../../data/umf.json.js")})).default:await s.getSwaggerJson(e),!t)throw new Error("无法获取 Swagger 数据");this.schemas=t.components?.schemas||{},this.paths=t.paths||{};const o=new a.default(this.schemas,e),i=new r.PathParse(this.paths,t.components?.parameters,this.schemas,e);return await o.handle(),await i.handle(),!0}catch(e){if(e instanceof Error)throw new Error(`Handle Swagger data failed: ${e.message}`);throw new Error("Handle Swagger data failed: unknown error")}}async formatGeneratedFiles(e){const a=`npx prettier --write "${e.saveTypeFolderPath}/**/*.{ts,d.ts}"`;try{await c.default.promises.access(e.saveTypeFolderPath);const{stderr:s}=await new Promise((e,t)=>{o.exec(a,(a,s,r)=>{a?t(a):e({stdout:s,stderr:r})})});s&&(console.log("\n"),console.log("$",d.default.yellow(a)),console.log("\n")),t.log.success("File formatting successful"),console.log("\n")}catch(e){console.log(""),console.log(e),t.log.error("Format failed, please manually execute the following command:"),console.log("$",d.default.yellow(a)),console.log("")}}async copyAjaxConfigFiles(e){try{const a=["config.ts","error-message.ts","fetch.ts","api-type.d.ts"],s=f?u.default.join(__dirname,"..","..","postbuild-assets","ajax-config"):u.default.join(__dirname,"..","..","ajax-config"),r=e;for(const e of a){const a=u.default.join(s,e),o=u.default.join(r,e);try{await c.default.promises.access(a);try{await c.default.promises.access(o),t.log.info(`${e} already exists, skipping generation.`)}catch{await c.default.promises.copyFile(a,o),t.log.success(`${e} create done.`)}}catch(e){t.log.error(`Source file ${a} does not exist`);continue}}}catch(e){return e}}async getConfig(e){try{const t=await c.default.promises.readFile(e,"utf8");return p=!0,JSON.parse(t)}catch(a){return p=!1,t.log.warning("Config file does not exist, will automatically create config file."),await t.writeFileRecursive(e,JSON.stringify(h,null,2)),t.log.success("Please check the an.config.json file in the project root directory"),h}}async initialize(){const e=process.cwd()+"/an.config.json";try{const a=await this.getConfig(e);if(!p)return;await c.default.promises.mkdir(a.saveApiListFolderPath,{recursive:!0}),await this.copyAjaxConfigFiles(a.saveApiListFolderPath),await t.clearDir(a.saveTypeFolderPath),await t.clearDir(a.saveEnumFolderPath),await this.handle(a),await this.formatGeneratedFiles(a),t.log.success("Successfully, all done, see you next time!"),console.log("\n")}catch(e){const a=e instanceof Error?e.message:"Unknown error";t.log.error(`Initialization failed: ${a}`)}}}if("development"===process.env.NODE_ENV){(new g).initialize()}exports.Main=g;
|
package/package.json
CHANGED
package/lib/data/openapi.json.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.3",t={title:"Swagger Petstore - OpenAPI 3.0",description:"This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\n_If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)",termsOfService:"http://swagger.io/terms/",contact:{email:"apiteam@swagger.io"},license:{name:"Apache 2.0",url:"http://www.apache.org/licenses/LICENSE-2.0.html"},version:"1.0.11"},s={description:"Find out more about Swagger",url:"http://swagger.io"},r=[{url:"https://petstore3.swagger.io/api/v3"}],a=[{name:"pet",description:"Everything about your Pets",externalDocs:{description:"Find out more",url:"http://swagger.io"}},{name:"store",description:"Access to Petstore orders",externalDocs:{description:"Find out more about our store",url:"http://swagger.io"}},{name:"user",description:"Operations about user"}],o={"/pet":{put:{tags:["pet"],summary:"Update an existing pet",description:"Update an existing pet by Id",operationId:"updatePet",requestBody:{description:"Update an existent pet in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Pet"}}},required:!0},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid ID supplied"},404:{description:"Pet not found"},422:{description:"Validation exception"}},security:[{petstore_auth:["write:pets","read:pets"]}]},post:{tags:["pet"],summary:"Add a new pet to the store",description:"Add a new pet to the store",operationId:"addPet",requestBody:{description:"Create a new pet in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Pet"}}},required:!0},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid input"},422:{description:"Validation exception"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/findByStatus":{get:{tags:["pet"],summary:"Finds Pets by status",description:"Multiple status values can be provided with comma separated strings",operationId:"findPetsByStatus",parameters:[{name:"status",in:"query",description:"Status values that need to be considered for filter",required:!1,explode:!0,schema:{type:"string",default:"available",enum:["available","pending","sold"]}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid status value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/findByTags":{get:{tags:["pet"],summary:"Finds Pets by tags",description:"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",operationId:"findPetsByTags",parameters:[{name:"tags",in:"query",description:"Tags to filter by",required:!1,explode:!0,schema:{type:"array",items:{type:"string"}}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid tag value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/{petId}":{get:{tags:["pet"],summary:"Find pet by ID",description:"Returns a single pet",operationId:"getPetById",parameters:[{name:"petId",in:"path",description:"ID of pet to return",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid ID supplied"},404:{description:"Pet not found"}},security:[{api_key:[]},{petstore_auth:["write:pets","read:pets"]}]},post:{tags:["pet"],summary:"Updates a pet in the store with form data",description:"",operationId:"updatePetWithForm",parameters:[{name:"petId",in:"path",description:"ID of pet that needs to be updated",required:!0,schema:{type:"integer",format:"int64"}},{name:"name",in:"query",description:"Name of pet that needs to be updated",schema:{type:"string"}},{name:"status",in:"query",description:"Status of pet that needs to be updated",schema:{type:"string"}}],responses:{400:{description:"Invalid input"}},security:[{petstore_auth:["write:pets","read:pets"]}]},delete:{tags:["pet"],summary:"Deletes a pet",description:"delete a pet",operationId:"deletePet",parameters:[{name:"api_key",in:"header",description:"",required:!1,schema:{type:"string"}},{name:"petId",in:"path",description:"Pet id to delete",required:!0,schema:{type:"integer",format:"int64"}}],responses:{400:{description:"Invalid pet value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/{petId}/uploadImage":{post:{tags:["pet"],summary:"uploads an image",description:"",operationId:"uploadFile",parameters:[{name:"petId",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}},{name:"additionalMetadata",in:"query",description:"Additional Metadata",required:!1,schema:{type:"string"}}],requestBody:{content:{"application/octet-stream":{schema:{type:"string",format:"binary"}}}},responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/ApiResponse"}}}}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/store/inventory":{get:{tags:["store"],summary:"Returns pet inventories by status",description:"Returns a map of status codes to quantities",operationId:"getInventory",responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"object",additionalProperties:{type:"integer",format:"int32"}}}}}},security:[{api_key:[]}]}},"/store/order":{post:{tags:["store"],summary:"Place an order for a pet",description:"Place a new order in the store",operationId:"placeOrder",requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Order"}}}},responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid input"},422:{description:"Validation exception"}}}},"/store/order/{orderId}":{get:{tags:["store"],summary:"Find purchase order by ID",description:"For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.",operationId:"getOrderById",parameters:[{name:"orderId",in:"path",description:"ID of order that needs to be fetched",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}},delete:{tags:["store"],summary:"Delete purchase order by ID",description:"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",operationId:"deleteOrder",parameters:[{name:"orderId",in:"path",description:"ID of the order that needs to be deleted",required:!0,schema:{type:"integer",format:"int64"}}],responses:{400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}}},"/user":{post:{tags:["user"],summary:"Create user",description:"This can only be done by the logged in user.",operationId:"createUser",requestBody:{description:"Created user object",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/User"}}}},responses:{default:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}}}}},"/user/createWithList":{post:{tags:["user"],summary:"Creates list of users with given input array",description:"Creates list of users with given input array",operationId:"createUsersWithListInput",requestBody:{content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/User"}}}}},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}},default:{description:"successful operation"}}}},"/user/login":{get:{tags:["user"],summary:"Logs user into the system",description:"",operationId:"loginUser",parameters:[{name:"username",in:"query",description:"The user name for login",required:!1,schema:{type:"string"}},{name:"password",in:"query",description:"The password for login in clear text",required:!1,schema:{type:"string"}}],responses:{200:{description:"successful operation",headers:{"X-Rate-Limit":{description:"calls per hour allowed by the user",schema:{type:"integer",format:"int32"}},"X-Expires-After":{description:"date in UTC when token expires",schema:{type:"string",format:"date-time"}}},content:{"application/xml":{schema:{type:"string"}},"application/json":{schema:{type:"string"}}}},400:{description:"Invalid username/password supplied"}}}},"/user/logout":{get:{tags:["user"],summary:"Logs out current logged in user session",description:"",operationId:"logoutUser",parameters:[],responses:{default:{description:"successful operation"}}}},"/user/{username}":{get:{tags:["user"],summary:"Get user by user name",description:"",operationId:"getUserByName",parameters:[{name:"username",in:"path",description:"The name that needs to be fetched. Use user1 for testing. ",required:!0,schema:{type:"string"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}},400:{description:"Invalid username supplied"},404:{description:"User not found"}}},put:{tags:["user"],summary:"Update user",description:"This can only be done by the logged in user.",operationId:"updateUser",parameters:[{name:"username",in:"path",description:"name that need to be deleted",required:!0,schema:{type:"string"}}],requestBody:{description:"Update an existent user in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/User"}}}},responses:{default:{description:"successful operation"}}},delete:{tags:["user"],summary:"Delete user",description:"This can only be done by the logged in user.",operationId:"deleteUser",parameters:[{name:"username",in:"path",description:"The name that needs to be deleted",required:!0,schema:{type:"string"}}],responses:{400:{description:"Invalid username supplied"},404:{description:"User not found"}}}}},n={schemas:{Order:{type:"object",properties:{id:{type:"integer",format:"int64",example:10},petId:{type:"integer",format:"int64",example:198772},quantity:{type:"integer",format:"int32",example:7},shipDate:{type:"string",format:"date-time"},status:{type:"string",description:"Order Status",example:"approved",enum:["placed","approved","delivered"]},complete:{type:"boolean"}},xml:{name:"order"}},Customer:{type:"object",properties:{id:{type:"integer",format:"int64",example:1e5},username:{type:"string",example:"fehguy"},address:{type:"array",xml:{name:"addresses",wrapped:!0},items:{$ref:"#/components/schemas/Address"}}},xml:{name:"customer"}},Address:{type:"object",properties:{street:{type:"string",example:"437 Lytton"},city:{type:"string",example:"Palo Alto"},state:{type:"string",example:"CA"},zip:{type:"string",example:"94301"}},xml:{name:"address"}},Category:{type:"object",properties:{id:{type:"integer",format:"int64",example:1},name:{type:"string",example:"Dogs"}},xml:{name:"category"}},User:{type:"object",properties:{id:{type:"integer",format:"int64",example:10},username:{type:"string",example:"theUser"},firstName:{type:"string",example:"John"},lastName:{type:"string",example:"James"},email:{type:"string",example:"john@email.com"},password:{type:"string",example:"12345"},phone:{type:"string",example:"12345"},userStatus:{type:"integer",description:"User Status",format:"int32",example:1}},xml:{name:"user"}},Tag:{type:"object",properties:{id:{type:"integer",format:"int64"},name:{type:"string"}},xml:{name:"tag"}},Pet:{required:["name","photoUrls"],type:"object",properties:{id:{type:"integer",format:"int64",example:10},name:{type:"string",example:"doggie"},category:{$ref:"#/components/schemas/Category"},photoUrls:{type:"array",xml:{wrapped:!0},items:{type:"string",xml:{name:"photoUrl"}}},tags:{type:"array",xml:{wrapped:!0},items:{$ref:"#/components/schemas/Tag"}},status:{type:"string",description:"pet status in the store",enum:["available","pending","sold"]}},xml:{name:"pet"}},ApiResponse:{type:"object",properties:{code:{type:"integer",format:"int32"},type:{type:"string"},message:{type:"string"}},xml:{name:"##default"}}},requestBodies:{Pet:{description:"Pet object that needs to be added to the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},UserArray:{description:"List of user object",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/User"}}}}}},securitySchemes:{petstore_auth:{type:"oauth2",flows:{implicit:{authorizationUrl:"https://petstore3.swagger.io/oauth/authorize",scopes:{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},api_key:{type:"apiKey",name:"api_key",in:"header"}}},i={openapi:e,info:t,externalDocs:s,servers:r,tags:a,paths:o,components:n};exports.components=n,exports.default=i,exports.externalDocs=s,exports.info=t,exports.openapi=e,exports.paths=o,exports.servers=r,exports.tags=a;
|