anl 1.3.32 → 1.3.34
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.md
CHANGED
|
@@ -1,2 +1,187 @@
|
|
|
1
1
|
# an-cli
|
|
2
|
+
|
|
2
3
|
前端命令行工具
|
|
4
|
+
|
|
5
|
+
一个基于 Swagger JSON 自动生成 TypeScript 类型定义和 API 请求函数的命令行工具。
|
|
6
|
+
|
|
7
|
+
## 功能特点
|
|
8
|
+
|
|
9
|
+
- 🚀 自动解析 Swagger JSON 文档
|
|
10
|
+
- 📦 生成 TypeScript 类型定义文件
|
|
11
|
+
- 🔄 生成类型安全的 API 请求函数
|
|
12
|
+
- 🎯 支持路径参数、查询参数和请求体
|
|
13
|
+
- 📝 自动生成枚举类型定义
|
|
14
|
+
- 🎨 支持代码格式化
|
|
15
|
+
- ⚡️ 支持文件上传
|
|
16
|
+
- 🛠 可配置的代码生成选项
|
|
17
|
+
|
|
18
|
+
## 安装
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
$ npm install anl -g
|
|
22
|
+
|
|
23
|
+
$ yarn global add anl
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 使用方法
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
$ anl type
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- 如果初次使用会在项目根目录下创建如下配置文件(手动创建也可以),具体参数说明后面会有详细介绍
|
|
33
|
+
|
|
34
|
+
1. 项目根目录创建配置文件 `an.config.json`:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"saveTypeFolderPath": "apps/types",
|
|
39
|
+
"saveApiListFolderPath": "apps/api/",
|
|
40
|
+
"saveEnumFolderPath": "apps/enums",
|
|
41
|
+
"importEnumPath": "../../enums",
|
|
42
|
+
"swaggerJsonUrl": "http://your-swagger-api-url/swagger.json",
|
|
43
|
+
"requestMethodsImportPath": "./fetch",
|
|
44
|
+
"dataLevel": "serve",
|
|
45
|
+
"formatting": {
|
|
46
|
+
"indentation": "\t",
|
|
47
|
+
"lineEnding": "\n"
|
|
48
|
+
},
|
|
49
|
+
"headers": {}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
2. 运行命令生成类型文件:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
anl generate
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 配置项说明
|
|
60
|
+
|
|
61
|
+
| 配置项 | 类型 | 必填 | 说明 |
|
|
62
|
+
| ------------------------ | ---------------------------- | ---- | ------------------------ |
|
|
63
|
+
| saveTypeFolderPath | string | 是 | 类型定义文件保存路径 |
|
|
64
|
+
| saveApiListFolderPath | string | 是 | API 请求函数文件保存路径 |
|
|
65
|
+
| saveEnumFolderPath | string | 是 | 枚举类型文件保存路径 |
|
|
66
|
+
| importEnumPath | string | 是 | 枚举类型导入路径 |
|
|
67
|
+
| swaggerJsonUrl | string | 是 | Swagger JSON 文档地址 |
|
|
68
|
+
| requestMethodsImportPath | string | 是 | 请求方法导入路径 |
|
|
69
|
+
| dataLevel | 'data' \| 'serve' \| 'axios' | 是 | 接口返回数据层级 |
|
|
70
|
+
| formatting | object | 否 | 代码格式化配置 |
|
|
71
|
+
| headers | object | 否 | 请求头配置 |
|
|
72
|
+
|
|
73
|
+
## 生成的文件结构
|
|
74
|
+
|
|
75
|
+
- 这个文件结构是根据配置文件生成的
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
project/
|
|
79
|
+
├── apps/
|
|
80
|
+
│ ├── types/
|
|
81
|
+
│ │ ├── models/ # 所有类型定义文件(不包含枚举类型)
|
|
82
|
+
│ │ ├── connectors/ # API 类型定义(接口定义文件)
|
|
83
|
+
│ │ └── enums/ # 枚举类型定义
|
|
84
|
+
│ └── api/
|
|
85
|
+
│ ├── fetch.ts # 请求方法实现
|
|
86
|
+
│ └── index.ts # API 请求函数
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## 生成的代码示例
|
|
90
|
+
|
|
91
|
+
### 类型定义文件
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
declare namespace UserDetail_GET {
|
|
95
|
+
interface Query {
|
|
96
|
+
userId: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface Response {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
age: number;
|
|
103
|
+
role: UserRole;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### API 请求函数
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
import { GET } from './fetch';
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* 获取用户详情
|
|
115
|
+
*/
|
|
116
|
+
export const userDetailGet = (params: UserDetail_GET.Query) => GET<UserDetail_GET.Response>('/user/detail', params);
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 特性说明
|
|
120
|
+
|
|
121
|
+
### 类型解析
|
|
122
|
+
|
|
123
|
+
- 支持所有 OpenAPI 3.0 规范的数据类型
|
|
124
|
+
- 自动处理复杂的嵌套类型
|
|
125
|
+
- 支持数组、对象、枚举等类型
|
|
126
|
+
- 自动生成接口注释
|
|
127
|
+
|
|
128
|
+
### 文件上传
|
|
129
|
+
|
|
130
|
+
当检测到文件上传类型时,会自动添加对应的请求头:
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
export const uploadFile = (params: UploadFile.Body) =>
|
|
134
|
+
POST<UploadFile.Response>('/upload', params, {
|
|
135
|
+
headers: { 'Content-Type': 'multipart/form-data' },
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 错误处理
|
|
140
|
+
|
|
141
|
+
工具内置了完善的错误处理机制:
|
|
142
|
+
|
|
143
|
+
- 解析错误提示
|
|
144
|
+
- 类型生成失败警告
|
|
145
|
+
- 文件写入异常处理
|
|
146
|
+
|
|
147
|
+
## 开发
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# 安装依赖
|
|
151
|
+
npm install
|
|
152
|
+
|
|
153
|
+
# 开发模式
|
|
154
|
+
按 F5 进行调试
|
|
155
|
+
|
|
156
|
+
# 构建
|
|
157
|
+
npm run build
|
|
158
|
+
|
|
159
|
+
# 本地链接调试
|
|
160
|
+
npm run blink
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## 注意事项
|
|
164
|
+
|
|
165
|
+
1. 确保 Swagger JSON 文档地址可访问
|
|
166
|
+
2. 配置文件中的路径需要是相对于项目根目录的路径
|
|
167
|
+
3. 生成的文件会覆盖已存在的同名文件
|
|
168
|
+
4. 建议将生成的文件加入版本控制
|
|
169
|
+
|
|
170
|
+
## 常见问题
|
|
171
|
+
|
|
172
|
+
1. 生成的类型文件格式化失败
|
|
173
|
+
|
|
174
|
+
- 检查是否安装了 prettier
|
|
175
|
+
- 确认项目根目录下是否有 prettier 配置文件
|
|
176
|
+
|
|
177
|
+
2. 请求函数导入路径错误
|
|
178
|
+
- 检查 requestMethodsImportPath 配置是否正确
|
|
179
|
+
- 确认请求方法文件是否存在
|
|
180
|
+
|
|
181
|
+
## 贡献指南
|
|
182
|
+
|
|
183
|
+
欢迎提交 Issue 和 Pull Request!
|
|
184
|
+
|
|
185
|
+
## 许可证
|
|
186
|
+
|
|
187
|
+
ISC License
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.0",t={"/api/manageGame/createGame":{post:{operationId:"ManageGameController_createGame",summary:"创建新的游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameDto"}}}},responses:{200:{description:"返回游戏列表",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGame"}}}}},tags:["Manage Game"]}},"/api/manageGame/gameList":{get:{operationId:"ManageGameController_getGameList",summary:"游戏列表",parameters:[],responses:{200:{description:"返回游戏列表"}},tags:["Manage Game"]}},"/api/manageGame/{gameName}/getGameConfig":{get:{operationId:"ManageGameController_getGameConfig",summary:"获取游戏的配置信息",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置",content:{"application/json":{schema:{$ref:"#/components/schemas/Config"}}}}},tags:["Manage Game"]}},"/api/manageGame/rename":{post:{operationId:"ManageGameController_rename",summary:"游戏名称重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/delete":{post:{operationId:"ManageGameController_deleteFileOrDir",summary:"删除游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteGameDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/{gameName}/relation":{get:{operationId:"ManageGameController_gameRelation",summary:"游戏与资源的关联",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully.",content:{"application/json":{schema:{$ref:"#/components/schemas/GameRelationVo"}}}}},tags:["Manage Game"]}},"/api/llm/{schema}/{type}/{id}/txt/v2":{get:{operationId:"LlmController_txtV2",summary:"Maas文生文",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"type",required:!0,in:"path",schema:{type:"string"}},{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{rid}/features":{get:{operationId:"LlmController_recommendFeatures",summary:"推荐角色人格",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{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"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/update":{put:{operationId:"LlmController_extractUpdateRole",summary:"更新角色",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/{id}/del":{delete:{operationId:"LlmController_extractDelRole",summary:"删除角色",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}},{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/add":{post:{operationId:"LlmController_extractAddBg",summary:"添加背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/update":{put:{operationId:"LlmController_extractUpdateBg",summary:"更新背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/{id}/del":{delete:{operationId:"LlmController_extractDelBg",summary:"删除背景",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}},{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/batchUpdate":{put:{operationId:"LlmController_extractBatchUpdate",summary:"批量更新角色和背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchUpdateRspDto"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/batchConfirm":{post:{operationId:"LlmController_extractBatchConfirm",summary:"批量确认保存",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchConfirmRspDto"}}}}},tags:["LLM"]}},"/api/role/role":{post:{operationId:"RoleController_createRole",summary:"保存角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Role"]}},"/api/role/list":{post:{operationId:"RoleController_listRole",summary:"获取该用户下角色列表",parameters:[],requestBody:{required:!0,description:"获取该用户下角色列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}}},tags:["Role"]}},"/api/role/update":{put:{operationId:"RoleController_updateRole",summary:"更新角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"Successfully."}},tags:["Role"]}},"/api/role/batchUpdate":{put:{operationId:"RoleController_batchUpdateRole",summary:"批量更新角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}}},tags:["Role"]}},"/api/role/{rid}":{delete:{operationId:"RoleController_deletedRole",summary:"删除角色",parameters:[{name:"rid",required:!0,in:"path",description:"角色ID",schema:{type:"string"}}],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/resource":{post:{operationId:"ResourceController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateResourceDto"}}}},responses:{201:{description:""}},tags:["Resource"]}},"/api/resource/{id}":{get:{operationId:"ResourceController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]},patch:{operationId:"ResourceController_update",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateResourceDto"}}}},responses:{200:{description:""}},tags:["Resource"]},delete:{operationId:"ResourceController_remove",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]}},"/api/bg/add":{post:{operationId:"BgController_createBg",summary:"保存背景信息",parameters:[],requestBody:{required:!0,description:"保存背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Bg"]}},"/api/bg/list":{post:{operationId:"BgController_list",summary:"获取背景信息列表",parameters:[],requestBody:{required:!0,description:"获取背景信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindBgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Bg"]}},"/api/bg/update":{put:{operationId:"BgController_updateBg",summary:"更新背景信息",parameters:[],requestBody:{required:!0,description:"更新背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Bg"]}},"/api/bg/batchUpdate":{put:{operationId:"BgController_batchUpdateBg",summary:"批量更新背景信息",parameters:[],requestBody:{required:!0,description:"批量更新背景信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}}}}},tags:["Bg"]}},"/api/bg/remove/{bid}":{delete:{operationId:"BgController_remove",summary:"删除背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Bg"]}},"/api/bgm/{category}/table":{get:{operationId:"BgmController_table",summary:"获取音乐库数据",parameters:[{name:"category",required:!0,in:"path",schema:{type:"string"}}],responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BgmTableDto"}}}}},tags:["Bgm"]}},"/api/bgm/all":{get:{operationId:"BgmController_all",summary:"获取音乐搜索列表",parameters:[],responses:{default:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BgmListDto"}}}}}},tags:["Bgm"]}},"/api/bgm/link/scene":{post:{operationId:"BgmController_linkScene",summary:"音乐裁剪",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/AudioCutDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bgm"]}},"/api/bgm/excelConvertDb":{post:{operationId:"BgmController_excelConvertDb",parameters:[],responses:{201:{description:""}},tags:["Bgm"]}},"/api/bgm/clearBgm":{post:{operationId:"BgmController_clearBgm",parameters:[],responses:{201:{description:""}},tags:["Bgm"]}},"/api/dict/{type}/{name}":{get:{operationId:"DictController_create",summary:"添加字典数据",parameters:[{name:"type",required:!0,in:"path",schema:{type:"string"}},{name:"name",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Dict"]}},"/api/dict/list":{get:{operationId:"DictController_findAll",summary:"字典列表",parameters:[],responses:{200:{description:""}},tags:["Dict"]}},"/api/editor/scene/add":{post:{operationId:"EditorController_addScenes",summary:"创建章节/场景",parameters:[],requestBody:{required:!0,description:"请求体",content:{"application/json":{schema:{$ref:"#/components/schemas/AddSceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["Editor"]}},"/api/editor/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/{id}":{post:{operationId:"EditorController_commandLine",summary:"根据行ID获取指令行",parameters:[{name:"id",required:!0,in:"path",description:"id",schema:{type:"string"}}],requestBody:{required:!0,description:"场景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/vocal/binding":{post:{operationId:"VocalController_binding",summary:"配音绑定",parameters:[],requestBody:{required:!0,description:"配音绑定",content:{"application/json":{schema:{$ref:"#/components/schemas/VocalBindingDto"}}}},responses:{201:{description:""}},tags:["Vocal"]}},"/api/vocal/record/{event}/{reqId}":{get:{operationId:"VocalController_record",summary:"获取配音结果",parameters:[{name:"event",required:!0,in:"path",schema:{type:"string"}},{name:"reqId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Vocal"]}},"/api/vocal/ready/{gameName}/{sceneid}":{get:{operationId:"VocalController_getReadyVocalList",summary:"获取准备配音的列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}},{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalReadyDTO"}}}}}},tags:["Vocal"]}},"/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:["Vocal"]}},"/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:["Vocal"]},post:{operationId:"VocalController_saveBatchVocal",summary:"保存配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{201:{description:""}},tags:["Vocal"]}},"/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:["Vocal"]}},"/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:["Vocal"]}},"/api/vocal/cancel/{sceneid}":{post:{operationId:"VocalController_cancelBatchVocal",summary:"取消配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{201:{description:""}},tags:["Vocal"]}},"/api/prop/add":{post:{operationId:"PropController_createProp",summary:"保存道具信息",parameters:[],requestBody:{required:!0,description:"保存道具信息",content:{"application/json":{schema:{$ref:"#/components/schemas/PropDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Prop"]}},"/api/prop/list":{post:{operationId:"PropController_list",summary:"获取道具信息列表",parameters:[],requestBody:{required:!0,description:"获取道具信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindPropDto"}}}},responses:{200:{description:"Successfully."}},tags:["Prop"]}},"/api/prop/update":{put:{operationId:"PropController_updateProp",summary:"更新道具信息",parameters:[],requestBody:{required:!0,description:"更新道具信息",content:{"application/json":{schema:{$ref:"#/components/schemas/PropDto"}}}},responses:{200:{description:"Successfully."}},tags:["Prop"]}},"/api/prop/batchUpdate":{put:{operationId:"PropController_batchUpdateProp",summary:"批量更新道具信息",parameters:[],requestBody:{required:!0,description:"批量更新道具信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PropDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PropDto"}}}}}},tags:["Prop"]}},"/api/prop/remove/{id}":{delete:{operationId:"PropController_remove",summary:"删除道具信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Prop"]}},"/api/cg/add":{post:{operationId:"CgController_createCg",summary:"保存Cg信息",parameters:[],requestBody:{required:!0,description:"保存Cg信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}}},tags:["Cg"]}},"/api/cg/list":{post:{operationId:"CgController_list",summary:"获取Cg信息列表",parameters:[],requestBody:{required:!0,description:"获取Cg信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindCgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}}},tags:["Cg"]}},"/api/cg/update":{put:{operationId:"CgController_updateCg",summary:"更新Cg信息",parameters:[],requestBody:{required:!0,description:"更新Cg信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CgDto"}}}},responses:{200:{description:"Successfully."}},tags:["Cg"]}},"/api/cg/batchUpdate":{put:{operationId:"CgController_batchUpdateCg",summary:"批量更新Cg信息",parameters:[],requestBody:{required:!0,description:"批量更新Cg信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}}},tags:["Cg"]}},"/api/cg/remove/{id}":{delete:{operationId:"CgController_remove",summary:"删除Cg信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Cg"]}},"/api/canvas/record":{post:{operationId:"CanvasController_record",summary:"记录画布数据",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RecordCanvasDto"}}}},responses:{200:{description:""},500:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ValidateCanvas"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/view":{get:{operationId:"CanvasController_view",summary:"获取最新的画布节点数据",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasView"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/revise/history":{get:{operationId:"CanvasController_history",summary:"获取历史修订列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CanvasHistory"}}}}}},tags:["Canvas"]}},"/api/canvas/{id}/revise/detail":{get:{operationId:"CanvasController_detail",summary:"获取指定修订详情",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasBody"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/node/preview":{post:{operationId:"CanvasController_nodePreview",summary:"节点预览",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},responses:{200:{description:""}},tags:["Canvas"]}},"/api/variable/global/record":{post:{operationId:"VariableController_recordVariable",summary:"记录变量信息",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateVariableDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ResultData"}}}}},tags:["Variable"]}},"/api/variable/global/{gameName}/list":{get:{operationId:"VariableController_varList",summary:"获取游戏变量信息列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/variable/{id}":{get:{operationId:"VariableController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Variable"]}},"/api/variable/global/{id}/remove":{delete:{operationId:"VariableController_remove",summary:"删除变量信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/user/login":{post:{operationId:"UserController_login",summary:"用户登录",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{200:{description:"Successfully."}},tags:["User"]}},"/api/user":{post:{operationId:"UserController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{201:{description:""}},tags:["User"]}},"/api/auth/captcha":{get:{operationId:"AuthController_getCaptcha",summary:"获取图形验证码",parameters:[],responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CaptchaRsp"}}}}},tags:["身份鉴权"]}}},r={title:"UMPAY.NETA Terre API",description:"API Refrence of UMPAY.NETA Terre Editor",version:"1.0",contact:{}},s=[],i=[],o={schemas:{CompletionDto:{type:"object",properties:{editorValue:{type:"string",description:"Editor input value for which the completion is required"},sceneType:{type:"string",description:"scene file type en or zh"},params:{type:"object",description:"Parameters required for completion"}},required:["editorValue","sceneType","params"]},CreateGameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},gameType:{type:"string",description:"游戏类型",enum:["solvePuzzles","otome"],example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome"}',default:"solvePuzzles"},editorType:{type:"string",description:"编辑器模式",enum:["ui","txt"],example:'{"UI":"ui","TXT":"txt"}'}},required:["gameName","sceneName","gameType","editorType"]},EditorTypeEnum:{type:"string",description:"编辑器模式",enum:["ui","txt"]},Config:{type:"object",properties:{Game_name:{type:"string",description:"游戏名称"},Game_key:{type:"string",description:"游戏标识"},Package_name:{type:"string",description:"所属包名"},Description:{type:"string",description:"游戏描述"},Title_img:{type:"string",description:"标题背景"},Title_bgm:{type:"string",description:"标题背景音乐"},Game_Logo:{type:"string",description:"游戏LOGO"},Debug:{type:"string",description:""},GameNum:{type:"string",description:""},GameNum_Double:{type:"string",description:""},Render_mode:{$ref:"#/components/schemas/EditorTypeEnum"},Game_type:{type:"string",description:"游戏类型"},Start_node:{type:"string",description:"开始节点"}},required:["Game_name","Game_key","Package_name","Description","Title_img","Title_bgm","Game_Logo","Debug","GameNum","GameNum_Double","Render_mode","Game_type","Start_node"]},GameInfo:{type:"object",properties:{name:{type:"string",description:"游戏名称"},path:{type:"string",description:"游戏路径"},config:{description:"游戏配置",allOf:[{$ref:"#/components/schemas/Config"}]}},required:["name","path","config"]},Progress:{type:"object",properties:{current:{type:"number",description:"进度"},status:{type:"string",description:"进度状态",enum:["0","1","2","3"],example:'{"INIT":"0","ING":"1","DONE":"2","ERR":"3"}'},msg:{type:"string",description:"生成信息"}},required:["current","status","msg"]},Picture:{type:"object",properties:{url:{type:"string",description:"图片地址"},check:{type:"boolean",description:"是否选中"}},required:["url","check"]},UpdateBgDto:{type:"object",properties:{id:{type:"string",description:"背景ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"背景名称"},style:{type:"string",description:"背景风格",enum:["anime","romantic"],example:'{"Anime":"anime","Romantic":"romantic"}'},original:{type:"string",description:"原文(背景描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"背景图片"},list:{description:"背景图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},word:{type:"string",description:"背景正向提示词"},tlmId:{type:"string",description:"背景对应大模型输出ID"},category:{description:"背景分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},stage:{type:"string",description:"生成阶段",enum:["prompts","bg"],example:'{"PROMPTS":"prompts","BG":"bg"}'},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","url","list","word","tlmId","category","stage","progress"]},BatchBg:{type:"object",properties:{progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},list:{description:"背景数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}},required:["progress","list"]},Frame:{type:"object",properties:{eyesHalfOpen:{type:"string",description:"半闭眼"},eyesClose:{type:"string",description:"闭眼"},mouthHalfOpen:{type:"string",description:"半张嘴"},mouthOpen:{type:"string",description:"张嘴"}},required:["eyesHalfOpen","eyesClose","mouthHalfOpen","mouthOpen"]},Category:{type:"object",properties:{categoryValue:{type:"string",description:"表情差分类别值(一级)"},categoryLabel:{type:"string",description:"表情差分类别标签(一级)"},value:{type:"string",description:"表情差分值(二级)"},label:{type:"string",description:"表情差分标签(二级)"}},required:["categoryValue","categoryLabel","value","label"]},Expression:{type:"object",properties:{url:{type:"string",description:"差分图片"},list:{description:"表情变体图",type:"array",items:{$ref:"#/components/schemas/Picture"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},category:{description:"差分类别",allOf:[{$ref:"#/components/schemas/Category"}]},applyGame:{description:"序列帧应用游戏列表",type:"array",items:{type:"string"}}},required:["url","list","frame","category","applyGame"]},UpdateRoleDto:{type:"object",properties:{uid:{type:"string",description:"用户ID"},id:{type:"string",description:"角色ID"},name:{type:"string",description:"角色名字"},gender:{type:"string",description:"性别",enum:["male","female"],example:'{"MALE":"male","FEMALE":"female"}'},style:{type:"string",description:"风格",enum:["anime","romantic"],example:'{"Anime":"anime","Romantic":"romantic"}'},age:{type:"string",description:"年纪",enum:["child","adult","youth","elder"],example:'{"CHILD":"child","ADULT":"adult","YOUNG":"youth","ELDER":"elder"}'},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"}},stage:{type:"string",description:"生成阶段",enum:["prompts","figure","expression","frame"]},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["uid","id","name","gender","style","age","timbre","original","url","list","tlmId","feature","word","prompts","expressions","stage","progress"]},BatchRole:{type:"object",properties:{list:{description:"角色数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["list","progress"]},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"]},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"},gameName:{type:"string",description:"游戏名称"},type:{type:"string",description:"批处理类型",enum:["extract","picture"]}},required:["bg","role","bgm","progress","id","uid","gameName","type"]},CreateGame:{type:"object",properties:{gameList:{description:"游戏信息",type:"array",items:{$ref:"#/components/schemas/GameInfo"}},batch:{description:"批量提取任务",allOf:[{$ref:"#/components/schemas/BatchExtraction"}]}},required:["gameList","batch"]},RenameDto:{type:"object",properties:{source:{type:"string",description:"The source path of the file or directory to be renamed"},newName:{type:"string",description:"New name for renaming the file or directory"}},required:["source","newName"]},DeleteGameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"}},required:["gameName"]},RoleRelation:{type:"object",properties:{id:{type:"string",description:"id"},name:{type:"string",description:"角色名字"},url:{type:"string",description:"地址"}},required:["id","name","url"]},GameRelationVo:{type:"object",properties:{role:{description:"角色关联信息",type:"array",items:{$ref:"#/components/schemas/RoleRelation"}}},required:["role"]},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:{gameName:{type:"string",description:"游戏名"}},required:["gameName"]},IDRspDto:{type:"object",properties:{id:{type:"string",description:"ID"}},required:["id"]},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"]},IdNameDto:{type:"object",properties:{id:{type:"string",description:"ID"},name:{type:"string",description:"名称"}},required:["id","name"]},BatchConfirmRspDto:{type:"object",properties:{success:{description:"成功数据",type:"array",items:{$ref:"#/components/schemas/IdNameDto"}},fail:{description:"失败数据",type:"array",items:{$ref:"#/components/schemas/IdNameDto"}}},required:["success","fail"]},FindRoleDto:{type:"object",properties:{name:{type:"string",description:"角色名称"}},required:["name"]},Remark:{type:"object",properties:{applyFrame:{description:"应用差分帧图",type:"array",items:{type:"string"}}},required:["applyFrame"]},CreateResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"},path:{type:"string",description:"资源路径"},list:{description:"备选图",type:"array",items:{type:"string"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},type:{type:"string",description:"资源类型",enum:["figure","background","bgm"],example:'{"FIGURE":"figure","BACKGROUND":"background","BGM":"bgm"}'},uid:{type:"string",description:"用户ID"},pid:{type:"string",description:"父级资源ID"},category:{description:"分类",allOf:[{$ref:"#/components/schemas/Category"}]},remark:{description:"备注",allOf:[{$ref:"#/components/schemas/Remark"}]}},required:["name","path","list","frame","type","uid","pid","category","remark"]},UpdateResourceDto:{type:"object",properties:{}},FindBgDto:{type:"object",properties:{name:{type:"string",description:"背景名称"}},required:["name"]},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:{uid:{type:"string",description:"用户ID"},gameName:{type:"string",description:"游戏名"},sceneName:{type:"string",description:"场景名称"},audio:{type:"string",description:"音乐名"},url:{type:"string",description:"音乐库地址"},loop:{type:"string",description:"是否循环"},volume:{type:"number",description:"音量0-100"},rate:{type:"number",description:"播放速度"}},required:["uid","gameName","sceneName","audio","url","loop","volume","rate"]},ResultData:{type:"object",properties:{code:{type:"number",default:200},msg:{type:"string",default:"ok"},data:{type:"any",default:null,nullable:!0}},required:["code","msg","data"]},AddSceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称"},sceneName:{description:"场景列表",type:"array",items:{type:"string"}}},required:["gameName","sectionName","sceneName"]},SceneDetailDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},sceneType:{type:"string",description:"场景类型"}},required:["gameName","sceneName","sceneType"]},Role:{type:"object",properties:{id:{type:"string",description:"角色ID"},emotion:{type:"string",description:"表情"},name:{type:"string",description:"角色名称"},gender:{type:"string",description:"角色性别",enum:["male","female"],example:'{"MALE":"male","FEMALE":"female"}'},style:{type:"string",description:"角色风格",enum:["anime","romantic"],example:'{"Anime":"anime","Romantic":"romantic"}'},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:"道具名称"}},required:["id","name"]},LineDto:{type:"object",properties:{id:{type:"string",description:"行ID"},content:{type:"string",description:"内容"},command:{type:"array",description:"命令",example:'{"Narrator":"narr","ClearPorp":"clp","BlackScreenText":"bst","BackgroundImage":"bgi","BackgroundMusic":"bgm","ComputerGraphics":"cg","CharacterPortrait":"cp"}',items:{type:"string",enum:["narr","clp","bst","bgi","bgm","cg","cp"]}},role:{description:"角色",allOf:[{$ref:"#/components/schemas/Role"}]},vocal:{description:"配音",allOf:[{$ref:"#/components/schemas/Vocal"}]},prop:{description:"道具",allOf:[{$ref:"#/components/schemas/Prop"}]}},required:["id","content","command","role","vocal","prop"]},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:{scene:{type:"string",description:"场景文件名"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}},figures:{description:"立绘信息(拥有资源的角色)",type:"array",items:{$ref:"#/components/schemas/Figure"}},bg:{type:"string",description:"背景"},cg:{type:"string",description:"CG"},bgm:{description:"音乐",allOf:[{$ref:"#/components/schemas/BgmVO"}]},isBatchVocal:{type:"boolean",description:"批量配音"},recommendBgm:{description:"推荐音乐",type:"array",items:{$ref:"#/components/schemas/BgmListDto"}}},required:["scene","dialogues","figures","bg","cg","bgm","isBatchVocal","recommendBgm"]},SceneReq:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}}},required:["gameName","sceneName","dialogues"]},UpdateUiResourceDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},bg:{type:"string",description:"更新背景"},cg:{type:"string",description:"更新CG"},clearBg:{type:"boolean",description:"清除背景"},clearCg:{type:"boolean",description:"清除CG"}},required:["gameName","sceneName","bg","cg","clearBg","clearCg"]},SceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"}},required:["gameName","sceneName"]},VocalBindingDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},id:{type:"string",description:"行标识"},timbre:{type:"string",description:"音色"},url:{type:"string",description:"配音相对地址"}},required:["gameName","sceneName","id","timbre","url"]},VocalUntieDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{type:"string",description:"场景名称"},id:{type:"string",description:"行标识"},url:{type:"string",description:"解绑配音相对地址"}},required:["gameName","sceneName","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"]},PropDto:{type:"object",properties:{id:{type:"string",description:"道具ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"道具名称"},style:{type:"string",description:"道具风格",enum:["anime","romantic"],example:'{"Anime":"anime","Romantic":"romantic"}'},original:{type:"string",description:"原文(道具描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"道具图片"},list:{description:"道具图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},tlmId:{type:"string",description:"道具对应大模型输出ID"},category:{description:"道具分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},size:{type:"string",description:"道具大小",enum:["small","middle","big"],example:'{"SMALL":"small","MIDDLE":"middle","BIG":"big"}'},stage:{type:"string",description:"生成阶段",enum:["prompts","prop"],example:'{"PROMPTS":"prompts","PROP":"prop"}'},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","url","list","tlmId","category","size","stage","progress"]},FindPropDto:{type:"object",properties:{name:{type:"string",description:"道具名称"}},required:["name"]},CgDto:{type:"object",properties:{id:{type:"string",description:"Cg ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"Cg名称"},style:{type:"string",description:"Cg风格"},original:{type:"string",description:"原文(Cg描述)"},prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"Cg对应大模型输出ID"},mood:{description:"角色情绪",type:"array",items:{type:"string"}},role:{type:"string",description:"关联角色ID"},factor:{description:"影响因子",type:"array",items:{type:"string"}},atmosphere:{type:"string",description:"画面氛围"},url:{type:"string",description:"Cg图片"},list:{description:"Cg图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},stage:{type:"string",description:"生成阶段",enum:["prompts","cg"],example:'{"PROMPTS":"prompts","CG":"cg"}'},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","list","stage","progress"]},FindCgDto:{type:"object",properties:{name:{type:"string",description:"Cg名称"}},required:["name"]},Variable:{type:"object",properties:{id:{type:"string"},alias:{type:"string"},name:{type:"string"}},required:["id","alias","name"]},ExpValue:{type:"object",properties:{value:{type:"number"},exp:{type:"string"}},required:["value","exp"]},ICondition:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},IOptions:{type:"object",properties:{name:{type:"string",description:"选项名称"},nodeId:{type:"string",description:"关联的节点"},sound:{type:"string",description:"绑定音频"},varId:{type:"string",description:"选定的变量ID"},alias:{type:"string",description:"选定的变量"},varValue:{type:"number",description:"设定的变量值"},advanced:{description:"高级选项",allOf:[{$ref:"#/components/schemas/ICondition"}]}},required:["name","nodeId","sound","varId","alias","varValue","advanced"]},NodeData:{type:"object",properties:{label:{type:"string",description:"节点名称"},chapterId:{type:"string",description:"章节id"},background:{type:"string",description:"绑定背景"},options:{description:"选项",type:"array",items:{$ref:"#/components/schemas/IOptions"}}},required:["label","chapterId","background","options"]},Node:{type:"object",properties:{id:{type:"string",description:"id"},type:{type:"string",description:"类型"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/NodeData"}]}},required:["id","type","data"]},EdgeData:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},Edge:{type:"object",properties:{id:{type:"string",description:"id"},source:{type:"string"},target:{type:"string"},data:{$ref:"#/components/schemas/EdgeData"}},required:["id","source","target","data"]},CanvasBody:{type:"object",properties:{nodes:{description:"节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["nodes","edges"]},Valid:{type:"object",properties:{id:{type:"string"},msg:{type:"string"},type:{type:"string"}},required:["id","msg","type"]},ValidateCanvas:{type:"object",properties:{only:{description:"节点重复集",allOf:[{$ref:"#/components/schemas/Valid"}]},scene:{description:"场景报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},branch:{description:"节点报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},edge:{description:"边报错集",allOf:[{$ref:"#/components/schemas/Valid"}]}},required:["only","scene","branch","edge"]},CanvasHistory:{type:"object",properties:{_id:{type:"string",description:"画布ID"},updatedAt:{type:"string",description:"更新时间"},createdAt:{type:"string",description:"创建时间"}},required:["_id","updatedAt","createdAt"]},RecordCanvasDto:{type:"object",properties:{editorType:{type:"string",description:"编辑器类型",enum:["ui","txt"],example:'{"UI":"ui","TXT":"txt"}'},gameName:{type:"string",description:"游戏名称"},nodes:{description:"画布节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"画布边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["editorType","gameName","nodes","edges"]},CanvasView:{type:"object",properties:{canvas:{description:"节点信息",allOf:[{$ref:"#/components/schemas/CanvasBody"}]},valid:{description:"校验信息",allOf:[{$ref:"#/components/schemas/ValidateCanvas"}]}},required:["canvas","valid"]},UpdateVariableDto:{type:"object",properties:{id:{type:"string",description:"变量表ID"}},required:["id"]},CreateUserDto:{type:"object",properties:{_id:{type:"string",description:"ID"},username:{type:"string",description:"用户名"},password:{type:"string",description:"密码"},nickname:{type:"string",description:"昵称(可选填)"},caId:{type:"string",description:"验证码ID"},captcha:{type:"string",description:"用户输入验证码"},secret:{type:"string",description:""}},required:["_id","username","password","nickname","caId","captcha","secret"]},CaptchaRsp:{type:"object",properties:{id:{type:"string",description:"id"},data:{type:"string",description:"svg image"}},required:["id","data"]}}},a={openapi:e,paths:t,info:r,tags:s,servers:i,components:o};exports.components=o,exports.default=a,exports.info=r,exports.openapi=e,exports.paths=t,exports.servers=i,exports.tags=s;
|
package/lib/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.3.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.3.34",i="FE command line tool",s="bin/an-cli.js",l={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"},p={anl:"bin/an-cli.js"},t="Gleason <bianliuzhu@gmail.com>",r={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.3","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},o={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"^10.0.0",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},n=["typescript","cli","typescript 脚手架","ts 脚手架","ts-cli","脚手架"],c=["package.json","README.md","lib","template"],u={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},a="commonjs",m={name:"anl",version:e,description:i,main:s,scripts:l,bin:p,author:t,license:"ISC",devDependencies:r,dependencies:o,keywords:n,files:c,repository:u,type:a};exports.author=t,exports.bin=p,exports.default=m,exports.dependencies=o,exports.description=i,exports.devDependencies=r,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=l,exports.type=a,exports.version=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const
|
|
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:""};constructor(e,t){this.schemas=e,this.config=t}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/","");return{typeName:t,fileName:this.typeNameToFileName(t)}}parseRef(e){if(!e?.trim())return{headerRefStr:"",typeName:""};const{fileName:t,typeName:r}=this.nameTheHumpCenterStroke(e);let n;return n=/enum/gi.test(r)?`import type { ${r} } from '${this.config.importEnumPath}';`:`import type { ${r} } from './${t}';`,{headerRefStr:n,typeName:r}}parseObject(e,r){let n="",s="";if("object"===e.type){const a=e;if("object"==typeof a.additionalProperties){const e=this.parseArray(a.additionalProperties,r)??this.defaultReturn;n=e.headerRef,s=e.renderStr}else s=`${t}${r}: ${e.type};`}return{headerRef:n,renderStr:s}}parseArray(e,r){const n=e,{items:s={},nullable:a}=n,i=s?.$ref;if(i){const{headerRefStr:e,typeName:n}=this.parseRef(i);return{headerRef:e,renderStr:`${t}${r}${a?"?":""}: Array<${n}>;`}}const o=s?.type;return{headerRef:"",renderStr:`${t}${r}${a?"?":""}: Array<${"integer"===o?"number":o}>;`}}parseBoolean(e,r){return"boolean"===e.type?`${t}${r}: boolean;`:""}parseEnum(e,r){if(!Array.isArray(e.enum))return null;if("integer"===e.type){return{headerRef:"",renderStr:[`export enum ${r} {`,...e.enum.map((e=>`${t}NUMBER_${e} = ${e},`)),"}"].join("\n")}}if("string"===e.type){const n=e.enum.every((e=>!isNaN(Number(e))));return{headerRef:"",renderStr:[`export enum ${r} {`,...e.enum.map((e=>n?`${t}NUMBER_${e} = '${e}',`:`${t}${e.toUpperCase()} = '${e}',`)),"}"].join("\n")}}return null}parseInteger(e,r){if(Array.isArray(e.enum)){const t=r.charAt(0).toUpperCase()+r.slice(1);return this.parseEnum(e,t)?.renderStr??""}return`${t}${r}: number;`}parseNumber(e,r){return"number"===e.type?`${t}${r}: number;`:""}convertJsonToEnumString(e,r){try{const n=JSON.parse(e);return`export enum ${r} {\n${Object.entries(n).map((([e,r])=>`${t}${e.toUpperCase()} = '${r}'`)).join(",\n")}\n}`}catch(e){return console.error("JSON 解析失败:",e),""}}parseString(r,n){if(console.log(r),"string"===r.type){if(r.enum){const s=n.charAt(0).toUpperCase()+n.slice(1);if(e.isValidJSON(r.example)){const e=this.convertJsonToEnumString(r.example,s);return{headerRef:"",renderStr:`${t}${n}: ${s};`,comment:e}}{const e=this.typeNameToFileName(s),t=this.parseEnum(r,s);t&&this.enumsMap.set(e,{fileName:e,content:t.renderStr})}}return{headerRef:"",renderStr:`${t}${n}: string;`}}return null}parseProperties(r,n){const s=[],a=[];for(const n in r){const i=r[n];if(i?.$ref){const{headerRefStr:e,typeName:r}=this.parseRef(i.$ref);a.includes(e)||a.push(e),s.push(`${t}${n}: ${r};`);continue}if("allOf"in i){const e=i.allOf?.[0];if(e?.$ref){const{headerRefStr:r,typeName:i}=this.parseRef(e.$ref);a.includes(r)||a.push(r),s.push(`${t}${n}: ${i};`);continue}}const o=i,c=this.fieldComment(o);switch(""!==c&&s.push(c),o.type){case"array":{const e=this.parseArray(o,n)??this.defaultReturn;s.push(e.renderStr),a.includes(e.headerRef)||a.push(e.headerRef)}break;case"boolean":s.push(this.parseBoolean(o,n));break;case"integer":s.push(this.parseInteger(o,n));break;case"number":s.push(this.parseNumber(o,n));break;case"string":if(o.enum){const r=n.charAt(0).toUpperCase()+n.slice(1);if(console.log(r,n),e.isValidJSON(o.example)){const e=`import type { ${r} } from '${this.config.importEnumPath}';`;a.includes(e)||a.push(e);const i=this.typeNameToFileName(r),c=this.convertJsonToEnumString(o.example,r);this.enumsMap.set(i,{fileName:i,content:c}),s.push(`${t}${n}: ${r};`)}else{const e=this.parseEnum(o,r);if(e?.renderStr){const i=`import type { ${r} } from '${this.config.importEnumPath}';`;a.includes(i)||a.push(i);const o=this.typeNameToFileName(r);this.enumsMap.set(o,{fileName:o,content:e.renderStr}),s.push(`${t}${n}: ${r};`)}}}else s.push(this.parseString(o,n)?.renderStr??"");break;case"object":{const{headerRef:e,renderStr:t}=this.parseObject(o,n)??this.defaultReturn;s.push(t),a.includes(e)||a.push(e)}}}const i=[`export interface ${n} {`,...s,"}"];if(a.length>0){const e=a.filter((e=>""!==e));e.length>0&&e.push(""),i.unshift(...e)}const o=i.join("\n");return{headerRef:a.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 r=this.parseProperties(e.properties,t);return r?.renderStr??""}case"string":{const r=this.parseString(e,t);return r?.renderStr??""}default:return""}}async writeEnums(){const t=[],r=[];for(const[,n]of this.enumsMap){const s=async({fileName:t,content:n})=>{r.push(`export * from './${t}';`),await e.writeFileRecursive(`${this.config.saveEnumFolderPath}/${t}.ts`,n)};t.push(s(n))}await Promise.all(t),await e.writeFileRecursive(`${this.config.saveEnumFolderPath}/index.ts`,r.join("\n"))}async writeFile(){const t=[],r=[],n=`${this.config.saveTypeFolderPath}/models/`;for(const[,s]of this.schemasMap){const a=async({fileName:t,content:s})=>{r.push(`export * from './${t}';`),await e.writeFileRecursive(`${n}${t}.ts`,s)};t.push(a(s))}await Promise.all(t),await e.writeFileRecursive(`${n}index.ts`,r.join("\n"))}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 r="type"in t?t:null;if(!r?.type){console.warn(`无效的 schema 对象: ${e}`);continue}const n=this.typeNameToFileName(e),s=await this.generateContent(r,e);s&&(s.includes("export enum ")?this.enumsMap.set(n,{fileName:n,content:s}):this.schemasMap.set(e,{fileName:n,content:s}))}}catch(e){throw console.error("解析过程出错:",e),e}}async handle(){await this.parseData(),await this.writeFile(),await this.writeEnums(),e.log.success("Component parse & write done!")}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../utils/index.js"),s=require("./core/components.js"),r=require("./core/get-data.js"),a=require("./core/path.js"),o=require("shelljs"),i=require("chalk"),n=require("path");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(e),p=c(i),u=c(n);let d;const h={saveTypeFolderPath:"development"===process.env.NODE_ENV?"apps/types":"src/api/types",saveApiListFolderPath:"development"===process.env.NODE_ENV?"apps/types":"src/api",saveEnumFolderPath:"development"===process.env.NODE_ENV?"apps/types/enums":"src/enums",importEnumPath:"../../../enums",requestMethodsImportPath:"./fetch",dataLevel:"serve",swaggerJsonUrl:"www.example.swagger.json.url",headers:{},formatting:{indentation:"\t",lineEnding:"\n"}};class f{schemas={};paths={};async handle(e){try{let t;if(t="development"===process.env.NODE_ENV?(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"),s=require("./core/components.js"),r=require("./core/get-data.js"),a=require("./core/path.js"),o=require("shelljs"),i=require("chalk"),n=require("path");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(e),p=c(i),u=c(n);let d;const h={saveTypeFolderPath:"development"===process.env.NODE_ENV?"apps/types":"src/api/types",saveApiListFolderPath:"development"===process.env.NODE_ENV?"apps/types":"src/api",saveEnumFolderPath:"development"===process.env.NODE_ENV?"apps/types/enums":"src/enums",importEnumPath:"../../../enums",requestMethodsImportPath:"./fetch",dataLevel:"serve",swaggerJsonUrl:"www.example.swagger.json.url",headers:{},formatting:{indentation:"\t",lineEnding:"\n"}};class f{schemas={};paths={};async handle(e){try{let t;if(t="development"===process.env.NODE_ENV?(await Promise.resolve().then((function(){return require("../../data/umf.json.js")}))).default:await r.getSwaggerJson(e),!t)throw new Error("无法获取 Swagger 数据");this.schemas=t.components?.schemas||{},this.paths=t.paths||{};const o=new s.default(this.schemas,e),i=new a.PathParse(this.paths,e);return await Promise.all([o.handle(),i.handle()]),!0}catch(e){if(e instanceof Error)throw new Error(`处理 Swagger 数据失败: ${e.message}`);throw new Error("处理 Swagger 数据失败: 未知错误")}}async formatGeneratedFiles(e){const s=`npx prettier --write "${e.saveTypeFolderPath}/**/*.{ts,d.ts}"`;try{await l.default.promises.access(e.saveTypeFolderPath);const{stderr:r}=await new Promise(((e,t)=>{o.exec(s,((s,r,a)=>{s?t(s):e({stdout:r,stderr:a})}))}));if(r)throw new Error(r);t.log.success("文件格式化成功")}catch(e){console.log(""),t.log.error("格式化失败,请手动执行以下命令:"),console.log("$",p.default.yellow(s)),console.log("")}}async copyAjaxConfigFiles(e){try{const s=["config.ts","error-message.ts","fetch.ts"],r=u.default.join(__dirname,"..","..","ajax-config"),a=e;for(const e of s){const s=u.default.join(r,e),o=u.default.join(a,e);try{await l.default.promises.access(s);try{await l.default.promises.access(o),t.log.info(`${e} 已存在,跳过生成.`)}catch{await l.default.promises.copyFile(s,o),t.log.success(`${e} create done.`)}}catch(e){t.log.error(`源文件 ${s} 不存在`);continue}}}catch(e){return e}}async initialize(){const e=process.cwd()+"/an.config.json";try{const s=await this.getConfig(e);if(!d)return;await l.default.promises.mkdir(s.saveApiListFolderPath,{recursive:!0}),await this.copyAjaxConfigFiles(s.saveApiListFolderPath),await t.clearDir(s.saveTypeFolderPath),await t.clearDir(s.saveEnumFolderPath),await this.handle(s),await this.formatGeneratedFiles(s)}catch(e){const s=e instanceof Error?e.message:"未知错误";t.log.error(`初始化失败: ${s}`)}}async getConfig(e){try{const t=await l.default.promises.readFile(e,"utf8");return d=!0,JSON.parse(t)}catch(s){return d=!1,t.log.warning("配置文件不存在,将自动创建配置文件。"),await t.writeFileRecursive(e,JSON.stringify(h,null,2)),t.log.success("请查看项目根目录下的 an.config.json 文件"),h}}}if("development"===process.env.NODE_ENV){(new f).initialize()}exports.Main=f;
|
package/lib/src/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("chalk"),r=require("fs"),t=require("ora");require("path");var o=require("shelljs");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("chalk"),r=require("fs"),t=require("ora");require("path");var o=require("shelljs");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(e),n=s(r);const u={info:e=>console.log(l.default.dim(e)),error:e=>console.log(l.default.red(`❌ ${e}`)),success:e=>console.log(l.default.green(`🥂 ${e}`)),warning:e=>console.log(l.default.yellow(`❗️ ${e}`)),load:e=>console.log(l.default.dim(`🌐 ${e}`))},i=s(t).default(),a={stop:()=>i.stop(),error:e=>i.fail(`❌ ${l.default.red(e)}`),start:e=>{i.text=l.default.blue(e),i.start()},success:e=>{i.stopAndPersist({symbol:l.default.green("✔"),text:l.default.green(e)})}};exports.clearDir=function(e){return new Promise(((r,t)=>{try{o.exec(`rm -rf ${e}`),r(!0)}catch(e){console.error(e),t(!1)}}))},exports.isValidJSON=function(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch(e){return!1}},exports.log=u,exports.spinner=a,exports.writeFileRecursive=function(e,r){return new Promise(((t,o)=>{try{const s=e.substring(0,e.lastIndexOf("/"));n.default.mkdir(s,{recursive:!0},(s=>{if(s)return o(!1);n.default.writeFile(e,r,(function(e){if(e)return o(!1);t(!0)}))}))}catch(e){console.error(e),o(e)}}))};
|
package/package.json
CHANGED
package/lib/data/sau.json.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.1",t={title:"Core API",version:"v1"},s=[{url:""}],n={"/api/activity/servicevisit/{serviceVisitId}":{get:{tags:["Activity"],parameters:[{name:"serviceVisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"locale",in:"query",schema:{type:"string",default:"en_US"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ActivityResponseDTOIListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ActivityResponseDTOIListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ActivityResponseDTOIListServiceResponse"}}}}}}},"/AppPackages/{fileName}":{get:{tags:["AppPackages"],parameters:[{name:"fileName",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Success"}}}},"/AppPackages/upload":{post:{tags:["AppPackages"],requestBody:{content:{"multipart/form-data":{schema:{type:"object",properties:{File:{type:"string",format:"binary"}}},encoding:{File:{style:"form"}}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/DocumentDetailsDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/DocumentDetailsDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/DocumentDetailsDTOServiceResponse"}}}}}}},"/api/AppVersion":{get:{tags:["AppVersion"],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/StringServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/StringServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/StringServiceResponse"}}}}}}},"/api/attachment/referenceId/{referenceId}/referenceType/{referenceType}":{get:{tags:["Attachment"],parameters:[{name:"referenceId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"referenceType",in:"path",required:!0,schema:{$ref:"#/components/schemas/SCReferenceTypeEnum"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/AttachmentDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/AttachmentDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/AttachmentDTOListServiceResponse"}}}}}}},"/api/attachment/add":{post:{tags:["Attachment"],requestBody:{content:{"multipart/form-data":{schema:{type:"object",properties:{ReferenceID:{type:"integer",format:"int32"},ReferenceType:{$ref:"#/components/schemas/SCReferenceTypeEnum"},File:{type:"string",format:"binary"},FileName:{type:"string"}}},encoding:{ReferenceID:{style:"form"},ReferenceType:{style:"form"},File:{style:"form"},FileName:{style:"form"}}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/AttachmentDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/AttachmentDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/AttachmentDTOServiceResponse"}}}}}}},"/api/attachment/download/{filePath}":{get:{tags:["Attachment"],parameters:[{name:"filePath",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Success"}}}},"/api/attachment/remove/{attachmentId}":{post:{tags:["Attachment"],parameters:[{name:"attachmentId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"hardDelete",in:"query",schema:{type:"boolean"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}}}}}}},"/api/corrections/saveOwners":{post:{tags:["Corrections"],requestBody:{content:{"application/json-patch+json":{schema:{type:"array",items:{$ref:"#/components/schemas/SaveCorrectionOwnerRequestDTO"}}},"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/SaveCorrectionOwnerRequestDTO"}}},"text/json":{schema:{type:"array",items:{$ref:"#/components/schemas/SaveCorrectionOwnerRequestDTO"}}},"application/*+json":{schema:{type:"array",items:{$ref:"#/components/schemas/SaveCorrectionOwnerRequestDTO"}}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}}}}}}},"/api/lookup/paytypes":{get:{tags:["Lookup"],parameters:[{name:"locale",in:"query",schema:{type:"string",default:"en_US"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/PayTypeResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/PayTypeResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/PayTypeResponseDTOListServiceResponse"}}}}}}},"/api/motionstatus/transitions":{get:{tags:["MotionStatus"],parameters:[{name:"status",in:"query",schema:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"}},{name:"locationType",in:"query",schema:{$ref:"#/components/schemas/ScaLocationTypeEnum"}},{name:"productType",in:"query",schema:{$ref:"#/components/schemas/PersonaProductTypeEnum"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ServiceVisitMotionStatusDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ServiceVisitMotionStatusDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ServiceVisitMotionStatusDTOListServiceResponse"}}}}}}},"/api/motionstatus/change":{post:{tags:["MotionStatus"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/MotionStatusChangeRequestDTO"}},"application/json":{schema:{$ref:"#/components/schemas/MotionStatusChangeRequestDTO"}},"text/json":{schema:{$ref:"#/components/schemas/MotionStatusChangeRequestDTO"}},"application/*+json":{schema:{$ref:"#/components/schemas/MotionStatusChangeRequestDTO"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}}}}}}},"/api/parts/count/{serviceVisitId}":{get:{tags:["Parts"],parameters:[{name:"serviceVisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/Int32ServiceResponse"}}}}}}},"/api/parts/servicevisit/{serviceVisitId}":{get:{tags:["Parts"],parameters:[{name:"serviceVisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/PartInfoResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/PartInfoResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/PartInfoResponseDTOListServiceResponse"}}}}}}},"/api/parts/partpickrequest/{servicevisitId}":{get:{tags:["Parts"],parameters:[{name:"servicevisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/PartPickRequestResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/PartPickRequestResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/PartPickRequestResponseDTOListServiceResponse"}}}}}}},"/api/parts/requestpick":{post:{tags:["Parts"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/BatchPartPickRequest"}},"application/json":{schema:{$ref:"#/components/schemas/BatchPartPickRequest"}},"text/json":{schema:{$ref:"#/components/schemas/BatchPartPickRequest"}},"application/*+json":{schema:{$ref:"#/components/schemas/BatchPartPickRequest"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}}}}}}},"/STPCoreStaticFiles/{fileName}":{get:{tags:["Service.Touch.Point.Core.API"],parameters:[{name:"fileName",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Success"}}}},"/api/servicevisit/my":{post:{tags:["ServiceVisit"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/MyServiceVisitRequestDTO"}},"application/json":{schema:{$ref:"#/components/schemas/MyServiceVisitRequestDTO"}},"text/json":{schema:{$ref:"#/components/schemas/MyServiceVisitRequestDTO"}},"application/*+json":{schema:{$ref:"#/components/schemas/MyServiceVisitRequestDTO"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ServiceVisitResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ServiceVisitResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ServiceVisitResponseDTOListServiceResponse"}}}}}}},"/api/servicevisit/search":{get:{tags:["ServiceVisit"],parameters:[{name:"term",in:"query",schema:{type:"string"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/SVSearchResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/SVSearchResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/SVSearchResponseDTOListServiceResponse"}}}}}}},"/api/servicevisit/detail":{get:{tags:["ServiceVisit"],parameters:[{name:"serviceVisitId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ServiceVisitDetailResponseDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ServiceVisitDetailResponseDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ServiceVisitDetailResponseDTOServiceResponse"}}}}}}},"/api/servicevisit/warranty":{get:{tags:["ServiceVisit"],parameters:[{name:"serviceVisitId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/ServiceVisitWarrantyResponseDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/ServiceVisitWarrantyResponseDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/ServiceVisitWarrantyResponseDTOServiceResponse"}}}}}}},"/api/servicevisit/audittrail":{get:{tags:["ServiceVisit"],parameters:[{name:"serviceVisitId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/AuditTrailResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/AuditTrailResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/AuditTrailResponseDTOListServiceResponse"}}}}}}},"/api/servicevisit/tags":{get:{tags:["ServiceVisit"],parameters:[{name:"serviceVisitId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/EntityTagsResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/EntityTagsResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/EntityTagsResponseDTOListServiceResponse"}}}}}}},"/api/servicevisit/etc":{post:{tags:["ServiceVisit"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/ETCUpdateRequestDTO"}},"application/json":{schema:{$ref:"#/components/schemas/ETCUpdateRequestDTO"}},"text/json":{schema:{$ref:"#/components/schemas/ETCUpdateRequestDTO"}},"application/*+json":{schema:{$ref:"#/components/schemas/ETCUpdateRequestDTO"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}}}}}}},"/api/timetracker/recordtime":{post:{tags:["TimeTracker"],requestBody:{content:{"application/json-patch+json":{schema:{$ref:"#/components/schemas/RecordTimeRequestDTO"}},"application/json":{schema:{$ref:"#/components/schemas/RecordTimeRequestDTO"}},"text/json":{schema:{$ref:"#/components/schemas/RecordTimeRequestDTO"}},"application/*+json":{schema:{$ref:"#/components/schemas/RecordTimeRequestDTO"}}}},responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/BooleanServiceResponse"}}}}}}},"/api/timetracker/summary/userId/{userId}":{get:{tags:["TimeTracker"],parameters:[{name:"userId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"scaLocationId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}}}}}}},"/api/timetracker/summary/serviceVisitId/{serviceVisitId}":{get:{tags:["TimeTracker"],parameters:[{name:"serviceVisitId",in:"path",required:!0,schema:{type:"integer",format:"int32"}},{name:"scaLocationId",in:"query",schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TimeTrackerResponseDTOListServiceResponse"}}}}}}},"/api/trt/all":{get:{tags:["TRT"],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TrtDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TrtDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TrtDTOListServiceResponse"}}}}}}},"/api/trt/scaLocationId/{scaLocationId}":{get:{tags:["TRT"],parameters:[{name:"scaLocationId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TrtDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TrtDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TrtDTOServiceResponse"}}}}}}},"/api/trt/term":{get:{tags:["TRT"],parameters:[{name:"term",in:"query",schema:{type:"string"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/TrtSummaryDTOListServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/TrtSummaryDTOListServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/TrtSummaryDTOListServiceResponse"}}}}}}},"/api/user/userId/{userId}":{get:{tags:["User"],parameters:[{name:"userId",in:"path",required:!0,schema:{type:"integer",format:"int32"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}}}}}}},"/api/user/adUserName/{adUserName}":{get:{tags:["User"],parameters:[{name:"adUserName",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Success",content:{"text/plain":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}},"application/json":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}},"text/json":{schema:{$ref:"#/components/schemas/UserDTOServiceResponse"}}}}}}}},a={schemas:{ActivityCorrectionPartStatusEnum:{enum:[0,1,2,3,4,5,6,7],type:"integer",format:"int32"},ActivityResponseDTO:{type:"object",properties:{activityId:{type:"integer",format:"int32"},narrative:{type:"string",nullable:!0},activityStatus:{$ref:"#/components/schemas/ActivityStatusEnum"},activityCorrections:{type:"array",items:{$ref:"#/components/schemas/CorrectionResponseDTO"},nullable:!0}},additionalProperties:!1},ActivityResponseDTOIListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/ActivityResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ActivityStatusEnum:{enum:[1,2,3],type:"integer",format:"int32"},AdditionalAttributesDTO:{type:"object",properties:{translations:{type:"array",items:{$ref:"#/components/schemas/Translation"},nullable:!0}},additionalProperties:!1},AdditonalInformation:{type:"object",properties:{vatTaxNumber:{type:"string",nullable:!0},vatPercentage:{type:"number",format:"double"},barNumber:{type:"string",nullable:!0},epaid:{type:"string",nullable:!0},partWareHouseLocationAttributeID:{type:"integer",format:"int32",nullable:!0},fulfillmentLocationID:{type:"integer",format:"int32",nullable:!0},shipToAddressID:{type:"integer",format:"int32",nullable:!0}},additionalProperties:!1},AttachmentAdditionalAttributes:{type:"object",properties:{sourceReference:{type:"string",nullable:!0},displayName:{type:"string",nullable:!0},attachmentTags:{type:"array",items:{type:"string"},nullable:!0},producer:{type:"string",nullable:!0},clientId:{type:"string",nullable:!0},correlationId:{type:"string",nullable:!0},isCustomer:{type:"boolean"},proofOfPaymentAmount:{type:"string",nullable:!0}},additionalProperties:!1},AttachmentDTO:{type:"object",properties:{isValid:{type:"boolean",readOnly:!0},validationMessage:{type:"string",nullable:!0,readOnly:!0},validationMessages:{type:"array",items:{$ref:"#/components/schemas/ValidationMessage"},nullable:!0},brokenRules:{type:"object",additionalProperties:{type:"array",items:{type:"string"}},nullable:!0},id:{type:"integer",format:"int32"},createDate:{type:"string",format:"date-time"},isNew:{type:"boolean",readOnly:!0},isDirty:{type:"boolean"},createdByUserID:{type:"integer",format:"int32"},createByUserName:{type:"string",nullable:!0},enabled:{type:"boolean"},modifyByUserID:{type:"integer",format:"int32",nullable:!0},modifyByUserName:{type:"string",nullable:!0},modifyDate:{type:"string",format:"date-time",nullable:!0},attachmentID:{type:"integer",format:"int32"},filePath:{type:"string",nullable:!0},fileName:{type:"string",nullable:!0},referenceID:{type:"integer",format:"int32"},referenceType:{$ref:"#/components/schemas/SCReferenceTypeEnum"},isUploaded:{type:"boolean"},uploadFailureMessage:{type:"string",nullable:!0},thumbnailPath:{type:"string",nullable:!0},isActive:{type:"boolean"},storageType:{$ref:"#/components/schemas/AttachmentStorageTypeEnum"},additionalAttributes:{$ref:"#/components/schemas/AttachmentAdditionalAttributes"},uuid:{type:"string",nullable:!0},documentType:{$ref:"#/components/schemas/DocumentTypeEnum"},isVoid:{type:"boolean"}},additionalProperties:!1},AttachmentDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/AttachmentDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},AttachmentDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/AttachmentDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},AttachmentStorageTypeEnum:{enum:[1,2],type:"integer",format:"int32"},AuditTrailResponseDTO:{type:"object",properties:{description:{type:"string",nullable:!0},appName:{type:"string",nullable:!0},createByUserName:{type:"string",nullable:!0},createDate:{type:"string",format:"date-time",nullable:!0}},additionalProperties:!1},AuditTrailResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/AuditTrailResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},BatchPartPickRequest:{type:"object",properties:{activityCorectionPartIdList:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},inventoryLocationId:{type:"integer",format:"int32"},serviceVisitId:{type:"integer",format:"int32"}},additionalProperties:!1},BooleanServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"boolean"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},CorrectionOwnerResponseDTO:{type:"object",properties:{ownerID:{type:"integer",format:"int32"},ownerName:{type:"string",nullable:!0}},additionalProperties:!1},CorrectionResponseDTO:{type:"object",properties:{activityCorrectionId:{type:"integer",format:"int32"},correctionCode:{type:"string",nullable:!0},correctionDescription:{type:"string",nullable:!0},paytype:{$ref:"#/components/schemas/ServiceVisitContactPayerTypeEnum"},chargedHours:{type:"number",format:"double",nullable:!0},nonReportable:{type:"boolean",nullable:!0},isDiagnostic:{type:"boolean",nullable:!0},activityCorrectionOwners:{type:"array",items:{$ref:"#/components/schemas/CorrectionOwnerResponseDTO"},nullable:!0}},additionalProperties:!1},DocumentDetailsDTO:{type:"object",properties:{uuid:{type:"string",nullable:!0},name:{type:"string",nullable:!0},version:{type:"string",nullable:!0},type:{type:"string",nullable:!0},uploaded_at:{type:"string",nullable:!0},files:{type:"array",items:{$ref:"#/components/schemas/DocumentDetailsDTO"},nullable:!0}},additionalProperties:!1},DocumentDetailsDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/DocumentDetailsDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},DocumentTypeEnum:{enum:[1,2,3,4,5,6,7,8,9],type:"integer",format:"int32"},EntityTagsResponseDTO:{type:"object",properties:{tagName:{type:"string",nullable:!0}},additionalProperties:!1},EntityTagsResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/EntityTagsResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ETCUpdateRequestDTO:{type:"object",properties:{serviceVisitId:{type:"integer",format:"int32"},etc:{type:"string",format:"date-time"}},additionalProperties:!1},FRT:{type:"object",properties:{frtRate:{type:"number",format:"double",nullable:!0},frtRoadsterRate:{type:"number",format:"double",nullable:!0}},additionalProperties:!1},FRTValue:{type:"object",properties:{frtRate:{type:"number",format:"double",nullable:!0},frtRoadsterRate:{type:"number",format:"double",nullable:!0}},additionalProperties:!1},Int32ServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"integer",format:"int32"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},LocaleDTO:{type:"object",properties:{localeID:{type:"integer",format:"int32"},countryID:{type:"integer",format:"int32"},isDefault:{type:"boolean"},locale:{type:"string",nullable:!0}},additionalProperties:!1},LocationAdditionalAttributes:{type:"object",properties:{frtValues:{$ref:"#/components/schemas/FRT"},locationAddress:{$ref:"#/components/schemas/LocationAddress"},additonalInformation:{$ref:"#/components/schemas/AdditonalInformation"}},additionalProperties:!1},LocationAddress:{type:"object",properties:{addressLine1:{type:"string",nullable:!0},addressLine2:{type:"string",nullable:!0},city:{type:"string",nullable:!0},countryID:{type:"integer",format:"int32",nullable:!0},provinceID:{type:"integer",format:"int32",nullable:!0},countryCode:{type:"string",nullable:!0},province:{type:"string",nullable:!0},postalCode:{type:"string",nullable:!0},region:{type:"string",nullable:!0},latitude:{type:"string",nullable:!0},longitude:{type:"string",nullable:!0}},additionalProperties:!1},LocationDTO:{type:"object",properties:{locationID:{type:"integer",format:"int32"},locationAttributeID:{type:"integer",format:"int32"},locationTypeID:{$ref:"#/components/schemas/LocationMasterLocationTypeEnum"},locationName:{type:"string",nullable:!0},locationDescription:{type:"string",nullable:!0},entityID:{type:"integer",format:"int32",nullable:!0},entityName:{type:"string",nullable:!0},warehouseID:{type:"integer",format:"int32",nullable:!0},warehouseTypeID:{$ref:"#/components/schemas/LocationMasterWarehouseTypeEnum"},warehouseName:{type:"string",nullable:!0},supplierCode:{type:"string",nullable:!0},shipFromLocationID:{type:"integer",format:"int32"},additionalAttributes:{$ref:"#/components/schemas/LocationAdditionalAttributes"},trtAdditionalAttributes:{$ref:"#/components/schemas/TRTAdditionalAttributes"},behaviorBitMask:{type:"integer",format:"int32",nullable:!0},isExternalSupplier:{type:"boolean"},eta:{type:"string",nullable:!0},etaStatus:{type:"string",nullable:!0},preOrderEtaReferenceID:{type:"string",nullable:!0},ranking:{type:"integer",format:"int32"},isDefault:{type:"boolean"},isFulfillmentLocation:{type:"boolean",readOnly:!0},locationTerritoryName:{type:"string",nullable:!0}},additionalProperties:!1},LocationMasterLocationTypeEnum:{enum:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],type:"integer",format:"int32"},LocationMasterWarehouseTypeEnum:{enum:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],type:"integer",format:"int32"},Marketing:{type:"object",properties:{displayName:{type:"string",nullable:!0}},additionalProperties:!1},MotionStatusChangeRequestDTO:{type:"object",properties:{serviceVisitId:{type:"integer",format:"int32"},motionStatus:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"},serviceVisitDateTime:{type:"string",nullable:!0}},additionalProperties:!1},MyServiceVisitRequestDTO:{type:"object",properties:{scaLocationIDs:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},ownerIDs:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},customerIds:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},pageNumber:{type:"integer",format:"int32"},pageSize:{type:"integer",format:"int32"},searchCriteria:{type:"string",nullable:!0},sorts:{type:"array",items:{$ref:"#/components/schemas/VisitSortingDTO"},nullable:!0},fromDate:{type:"string",format:"date-time",nullable:!0},toDate:{type:"string",format:"date-time",nullable:!0}},additionalProperties:!1},PartInfoResponseDTO:{type:"object",properties:{activityCorrectionPartID:{type:"integer",format:"int32",nullable:!0},partNumber:{type:"string",nullable:!0},partDescription:{type:"string",nullable:!0},binLocation:{type:"string",nullable:!0},partStatus:{$ref:"#/components/schemas/ActivityCorrectionPartStatusEnum"},quantity:{type:"number",format:"double",nullable:!0},isDraftPart:{type:"boolean",nullable:!0}},additionalProperties:!1},PartInfoResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/PartInfoResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},PartPickRequestResponseDTO:{type:"object",properties:{requestDate:{type:"string",format:"date-time",nullable:!0},displayName:{type:"string",nullable:!0},activityCorrectionPartID:{type:"integer",format:"int32"}},additionalProperties:!1},PartPickRequestResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/PartPickRequestResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},PayTypeResponseDTO:{type:"object",properties:{payTypeID:{type:"integer",format:"int32"},description:{type:"string",nullable:!0}},additionalProperties:!1},PayTypeResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/PayTypeResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},PersonaProductTypeEnum:{enum:[0,1,2,3,4,6,7],type:"integer",format:"int32"},RecordTimeRequestDTO:{type:"object",properties:{referenceId:{type:"integer",format:"int32"},userId:{type:"integer",format:"int32"},trackerAction:{$ref:"#/components/schemas/TimeTrackerActionEnum"}},additionalProperties:!1},SaveCorrectionOwnerRequestDTO:{type:"object",properties:{activityCorrectionID:{type:"integer",format:"int32"},ownerID:{type:"integer",format:"int32"},enabled:{type:"boolean"}},additionalProperties:!1},ScaLocationTypeEnum:{enum:[1,2,3,4,5,6,7,8,30,31,32,33],type:"integer",format:"int32"},SCReferenceTypeEnum:{enum:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],type:"integer",format:"int32"},ServiceVisitContactPayerTypeEnum:{enum:[1,2],type:"integer",format:"int32"},ServiceVisitDetailResponseDTO:{type:"object",properties:{vin:{type:"string",nullable:!0},vehicleColor:{type:"string",nullable:!0},licensePlate:{type:"string",nullable:!0},serviceVisitId:{type:"integer",format:"int32"},modelCode:{type:"string",nullable:!0},etc:{type:"string",nullable:!0},serviceVisitDateTime:{type:"string",nullable:!0},serviceVisitNumber:{type:"string",nullable:!0},serviceVisitMotionStatus:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"},ownerId:{type:"integer",format:"int32",nullable:!0},ownerName:{type:"string",nullable:!0},scaLocationId:{type:"integer",format:"int32",nullable:!0}},additionalProperties:!1},ServiceVisitDetailResponseDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/ServiceVisitDetailResponseDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ServiceVisitMotionStatusDTO:{type:"object",properties:{isValid:{type:"boolean",readOnly:!0},validationMessage:{type:"string",nullable:!0,readOnly:!0},validationMessages:{type:"array",items:{$ref:"#/components/schemas/ValidationMessage"},nullable:!0},brokenRules:{type:"object",additionalProperties:{type:"array",items:{type:"string"}},nullable:!0},id:{type:"integer",format:"int32"},createDate:{type:"string",format:"date-time"},isNew:{type:"boolean",readOnly:!0},isDirty:{type:"boolean"},createdByUserID:{type:"integer",format:"int32"},createByUserName:{type:"string",nullable:!0},enabled:{type:"boolean"},modifyByUserID:{type:"integer",format:"int32",nullable:!0},modifyByUserName:{type:"string",nullable:!0},modifyDate:{type:"string",format:"date-time",nullable:!0},serviceVisitMotionStatusID:{type:"integer",format:"int32"},description:{type:"string",nullable:!0},descriptionLocalized:{type:"string",nullable:!0},parentId:{type:"integer",format:"int32"},disabled:{type:"boolean"},parentDescription:{type:"string",nullable:!0},parentDescriptionLocalized:{type:"string",nullable:!0},additionalAttributes:{$ref:"#/components/schemas/AdditionalAttributesDTO"},displayOrder:{type:"number",format:"double"},transitionAdditionalAttributes:{$ref:"#/components/schemas/TransitionAdditionalAttributesDTO"}},additionalProperties:!1},ServiceVisitMotionStatusDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/ServiceVisitMotionStatusDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ServiceVisitMotionStatusEnum:{enum:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,73,74,75],type:"integer",format:"int32"},ServiceVisitResponseDTO:{type:"object",properties:{vin:{type:"string",nullable:!0},vehicleColor:{type:"string",nullable:!0},licensePlate:{type:"string",nullable:!0},serviceVisitId:{type:"integer",format:"int32"},customerName:{type:"string",nullable:!0},modelCode:{type:"string",nullable:!0},ownerId:{type:"integer",format:"int32",nullable:!0},ownerName:{type:"string",nullable:!0},etc:{type:"string",nullable:!0},serviceVisitDateTime:{type:"string",nullable:!0},serviceVisitNumber:{type:"string",nullable:!0},serviceVisitMotionStatus:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"}},additionalProperties:!1},ServiceVisitResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/ServiceVisitResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},ServiceVisitStatusEnum:{enum:[1,2,3],type:"integer",format:"int32"},ServiceVisitWarrantyResponseDTO:{type:"object",properties:{newVehicleWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},usedVehicleWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},batteryWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},driveUnitWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},wearingPartsLevel1Warranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},wearingPartsLevel2Warranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},vehicleESA:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},maintenancePackageWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},tiresPackageWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},extendedWarrantyInsurance:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},srsWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"},bodyRustWarranty:{$ref:"#/components/schemas/WarrantyDetailItemDTO"}},additionalProperties:!1},ServiceVisitWarrantyResponseDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/ServiceVisitWarrantyResponseDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},StringServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"string",nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},SVSearchResponseDTO:{type:"object",properties:{vin:{type:"string",nullable:!0},vehicleColor:{type:"string",nullable:!0},licensePlate:{type:"string",nullable:!0},serviceVisitId:{type:"integer",format:"int32"},ownerId:{type:"integer",format:"int32",nullable:!0},ownerName:{type:"string",nullable:!0},serviceVisitNumber:{type:"string",nullable:!0},serviceVisitMotionStatus:{$ref:"#/components/schemas/ServiceVisitMotionStatusEnum"},serviceVisitStatus:{$ref:"#/components/schemas/ServiceVisitStatusEnum"}},additionalProperties:!1},SVSearchResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/SVSearchResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},TimeTrackerActionEnum:{enum:[1,2],type:"integer",format:"int32"},TimeTrackerDetailDTO:{type:"object",properties:{punchInDate:{type:"string",format:"date-time"},punchOutDate:{type:"string",format:"date-time",nullable:!0}},additionalProperties:!1},TimeTrackerResponseDTO:{type:"object",properties:{userId:{type:"integer",format:"int32"},userName:{type:"string",nullable:!0},totalHours:{type:"number",format:"double"},serviceVisitNumber:{type:"string",nullable:!0},serviceVisitId:{type:"integer",format:"int32"},punchingIn:{type:"boolean"},timeTrackerDetail:{type:"array",items:{$ref:"#/components/schemas/TimeTrackerDetailDTO"},nullable:!0}},additionalProperties:!1},TimeTrackerResponseDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/TimeTrackerResponseDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},TransitionAdditionalAttributesDTO:{type:"object",properties:{manangerLevelRequired:{type:"boolean"}},additionalProperties:!1},Translation:{type:"object",properties:{locale:{type:"string",nullable:!0},description:{type:"string",nullable:!0},searchTerms:{type:"string",nullable:!0}},additionalProperties:!1},TRTAdditionalAttributes:{type:"object",properties:{frtValues:{$ref:"#/components/schemas/FRTValue"},trtAddress:{$ref:"#/components/schemas/TRTAddress"},additonalInformation:{$ref:"#/components/schemas/TRTAdditonalInformation"},trtCommunication:{$ref:"#/components/schemas/TRTCommunication"},marketing:{$ref:"#/components/schemas/Marketing"},trtAttributes:{type:"array",items:{$ref:"#/components/schemas/TRTAttribute"},nullable:!0}},additionalProperties:!1},TRTAdditonalInformation:{type:"object",properties:{vatTaxNumber:{type:"string",nullable:!0},vatPercentage:{type:"number",format:"double"},barNumber:{type:"string",nullable:!0},epaid:{type:"string",nullable:!0},weekDayWorkHours:{type:"string",nullable:!0},weekEndWorkHours:{type:"string",nullable:!0},storeHours:{type:"string",nullable:!0},maintenanceManagerName:{type:"string",nullable:!0},companyRegistrationNumber:{type:"string",nullable:!0},facilityId:{type:"string",nullable:!0},serviceManagerUserId:{type:"string",nullable:!0},serviceManagerWarpUserID:{type:"string",nullable:!0},parentTRTId:{type:"integer",format:"int32",nullable:!0},companyRegistrationName:{type:"string",nullable:!0},towIn:{type:"boolean",nullable:!0},afterHoursDrop:{type:"boolean",nullable:!0},serviceCenterRoadsideRules:{type:"string",nullable:!0},tiresTowsOrLoanerWheels:{type:"boolean",nullable:!0},functionType:{type:"string",nullable:!0},carPassLocationId:{type:"string",nullable:!0}},additionalProperties:!1},TRTAddress:{type:"object",properties:{addressLine1:{type:"string",nullable:!0},addressLine2:{type:"string",nullable:!0},city:{type:"string",nullable:!0},countryID:{type:"integer",format:"int32",nullable:!0},provinceID:{type:"integer",format:"int32",nullable:!0},countryCode:{type:"string",nullable:!0},province:{type:"string",nullable:!0},postalCode:{type:"string",nullable:!0},region:{type:"string",nullable:!0},latitude:{type:"string",nullable:!0},longitude:{type:"string",nullable:!0},state:{type:"string",nullable:!0}},additionalProperties:!1},TRTAttribute:{type:"object",properties:{name:{type:"string",nullable:!0}},additionalProperties:!1},TRTCommunication:{type:"object",properties:{email:{type:"string",nullable:!0},phoneNumber1:{type:"string",nullable:!0},phoneNumber2:{type:"string",nullable:!0},fax:{type:"string",nullable:!0},preferredLanguage:{type:"string",nullable:!0}},additionalProperties:!1},TrtDTO:{type:"object",properties:{isValid:{type:"boolean",readOnly:!0},validationMessage:{type:"string",nullable:!0,readOnly:!0},validationMessages:{type:"array",items:{$ref:"#/components/schemas/ValidationMessage"},nullable:!0},brokenRules:{type:"object",additionalProperties:{type:"array",items:{type:"string"}},nullable:!0},id:{type:"integer",format:"int32"},createDate:{type:"string",format:"date-time"},isNew:{type:"boolean",readOnly:!0},isDirty:{type:"boolean"},createdByUserID:{type:"integer",format:"int32"},createByUserName:{type:"string",nullable:!0},modifyByUserID:{type:"integer",format:"int32",nullable:!0},modifyByUserName:{type:"string",nullable:!0},modifyDate:{type:"string",format:"date-time",nullable:!0},scaLocationID:{type:"integer",format:"int32"},inventoryLocationID:{type:"integer",format:"int32",nullable:!0},trtid:{type:"integer",format:"int32",nullable:!0},scaLocationTypeID:{type:"integer",format:"int32",nullable:!0},name:{type:"string",nullable:!0},description:{type:"string",nullable:!0},timeZoneID:{type:"integer",format:"int32",nullable:!0},timeZoneName:{type:"string",nullable:!0},timeZoneNameDescription:{type:"string",nullable:!0},dotNetTimeZone:{type:"string",nullable:!0},ianaTimeZone:{type:"string",nullable:!0},utcOffsetMinutes:{type:"integer",format:"int32",nullable:!0},dlSavingUTCOffsetMinutes:{type:"integer",format:"int32",nullable:!0},isDayLightSaving:{type:"boolean",nullable:!0},inventoryLocation:{$ref:"#/components/schemas/LocationDTO"},isSCAEnabled:{type:"boolean"},currencyCode:{type:"string",nullable:!0},behaviorBitMask:{type:"integer",format:"int32",nullable:!0},locationTerritoryName:{type:"string",nullable:!0},additionalAttributes:{$ref:"#/components/schemas/TRTAdditionalAttributes"},locationAdditionalAttributes:{$ref:"#/components/schemas/LocationAdditionalAttributes"},locales:{type:"array",items:{$ref:"#/components/schemas/LocaleDTO"},nullable:!0},enabled:{type:"boolean"},referenceID:{type:"integer",format:"int32"},warehouseID:{type:"integer",format:"int32",nullable:!0},warehouseName:{type:"string",nullable:!0},territoryID:{type:"integer",format:"int32",nullable:!0},functionID:{type:"integer",format:"int32",nullable:!0}},additionalProperties:!1},TrtDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/TrtDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},TrtDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/TrtDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},TrtSummaryDTO:{type:"object",properties:{trtid:{type:"integer",format:"int32"},scaLocationID:{type:"integer",format:"int32"},functionID:{type:"integer",format:"int32",nullable:!0},inventoryLocationID:{type:"integer",format:"int32"},scaLocationTypeID:{type:"integer",format:"int32",nullable:!0},description:{type:"string",nullable:!0},utcOffsetMinutes:{type:"integer",format:"int32",nullable:!0},dlSavingUTCOffsetMinutes:{type:"integer",format:"int32",nullable:!0},isDayLightSaving:{type:"boolean",nullable:!0}},additionalProperties:!1},TrtSummaryDTOListServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{type:"array",items:{$ref:"#/components/schemas/TrtSummaryDTO"},nullable:!0},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},UserDTO:{type:"object",properties:{userID:{type:"integer",format:"int32"},warpUserID:{type:"integer",format:"int32"},adUsername:{type:"string",nullable:!0},visualUsername:{type:"string",nullable:!0},enabled:{type:"boolean"},firstName:{type:"string",nullable:!0},lastName:{type:"string",nullable:!0},displayName:{type:"string",nullable:!0},title:{type:"string",nullable:!0},email:{type:"string",nullable:!0},manager:{type:"string",nullable:!0},managerUserID:{type:"integer",format:"int32",nullable:!0},managementLevel:{type:"string",nullable:!0},managementLevelRank:{type:"integer",format:"int32"},employeeId:{type:"string",nullable:!0},source:{type:"integer",format:"int32"},permissions:{type:"array",items:{type:"string"},nullable:!0},userPreferences:{$ref:"#/components/schemas/UserPreferenceDTO"}},additionalProperties:!1},UserDTOServiceResponse:{type:"object",properties:{success:{type:"boolean"},message:{type:"string",nullable:!0},messageCode:{type:"string",nullable:!0},responseObject:{$ref:"#/components/schemas/UserDTO"},warning:{type:"string",nullable:!0,readOnly:!0}},additionalProperties:!1},UserPreferenceAttributes:{type:"object",properties:{hasCurrentReleaseVersion:{type:"boolean"},delegationEnabled:{type:"boolean"},delegatedUserId:{type:"integer",format:"int32"},printerSettings:{$ref:"#/components/schemas/UserPrinterSettings"},taskQueueAssignee:{type:"array",items:{type:"integer",format:"int32"},nullable:!0},pickRequestSubscription:{type:"array",items:{type:"integer",format:"int32"},nullable:!0}},additionalProperties:!1},UserPreferenceDTO:{type:"object",properties:{userPreferenceID:{type:"integer",format:"int32"},userID:{type:"integer",format:"int32"},attributes:{$ref:"#/components/schemas/UserPreferenceAttributes"},createdByUserId:{type:"integer",format:"int32"},modifyDate:{type:"string",format:"date-time",nullable:!0},modifyByUserID:{type:"integer",format:"int32"}},additionalProperties:!1},UserPrinterSettings:{type:"object",properties:{ipAddress:{type:"string",nullable:!0}},additionalProperties:!1},ValidationMessage:{type:"object",properties:{attemptedValue:{nullable:!0},category:{$ref:"#/components/schemas/ValidationMessageCategoriesEnum"},message:{type:"string",nullable:!0},propertyName:{type:"string",nullable:!0}},additionalProperties:!1},ValidationMessageCategoriesEnum:{enum:[0,1,2,3],type:"integer",format:"int32"},VisitSortDirectionEnum:{enum:[1,2],type:"integer",format:"int32"},VisitSortingDTO:{type:"object",properties:{field:{$ref:"#/components/schemas/VisitSortTypeEnum"},direction:{$ref:"#/components/schemas/VisitSortDirectionEnum"}},additionalProperties:!1},VisitSortTypeEnum:{enum:[1,2,3,4,5,6],type:"integer",format:"int32"},WarrantyDetailItemDTO:{type:"object",properties:{warrantyType:{type:"string",nullable:!0},status:{type:"string",nullable:!0},startDate:{type:"string",format:"date-time",nullable:!0},endDate:{type:"string",format:"date-time",nullable:!0},startMileage:{type:"string",nullable:!0},endMileage:{type:"string",nullable:!0},warrantyMileageType:{type:"string",nullable:!0}},additionalProperties:!1}},securitySchemes:{Bearer:{type:"apiKey",description:"Authorization header using the Bearer scheme",name:"Authorization",in:"header"}}},r=[{Bearer:[]}],i={openapi:e,info:t,servers:s,paths:n,components:a,security:r};exports.components=a,exports.default=i,exports.info=t,exports.openapi=e,exports.paths=n,exports.security=r,exports.servers=s;
|