anl 1.4.6 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.3",t={title:"Swagger Petstore - OpenAPI 3.0",description:"This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\n_If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)",termsOfService:"http://swagger.io/terms/",contact:{email:"apiteam@swagger.io"},license:{name:"Apache 2.0",url:"http://www.apache.org/licenses/LICENSE-2.0.html"},version:"1.0.11"},s={description:"Find out more about Swagger",url:"http://swagger.io"},r=[{url:"https://petstore3.swagger.io/api/v3"}],a=[{name:"pet",description:"Everything about your Pets",externalDocs:{description:"Find out more",url:"http://swagger.io"}},{name:"store",description:"Access to Petstore orders",externalDocs:{description:"Find out more about our store",url:"http://swagger.io"}},{name:"user",description:"Operations about user"}],o={"/pet":{put:{tags:["pet"],summary:"Update an existing pet",description:"Update an existing pet by Id",operationId:"updatePet",requestBody:{description:"Update an existent pet in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Pet"}}},required:!0},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid ID supplied"},404:{description:"Pet not found"},422:{description:"Validation exception"}},security:[{petstore_auth:["write:pets","read:pets"]}]},post:{tags:["pet"],summary:"Add a new pet to the store",description:"Add a new pet to the store",operationId:"addPet",requestBody:{description:"Create a new pet in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Pet"}}},required:!0},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid input"},422:{description:"Validation exception"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/findByStatus":{get:{tags:["pet"],summary:"Finds Pets by status",description:"Multiple status values can be provided with comma separated strings",operationId:"findPetsByStatus",parameters:[{name:"status",in:"query",description:"Status values that need to be considered for filter",required:!1,explode:!0,schema:{type:"string",default:"available",enum:["available","pending","sold"]}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid status value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/findByTags":{get:{tags:["pet"],summary:"Finds Pets by tags",description:"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",operationId:"findPetsByTags",parameters:[{name:"tags",in:"query",description:"Tags to filter by",required:!1,explode:!0,schema:{type:"array",items:{type:"string"}}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid tag value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/{petId}":{get:{tags:["pet"],summary:"Find pet by ID",description:"Returns a single pet",operationId:"getPetById",parameters:[{name:"petId",in:"path",description:"ID of pet to return",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid ID supplied"},404:{description:"Pet not found"}},security:[{api_key:[]},{petstore_auth:["write:pets","read:pets"]}]},post:{tags:["pet"],summary:"Updates a pet in the store with form data",description:"",operationId:"updatePetWithForm",parameters:[{name:"petId",in:"path",description:"ID of pet that needs to be updated",required:!0,schema:{type:"integer",format:"int64"}},{name:"name",in:"query",description:"Name of pet that needs to be updated",schema:{type:"string"}},{name:"status",in:"query",description:"Status of pet that needs to be updated",schema:{type:"string"}}],responses:{400:{description:"Invalid input"}},security:[{petstore_auth:["write:pets","read:pets"]}]},delete:{tags:["pet"],summary:"Deletes a pet",description:"delete a pet",operationId:"deletePet",parameters:[{name:"api_key",in:"header",description:"",required:!1,schema:{type:"string"}},{name:"petId",in:"path",description:"Pet id to delete",required:!0,schema:{type:"integer",format:"int64"}}],responses:{400:{description:"Invalid pet value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/{petId}/uploadImage":{post:{tags:["pet"],summary:"uploads an image",description:"",operationId:"uploadFile",parameters:[{name:"petId",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}},{name:"additionalMetadata",in:"query",description:"Additional Metadata",required:!1,schema:{type:"string"}}],requestBody:{content:{"application/octet-stream":{schema:{type:"string",format:"binary"}}}},responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/ApiResponse"}}}}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/store/inventory":{get:{tags:["store"],summary:"Returns pet inventories by status",description:"Returns a map of status codes to quantities",operationId:"getInventory",responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"object",additionalProperties:{type:"integer",format:"int32"}}}}}},security:[{api_key:[]}]}},"/store/order":{post:{tags:["store"],summary:"Place an order for a pet",description:"Place a new order in the store",operationId:"placeOrder",requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Order"}}}},responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid input"},422:{description:"Validation exception"}}}},"/store/order/{orderId}":{get:{tags:["store"],summary:"Find purchase order by ID",description:"For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.",operationId:"getOrderById",parameters:[{name:"orderId",in:"path",description:"ID of order that needs to be fetched",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}},delete:{tags:["store"],summary:"Delete purchase order by ID",description:"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",operationId:"deleteOrder",parameters:[{name:"orderId",in:"path",description:"ID of the order that needs to be deleted",required:!0,schema:{type:"integer",format:"int64"}}],responses:{400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}}},"/user":{post:{tags:["user"],summary:"Create user",description:"This can only be done by the logged in user.",operationId:"createUser",requestBody:{description:"Created user object",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/User"}}}},responses:{default:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}}}}},"/user/createWithList":{post:{tags:["user"],summary:"Creates list of users with given input array",description:"Creates list of users with given input array",operationId:"createUsersWithListInput",requestBody:{content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/User"}}}}},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}},default:{description:"successful operation"}}}},"/user/login":{get:{tags:["user"],summary:"Logs user into the system",description:"",operationId:"loginUser",parameters:[{name:"username",in:"query",description:"The user name for login",required:!1,schema:{type:"string"}},{name:"password",in:"query",description:"The password for login in clear text",required:!1,schema:{type:"string"}}],responses:{200:{description:"successful operation",headers:{"X-Rate-Limit":{description:"calls per hour allowed by the user",schema:{type:"integer",format:"int32"}},"X-Expires-After":{description:"date in UTC when token expires",schema:{type:"string",format:"date-time"}}},content:{"application/xml":{schema:{type:"string"}},"application/json":{schema:{type:"string"}}}},400:{description:"Invalid username/password supplied"}}}},"/user/logout":{get:{tags:["user"],summary:"Logs out current logged in user session",description:"",operationId:"logoutUser",parameters:[],responses:{default:{description:"successful operation"}}}},"/user/{username}":{get:{tags:["user"],summary:"Get user by user name",description:"",operationId:"getUserByName",parameters:[{name:"username",in:"path",description:"The name that needs to be fetched. Use user1 for testing. ",required:!0,schema:{type:"string"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}},400:{description:"Invalid username supplied"},404:{description:"User not found"}}},put:{tags:["user"],summary:"Update user",description:"This can only be done by the logged in user.",operationId:"updateUser",parameters:[{name:"username",in:"path",description:"name that need to be deleted",required:!0,schema:{type:"string"}}],requestBody:{description:"Update an existent user in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/User"}}}},responses:{default:{description:"successful operation"}}},delete:{tags:["user"],summary:"Delete user",description:"This can only be done by the logged in user.",operationId:"deleteUser",parameters:[{name:"username",in:"path",description:"The name that needs to be deleted",required:!0,schema:{type:"string"}}],responses:{400:{description:"Invalid username supplied"},404:{description:"User not found"}}}}},n={schemas:{Order:{type:"object",properties:{id:{type:"integer",format:"int64",example:10},petId:{type:"integer",format:"int64",example:198772},quantity:{type:"integer",format:"int32",example:7},shipDate:{type:"string",format:"date-time"},status:{type:"string",description:"Order Status",example:"approved",enum:["placed","approved","delivered"]},complete:{type:"boolean"}},xml:{name:"order"}},Customer:{type:"object",properties:{id:{type:"integer",format:"int64",example:1e5},username:{type:"string",example:"fehguy"},address:{type:"array",xml:{name:"addresses",wrapped:!0},items:{$ref:"#/components/schemas/Address"}}},xml:{name:"customer"}},Address:{type:"object",properties:{street:{type:"string",example:"437 Lytton"},city:{type:"string",example:"Palo Alto"},state:{type:"string",example:"CA"},zip:{type:"string",example:"94301"}},xml:{name:"address"}},Category:{type:"object",properties:{id:{type:"integer",format:"int64",example:1},name:{type:"string",example:"Dogs"}},xml:{name:"category"}},User:{type:"object",properties:{id:{type:"integer",format:"int64",example:10},username:{type:"string",example:"theUser"},firstName:{type:"string",example:"John"},lastName:{type:"string",example:"James"},email:{type:"string",example:"john@email.com"},password:{type:"string",example:"12345"},phone:{type:"string",example:"12345"},userStatus:{type:"integer",description:"User Status",format:"int32",example:1}},xml:{name:"user"}},Tag:{type:"object",properties:{id:{type:"integer",format:"int64"},name:{type:"string"}},xml:{name:"tag"}},Pet:{required:["name","photoUrls"],type:"object",properties:{id:{type:"integer",format:"int64",example:10},name:{type:"string",example:"doggie"},category:{$ref:"#/components/schemas/Category"},photoUrls:{type:"array",xml:{wrapped:!0},items:{type:"string",xml:{name:"photoUrl"}}},tags:{type:"array",xml:{wrapped:!0},items:{$ref:"#/components/schemas/Tag"}},status:{type:"string",description:"pet status in the store",enum:["available","pending","sold"]}},xml:{name:"pet"}},ApiResponse:{type:"object",properties:{code:{type:"integer",format:"int32"},type:{type:"string"},message:{type:"string"}},xml:{name:"##default"}}},requestBodies:{Pet:{description:"Pet object that needs to be added to the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},UserArray:{description:"List of user object",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/User"}}}}}},securitySchemes:{petstore_auth:{type:"oauth2",flows:{implicit:{authorizationUrl:"https://petstore3.swagger.io/oauth/authorize",scopes:{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},api_key:{type:"apiKey",name:"api_key",in:"header"}}},i={openapi:e,info:t,externalDocs:s,servers:r,tags:a,paths:o,components:n};exports.components=n,exports.default=i,exports.externalDocs=s,exports.info=t,exports.openapi=e,exports.paths=o,exports.servers=r,exports.tags=a;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.4.6",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
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.4.7",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 t="\t";exports.default=class{config;schemas={};enumsMap=new Map;schemasMap=new Map;defaultReturn={headerRef:"",renderStr:"",comment:"",typeName:""};requiredFieldS=[];constructor(e,t){this.schemas=e,this.config=t}nullable(e){return""+(e?" | null":"")}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/",""),r={typeName:t,fileName:this.typeNameToFileName(t),dataType:""};if(this.schemas){const e=this.schemas[t];e.enum?r.dataType="enum":r.dataType=e.type}return r}parseRef(e){if(!e?.trim())return{headerRefStr:"",typeName:""};const{fileName:t,typeName:r,dataType:n}=this.nameTheHumpCenterStroke(e);let s;return s="enum"===n?`import type { ${r} } from '${this.config.importEnumPath}';`:`import type { ${r} } from './${t}';`,{headerRefStr:s,typeName:r}}parseObject(e,r){let n="",s="";if("object"===e.type){const i=e;if("object"==typeof i.additionalProperties){const e=this.parseArray(i.additionalProperties,r)??this.defaultReturn;n=e?.headerRef??"",s=e?.renderStr??""}else s=`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: ${e.type}${this.nullable(e.nullable)};`}return{headerRef:n,renderStr:s}}parseArray(e,r){const n=e,{items:s={},nullable:i}=n,a=s?.$ref;if(a){const{headerRefStr:e,typeName:n}=this.parseRef(a);return{headerRef:e,renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: Array<${n}>${this.nullable(i)};`,typeName:n}}const l=s?.type,o="integer"===l?"number":l;return{headerRef:"",renderStr:`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: Array<${o}>${this.nullable(i)};`,typeName:o}}parseBoolean(e,r){return"boolean"===e.type?`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: boolean${this.nullable(e.nullable)};`:""}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}${this.requiredFieldS.includes(r)?"":"?"}: number${this.nullable(e.nullable)};`}parseNumber(e,r){return"number"===e.type?`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: number${this.nullable(e.nullable)};`:""}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("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}${this.requiredFieldS.includes(n)?"":"?"}: ${s}${this.nullable(r.nullable)};`,comment:e}}{const e=this.typeNameToFileName(s),t=this.parseEnum(r,s);if(t)return this.enumsMap.set(e,{fileName:e,content:t.renderStr}),{headerRef:"",renderStr:""}}}return{headerRef:"",renderStr:`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: string${this.nullable(r.nullable)};`}}return null}parseProperties(r,n){const s=[],i=[];for(const a in r){const l=r[a];if(l?.$ref){const{headerRefStr:e,typeName:r}=this.parseRef(l.$ref);i.includes(e)||i.push(e),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${r};`);continue}if("allOf"in l){const e=l.allOf?.[0];if(e?.$ref){const{headerRefStr:r,typeName:n}=this.parseRef(e.$ref);i.includes(r)||i.push(r),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${n}${this.nullable(l.nullable)};`);continue}}const o=l,u=this.fieldComment(o);switch(""!==u&&s.push(u),o.type){case"array":{const e=this.parseArray(o,a)??this.defaultReturn;s.push(e?.renderStr??""),i.includes(e.headerRef)||n===e.typeName||i.push(e.headerRef)}break;case"boolean":s.push(this.parseBoolean(o,a));break;case"integer":s.push(this.parseInteger(o,a));break;case"number":s.push(this.parseNumber(o,a));break;case"string":if(o.enum){const r=a.charAt(0).toUpperCase()+a.slice(1);if(e.isValidJSON(o.example)){const e=`import type { ${r} } from '${this.config.importEnumPath}';`;i.includes(e)||i.push(e);const n=this.typeNameToFileName(r),l=this.convertJsonToEnumString(o.example,r);this.enumsMap.set(n,{fileName:n,content:l}),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${r}${this.nullable(o.nullable)};`)}else{const e=this.parseEnum(o,r);if(e?.renderStr){const n=`import type { ${r} } from '${this.config.importEnumPath}';`;i.includes(n)||i.push(n);const l=this.typeNameToFileName(r);this.enumsMap.set(l,{fileName:l,content:e.renderStr}),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${r}${this.nullable(o.nullable)};`)}}}else s.push(this.parseString(o,a)?.renderStr??"");break;case"object":{const{headerRef:e,renderStr:t}=this.parseObject(o,a)??this.defaultReturn;s.push(t),i.includes(e)||i.push(e)}}}const a=[`export interface ${n} {`,...s,"}"];if(i.length>0){const e=i.filter((e=>""!==e));e.length>0&&e.push(""),a.unshift(...e)}const l=a.join("\n");return{headerRef:i.join("\n"),renderStr:l}}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 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}this.requiredFieldS=t.required??[];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 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 i=async({fileName:t,content:s})=>{r.push(`export * from './${t}';`),await e.writeFileRecursive(`${n}${t}.ts`,s)};t.push(i(s))}await Promise.all(t),await e.writeFileRecursive(`${n}index.ts`,r.join("\n"))}async handle(){await this.parseData(),await this.writeFile(),await this.writeEnums(),e.log.success("Component parse & write done!")}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const t="\t";exports.default=class{config;schemas={};enumsMap=new Map;schemasMap=new Map;defaultReturn={headerRef:"",renderStr:"",comment:"",typeName:""};requiredFieldS=[];constructor(e,t){this.schemas=e,this.config=t}nullable(e){return""+(e?" | null":"")}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/",""),r={typeName:t,fileName:this.typeNameToFileName(t),dataType:""};if(this.schemas){const e=this.schemas[t];e.enum?r.dataType="enum":r.dataType=e.type}return r}parseRef(e){if(!e?.trim())return{headerRefStr:"",typeName:"",dataType:""};const{fileName:t,typeName:r,dataType:n=""}=this.nameTheHumpCenterStroke(e);let s;return s="enum"===n?`import type { ${r} } from '${this.config.importEnumPath}';`:`import type { ${r} } from './${t}';`,{headerRefStr:s,typeName:r,dataType:n}}parseObject(e,r){let n="",s="";if("object"===e.type){const i=e;if("object"==typeof i.additionalProperties){const e=this.parseArray(i.additionalProperties,r)??this.defaultReturn;n=e?.headerRef??"",s=e?.renderStr??""}else s=`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: ${e.type}${this.nullable(e.nullable)};`}return{headerRef:n,renderStr:s}}parseArray(r,n){const s=r,{items:i={},nullable:a,example:o}=s,l=i?.$ref;if(l){const{headerRefStr:r,typeName:s,dataType:i}=this.parseRef(l);if("enum"===i&&e.isValidJSON(o)){const e=this.typeNameToFileName(s),t=this.convertJsonToEnumString(o,s);this.enumsMap.set(e,{fileName:e,content:t})}return{headerRef:r,renderStr:`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: Array<${s}>${this.nullable(a)};`,typeName:s}}const u=i?.type,c="integer"===u?"number":u;return{headerRef:"",renderStr:`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: Array<${c}>${this.nullable(a)};`,typeName:c}}parseBoolean(e,r){return"boolean"===e.type?`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: boolean${this.nullable(e.nullable)};`:""}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}${this.requiredFieldS.includes(r)?"":"?"}: number${this.nullable(e.nullable)};`}parseNumber(e,r){return"number"===e.type?`${t}${r}${this.requiredFieldS.includes(r)?"":"?"}: number${this.nullable(e.nullable)};`:""}convertJsonToEnumString(e,r){try{const n=JSON.parse(e);return`export enum ${r} {\n${Object.entries(n).map((([e,r])=>`${t}${e} = '${r}'`)).join(",\n")}\n}`}catch(e){return console.error("JSON 解析失败:",e),""}}parseString(r,n){if("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}${this.requiredFieldS.includes(n)?"":"?"}: ${s}${this.nullable(r.nullable)};`,comment:e}}{const e=this.typeNameToFileName(s),t=this.parseEnum(r,s);if(t&&!this.enumsMap.has(e))return this.enumsMap.set(e,{fileName:e,content:t.renderStr}),{headerRef:"",renderStr:""}}}return{headerRef:"",renderStr:`${t}${n}${this.requiredFieldS.includes(n)?"":"?"}: string${this.nullable(r.nullable)};`}}return null}parseProperties(r,n){const s=[],i=[];for(const a in r){const o=r[a];if(o?.$ref){const{headerRefStr:r,typeName:n,dataType:l}=this.parseRef(o.$ref);i.includes(r)||i.push(r),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${n};`);const u=o.example;if("enum"===l&&u&&e.isValidJSON(u)){const e=this.typeNameToFileName(n),t=this.convertJsonToEnumString(u,n);this.enumsMap.set(e,{fileName:e,content:t})}continue}if("allOf"in o){const e=o.allOf?.[0];if(e?.$ref){const{headerRefStr:r,typeName:n}=this.parseRef(e.$ref);i.includes(r)||i.push(r),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${n}${this.nullable(o.nullable)};`);continue}}const l=o,u=this.fieldComment(l);switch(""!==u&&s.push(u),l.type){case"array":{const e=this.parseArray(l,a)??this.defaultReturn;s.push(e?.renderStr??""),i.includes(e.headerRef)||n===e.typeName||i.push(e.headerRef)}break;case"boolean":s.push(this.parseBoolean(l,a));break;case"integer":s.push(this.parseInteger(l,a));break;case"number":s.push(this.parseNumber(l,a));break;case"string":if(l.enum){const r=a.charAt(0).toUpperCase()+a.slice(1);if(e.isValidJSON(l.example)){const e=`import type { ${r} } from '${this.config.importEnumPath}';`;i.includes(e)||i.push(e);const n=this.typeNameToFileName(r);if(!this.enumsMap.has(n)){const e=this.convertJsonToEnumString(l.example,r);this.enumsMap.set(n,{fileName:n,content:e})}s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${r}${this.nullable(l.nullable)};`)}else{const e=this.parseEnum(l,r);if(e?.renderStr){const n=`import type { ${r} } from '${this.config.importEnumPath}';`;i.includes(n)||i.push(n);const o=this.typeNameToFileName(r);this.enumsMap.has(o)||this.enumsMap.set(o,{fileName:o,content:e.renderStr}),s.push(`${t}${a}${this.requiredFieldS.includes(a)?"":"?"}: ${r}${this.nullable(l.nullable)};`)}}}else s.push(this.parseString(l,a)?.renderStr??"");break;case"object":{const{headerRef:e,renderStr:t}=this.parseObject(l,a)??this.defaultReturn;s.push(t),i.includes(e)||i.push(e)}}}const a=[`export interface ${n} {`,...s,"}"];if(i.length>0){const e=i.filter((e=>""!==e));e.length>0&&e.push(""),a.unshift(...e)}const o=a.join("\n");return{headerRef:i.join("\n"),renderStr:o}}async generateContent(e,t){if("items"in e)return console.warn(`数组类型未处理: ${t}`,e.items),"";switch(e.type){case"boolean":return this.parseBoolean(e,t);case"integer":return this.parseInteger(e,t);case"number":return this.parseNumber(e,t);case"object":{const r=this.parseProperties(e.properties,t);return r?.renderStr??""}case"string":{const r=this.parseString(e,t);return r?.renderStr??""}default:return""}}async parseData(){try{if(!this.schemas)return void console.warn("schemas 为空");for(const[e,t]of Object.entries(this.schemas)){if("$ref"in t){console.warn(`跳过 ReferenceObject: ${e}`);continue}const r="type"in t?t:null;if(!r?.type){console.warn(`无效的 schema 对象: ${e}`);continue}this.requiredFieldS=t.required??[];const n=this.typeNameToFileName(e),s=await this.generateContent(r,e);s&&(s.includes("export enum ")&&!this.enumsMap.has(n)?this.enumsMap.set(n,{fileName:n,content:s}):this.schemasMap.set(e,{fileName:n,content:s}))}}catch(e){throw console.error("解析过程出错:",e),e}}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 i=async({fileName:t,content:s})=>{r.push(`export * from './${t}';`),await e.writeFileRecursive(`${n}${t}.ts`,s)};t.push(i(s))}await Promise.all(t),await e.writeFileRecursive(`${n}index.ts`,r.join("\n"))}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/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;
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),d=c(n);let u;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/openapi.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=d.default.join(__dirname,"..","..","ajax-config"),a=e;for(const e of s){const s=d.default.join(r,e),o=d.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(!u)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 u=!0,JSON.parse(t)}catch(s){return u=!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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anl",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "FE command line tool",
5
5
  "main": "bin/an-cli.js",
6
6
  "scripts": {
@@ -1 +0,0 @@
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/effect/list":{get:{operationId:"EffectController_list",summary:"获取音效列表",parameters:[{name:"style",required:!1,in:"query",description:"游戏风格",schema:{type:"string"}}],responses:{default:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/EffectListDto"}}}}}},tags:["音效"]}},"/api/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=[],o=[],i={schemas:{CompletionDto:{type:"object",properties:{editorValue:{type:"string",description:"Editor input value for which the completion is required"},sceneType:{type:"string",description:"scene file type en or zh"},params:{type:"object",description:"Parameters required for completion"}},required:["editorValue","sceneType","params"]},GameTypeEnum:{type:"string",description:"游戏类型",enum:["solvePuzzles","otome"]},EditorTypeEnum:{type:"string",description:"编辑器类型",enum:["ui","txt"]},CreateGameDTO:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},gameType:{example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome"}',$ref:"#/components/schemas/GameTypeEnum"},editorType:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"}},required:["gameName","gameType","editorType"]},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:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"},Game_type:{example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome"}',$ref:"#/components/schemas/GameTypeEnum"},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"]},ProgressStatusEnum:{type:"string",description:"进度状态",enum:["0","1","2","3"]},Progress:{type:"object",properties:{current:{type:"number",description:"进度"},status:{example:'{"INIT":"0","ING":"1","DONE":"2","ERR":"3"}',$ref:"#/components/schemas/ProgressStatusEnum"},msg:{type:"string",description:"生成信息"}},required:["current","status","msg"]},ImageStyleEnum:{type:"string",description:"道具风格",enum:["anime","romantic"]},Picture:{type:"object",properties:{url:{type:"string",description:"图片地址"},check:{type:"boolean",description:"是否选中"}},required:["url","check"]},BgGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","bg"]},UpdateBgDto:{type:"object",properties:{id:{type:"string",description:"背景ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"背景名称"},style:{example:'{"Anime":"anime","Romantic":"romantic"}',$ref:"#/components/schemas/ImageStyleEnum"},original:{type:"string",description:"原文(背景描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"背景图片"},list:{description:"背景图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},word:{type:"string",description:"背景正向提示词"},tlmId:{type:"string",description:"背景对应大模型输出ID"},category:{description:"背景分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},stage:{example:'{"PROMPTS":"prompts","BG":"bg"}',$ref:"#/components/schemas/BgGenerateStage"},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"]},GenderEnum:{type:"string",description:"角色性别",enum:["male","female"]},AgeEnum:{type:"string",description:"年纪",enum:["child","adult","youth","elder"]},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"]},RoleGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","figure","expression","frame"]},UpdateRoleDto:{type:"object",properties:{uid:{type:"string",description:"用户ID"},id:{type:"string",description:"角色ID"},name:{type:"string",description:"角色名字"},gender:{example:'{"MALE":"male","FEMALE":"female"}',$ref:"#/components/schemas/GenderEnum"},style:{example:'{"Anime":"anime","Romantic":"romantic"}',$ref:"#/components/schemas/ImageStyleEnum"},age:{example:'{"CHILD":"child","ADULT":"adult","YOUNG":"youth","ELDER":"elder"}',$ref:"#/components/schemas/AgeEnum"},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:{$ref:"#/components/schemas/RoleGenerateStage"},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"]},ExtractTypeEnum:{type:"string",description:"批处理类型",enum:["extract","picture"]},BatchExtraction:{type:"object",properties:{bg:{description:"背景数据",allOf:[{$ref:"#/components/schemas/BatchBg"}]},role:{description:"角色数据",allOf:[{$ref:"#/components/schemas/BatchRole"}]},bgm:{description:"BGM",allOf:[{$ref:"#/components/schemas/BatchBgm"}]},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]},id:{type:"string",description:"批量提取ID"},uid:{type:"string",description:"用户ID"},gameName:{type:"string",description:"游戏名称"},type:{$ref:"#/components/schemas/ExtractTypeEnum"}},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"]},ResourceTypeEnum:{type:"string",description:"资源类型",enum:["figure","background","bgm"]},Remark:{type:"object",properties:{applyFrame:{description:"应用差分帧图",type:"array",items:{type:"string"}}},required:["applyFrame"]},CreateResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"},path:{type:"string",description:"资源路径"},list:{description:"备选图",type:"array",items:{type:"string"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},type:{example:'{"FIGURE":"figure","BACKGROUND":"background","BGM":"bgm"}',$ref:"#/components/schemas/ResourceTypeEnum"},uid:{type:"string",description:"用户ID"},pid:{type:"string",description:"父级资源ID"},category:{description:"分类",allOf:[{$ref:"#/components/schemas/Category"}]},remark:{description:"备注",allOf:[{$ref:"#/components/schemas/Remark"}]}},required:["name","path","list","frame","type","uid","pid","category","remark"]},UpdateResourceDto:{type:"object",properties:{}},FindBgDto:{type:"object",properties:{name:{type:"string",description:"背景名称"}},required:["name"]},StockColumnData:{type:"object",properties:{id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐相对地址"},locationId:{type:"string",description:"位置ID"},checked:{type:"boolean",description:"勾选"}},required:["id","name","url","locationId","checked"]},StockColumn:{type:"object",properties:{column:{type:"string",description:"列值"},data:{description:"行标签对应列数据",type:"array",items:{$ref:"#/components/schemas/StockColumnData"}}},required:["column","data"]},Stock:{type:"object",properties:{name:{type:"string",description:"行标签名称"},columns:{description:"行标签对应列数据",type:"array",items:{$ref:"#/components/schemas/StockColumn"}}},required:["name","columns"]},BgmTableDto:{type:"object",properties:{title:{description:"音乐库表头",type:"array",items:{$ref:"#/components/schemas/Title"}},stock:{description:"音乐库数据",type:"array",items:{$ref:"#/components/schemas/Stock"}}},required:["title","stock"]},BgmListDto:{type:"object",properties:{locationId:{type:"string",description:"位置ID"},id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐地址"},category:{type:"string",description:"音乐类型"}},required:["locationId","id","name","url","category"]},AudioCutDto:{type:"object",properties:{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"]},EditorCommandEnum:{type:"string",description:"命令",enum:["narr","clp","bst","bgi","bgm","cg","cp","mvars","ieff"]},Role:{type:"object",properties:{id:{type:"string",description:"角色ID"},emotion:{type:"string",description:"表情"},name:{type:"string",description:"角色名称"},gender:{example:'{"MALE":"male","FEMALE":"female"}',$ref:"#/components/schemas/GenderEnum"},style:{example:'{"Anime":"anime","Romantic":"romantic"}',$ref:"#/components/schemas/ImageStyleEnum"},timbre:{type:"string",description:"音色"}},required:["id","emotion","name","gender","style","timbre"]},Vocal:{type:"object",properties:{hash:{type:"string",description:"hash"},timbre:{type:"string",description:"音色"},vocal:{type:"string",description:"配音文件(不包含路径)"},url:{type:"string",description:"配音地址"}},required:["hash","timbre","vocal","url"]},Prop:{type:"object",properties:{id:{type:"string",description:"道具ID"},name:{type:"string",description:"道具名称"}},required:["id","name"]},ArithmeticOperatorEnum:{type:"string",description:"算术运算符",enum:["add","sub","eq"]},Var:{type:"object",properties:{varId:{type:"string",description:"选定的变量ID"},varValue:{type:"number",description:"设定变量值"},operator:{example:'{"ADD":"add","SUB":"sub","EQ":"eq"}',$ref:"#/components/schemas/ArithmeticOperatorEnum"}},required:["varId","varValue","operator"]},EffectTypeEnum:{type:"string",description:"音效类型",enum:["flow","scene"]},SoundEffect:{type:"object",properties:{ids:{description:"音效对应ID层级",type:"array",items:{type:"string"}},type:{example:'{"FLOW":"flow","SCENE":"scene"}',$ref:"#/components/schemas/EffectTypeEnum"},loop:{type:"boolean",description:"是否循环",default:!1},volume:{type:"number",description:"音量0-100",default:50,minimum:0,maximum:100}},required:["ids","type","loop","volume"]},LineDto:{type:"object",properties:{id:{type:"string",description:"行ID"},content:{type:"string",description:"内容"},command:{type:"array",items:{$ref:"#/components/schemas/EditorCommandEnum"}},role:{description:"角色",allOf:[{$ref:"#/components/schemas/Role"}]},vocal:{description:"配音",allOf:[{$ref:"#/components/schemas/Vocal"}]},prop:{description:"道具",allOf:[{$ref:"#/components/schemas/Prop"}]},vars:{description:"变量",type:"array",items:{$ref:"#/components/schemas/Var"}},soundEffects:{description:"音效",type:"array",items:{$ref:"#/components/schemas/SoundEffect"}}},required:["id","content","command","role","vocal","prop","vars","soundEffects"]},Figure:{type:"object",properties:{name:{type:"string",description:"立绘名称"},path:{type:"string",description:"图片路径"}},required:["name","path"]},BgmVO:{type:"object",properties:{audio:{type:"string",description:"音乐"},url:{type:"string",description:"URL"},loop:{type:"boolean",description:"是否循环",default:!0},volume:{type:"number",description:"音量0-100",default:100},rate:{type:"number",description:"播放速度",default:1}},required:["audio","url","loop","volume","rate"]},SceneDetailRsp:{type:"object",properties:{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"]},PropSizeEnum:{type:"string",description:"道具大小",enum:["small","middle","big"]},PropGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","prop"]},PropDto:{type:"object",properties:{id:{type:"string",description:"道具ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"道具名称"},style:{$ref:"#/components/schemas/ImageStyleEnum"},original:{type:"string",description:"原文(道具描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"道具图片"},list:{description:"道具图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},tlmId:{type:"string",description:"道具对应大模型输出ID"},category:{description:"道具分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},size:{example:'{"SMALL":"small","MIDDLE":"middle","BIG":"big"}',$ref:"#/components/schemas/PropSizeEnum"},stage:{example:'{"PROMPTS":"prompts","PROP":"prop"}',$ref:"#/components/schemas/PropGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","style","original","prompts","url","list","tlmId","category","size","stage","progress"]},FindPropDto:{type:"object",properties:{name:{type:"string",description:"道具名称"}},required:["name"]},CgGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","cg"]},CgDto:{type:"object",properties:{id:{type:"string",description:"Cg ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"Cg名称"},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:{$ref:"#/components/schemas/CgGenerateStage"},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"]},EffectListDto:{type:"object",properties:{value:{type:"string",description:"音效ID"},label:{type:"string",description:"音效名"},style:{type:"string",description:"风格",nullable:!0},tags:{description:"音效标签",nullable:!0,type:"array",items:{type:"string"}},url:{type:"string",description:"资源文件路径",nullable:!0},children:{description:"下级分类",nullable:!0,type:"array",items:{$ref:"#/components/schemas/EffectListDto"}}},required:["value","label","style","tags","url","children"]},NodeTypeEnum:{type:"string",description:"类型",enum:["start","scene","branch","end"]},LogicalOperatorEnum:{type:"string",description:"逻辑关联",enum:["and","or",""]},Variable:{type:"object",properties:{id:{type:"string",description:"变量ID"},name:{type:"string",description:"变量名称"}},required:["id","name"]},EscapeCharacterEnum:{type:"string",description:"转义字符",enum:["lt","le","eq","ne","ge","gt"]},ExpValue:{type:"object",properties:{value:{type:"number",description:"设置值"},exp:{example:'{"LT":"lt","LE":"le","EQ":"eq","NE":"ne","GE":"ge","GT":"gt"}',$ref:"#/components/schemas/EscapeCharacterEnum"}},required:["value","exp"]},TriggerCondition:{type:"object",properties:{variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},when:{example:'{"AND":"and","OR":"or","NULL":""}',$ref:"#/components/schemas/LogicalOperatorEnum"}},required:["variable","lower","upper","when"]},ICondition:{type:"object",properties:{when:{example:'{"AND":"and","OR":"or","NULL":""}',$ref:"#/components/schemas/LogicalOperatorEnum"},list:{description:"触发条件",type:"array",items:{$ref:"#/components/schemas/TriggerCondition"}}},required:["when","list"]},IOptions:{type:"object",properties:{name:{type:"string",description:"选项名称"},nodeId:{type:"string",description:"关联的节点"},sound:{type:"string",description:"绑定音频"},vars:{description:"设置变量",type:"array",items:{$ref:"#/components/schemas/Var"}},conditionSwitch:{type:"boolean",description:"是否启用条件判断"},condition:{description:"触发条件",allOf:[{$ref:"#/components/schemas/ICondition"}]}},required:["name","nodeId","sound","vars","conditionSwitch","condition"]},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:{$ref:"#/components/schemas/NodeTypeEnum"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/NodeData"}]}},required:["id","type","data"]},EdgeData:{type:"object",properties:{when:{example:'{"AND":"and","OR":"or","NULL":""}',$ref:"#/components/schemas/LogicalOperatorEnum"},list:{description:"触发条件",type:"array",items:{$ref:"#/components/schemas/TriggerCondition"}},label:{type:"string",description:"标签"},weight:{type:"number",description:"权重"}},required:["when","list","label","weight"]},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",description:"节点id"},msg:{type:"string",description:"错误信息"},type:{type:"string",description:"错误类型"}},required:["id","msg","type"]},ValidateCanvas:{type:"object",properties:{only:{description:"节点重复集",type:"array",items:{$ref:"#/components/schemas/Valid"}},scene:{description:"场景报错集",type:"array",items:{$ref:"#/components/schemas/Valid"}},branch:{description:"节点报错集",type:"array",items:{$ref:"#/components/schemas/Valid"}},edge:{description:"边报错集",type:"array",items:{$ref:"#/components/schemas/Valid"}}},required:["only","scene","branch","edge"]},CanvasHistory:{type:"object",properties:{_id:{type:"string",description:"画布ID"},updatedAt:{type:"string",description:"更新时间"},createdAt:{type:"string",description:"创建时间"}},required:["_id","updatedAt","createdAt"]},RecordCanvasDto:{type:"object",properties:{editorType:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"},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:o,components:i};exports.components=i,exports.default=a,exports.info=r,exports.openapi=e,exports.paths=t,exports.servers=o,exports.tags=s;