{"openapi":"3.0.3","info":{"title":"AgentDeploy API","description":"平台自身 API（/api/v1）。用户项目级 API 是另一套端点，版本号互不相干（规范 §5）。","version":"1.0.0"},"tags":[{"name":"platform","description":"平台自身通用端点（健康检查、能力探测）"}],"paths":{"/api/auth/*":{"get":{"operationId":"allApiAuth*"},"post":{"operationId":"allApiAuth*"},"put":{"operationId":"allApiAuth*"},"delete":{"operationId":"allApiAuth*"},"patch":{"operationId":"allApiAuth*"},"head":{"operationId":"allApiAuth*"},"options":{"operationId":"allApiAuth*"},"trace":{"operationId":"allApiAuth*"}},"/api/v1/auth/social-providers":{"get":{"summary":"已启用的第三方登录方式（未配置任何 OAUTH_* 时返回空列表）","tags":["auth"],"operationId":"getApiV1AuthSocial-providers"}},"/api/v1/auth/registration-invite/status":{"get":{"summary":"注册邀请码门槛与微信开放平台通道状态（公开；浮窗初始化用，不含任何凭据）","tags":["auth"],"operationId":"getApiV1AuthRegistration-inviteStatus"}},"/api/v1/auth/captcha":{"get":{"summary":"签发一枚图形验证码（未启用时 404；响应不含明文答案）","tags":["auth"],"operationId":"getApiV1AuthCaptcha"}},"/api/v1/auth/password-reset/status":{"get":{"summary":"是否已开启密码找回（未配 SMTP 时 enabled=false，登录页不出现入口）","tags":["auth"],"operationId":"getApiV1AuthPassword-resetStatus"}},"/api/v1/auth/social/setup-email":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["email"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["email"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"}}}}}},"operationId":"postApiV1AuthSocialSetup-email"}},"/api/v1/auth/social/verify-email":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"},"code":{"minLength":6,"maxLength":6,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"},"code":{"minLength":6,"maxLength":6,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"},"code":{"minLength":6,"maxLength":6,"type":"string"}}}}}},"operationId":"postApiV1AuthSocialVerify-email"}},"/api/v1/account/email/change-request":{"post":{"summary":"发起换绑邮箱（向新邮箱发送六位验证码；未配 SMTP 时端点不挂载）","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["email"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["email"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"}}}}}},"operationId":"postApiV1AccountEmailChange-request"}},"/api/v1/account/email/change-verify":{"post":{"summary":"用验证码完成换绑邮箱（新邮箱被占用时报 EMAIL_CHANGE_IN_USE）","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"},"code":{"minLength":6,"maxLength":6,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"},"code":{"minLength":6,"maxLength":6,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"minLength":1,"maxLength":254,"type":"string"},"code":{"minLength":6,"maxLength":6,"type":"string"}}}}}},"operationId":"postApiV1AccountEmailChange-verify"}},"/api/oauth/jwks":{"get":{"operationId":"getApiOauthJwks"}},"/api/oauth/register":{"post":{"operationId":"postApiOauthRegister"}},"/api/oauth/authorize":{"get":{"operationId":"getApiOauthAuthorize"},"post":{"operationId":"postApiOauthAuthorize"}},"/api/oauth/token":{"post":{"operationId":"postApiOauthToken"}},"/api/oauth/userinfo":{"get":{"operationId":"getApiOauthUserinfo"}},"/api/oauth/revoke":{"post":{"operationId":"postApiOauthRevoke"}},"/api/v1/projects/{projectId}/functions":{"post":{"summary":"创建云函数（含多文件草稿源码）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","files"],"properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","files"],"properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","files"],"properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}}}},"operationId":"postApiV1ProjectsByProjectIdFunctions"},"get":{"summary":"列出项目下的云函数","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdFunctions"}},"/api/v1/projects/{projectId}/functions/{name}":{"get":{"summary":"读取云函数草稿源码（多文件）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdFunctionsByName"},"patch":{"summary":"更新云函数（重命名 / 整组替换草稿源码）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}}}},"operationId":"patchApiV1ProjectsByProjectIdFunctionsByName"},"delete":{"summary":"删除云函数（软删除，草稿一并清空）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdFunctionsByName"}},"/api/v1/projects/{projectId}/frontend/files":{"get":{"summary":"读取项目前端文件草稿（web/ 单根；存量 widgets//pages/ 键 GET 时自动迁移）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdFrontendFiles"},"put":{"summary":"整组替换项目前端文件草稿（IDE 保存，幂等）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}}}},"operationId":"putApiV1ProjectsByProjectIdFrontendFiles"}},"/api/v1/projects/{projectId}/shared/files":{"get":{"summary":"读取项目级共享源码（functions/_shared/** 的唯一一份）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdSharedFiles"},"put":{"summary":"整组替换项目级共享源码（IDE 保存 / CLI-014 adep deploy 上传，幂等）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}}}},"operationId":"putApiV1ProjectsByProjectIdSharedFiles"}},"/api/v1/projects/{projectId}/source-repo":{"get":{"summary":"读取项目源码仓库状态（仓库地址 / 最新提交 / 投影一致性）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdSource-repo"}},"/api/v1/projects/{projectId}/source-repo/rebuild":{"post":{"summary":"从 Git 重建项目源码投影（投影 stale / 换实例后修复）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdSource-repoRebuild"}},"/api/v1/projects/{projectId}/workers/upload":{"post":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"zipBase64":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"zipBase64":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"zipBase64":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdWorkersUpload"}},"/api/v1/projects/{projectId}/workers/precheck":{"get":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdWorkersPrecheck"}},"/api/v1/projects/{projectId}/frontend/publish":{"post":{"summary":"发布项目前端工作区：生成不可变版本、切换 current 并导出静态站点（?environment=dev 发到开发站点）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdFrontendPublish"}},"/api/v1/projects/{projectId}/frontend/versions":{"get":{"summary":"列出项目前端版本（倒序）与当前版本 + 站点访问地址（?environment=dev 看开发站点）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdFrontendVersions"}},"/api/v1/projects/{projectId}/frontend/rollback":{"post":{"summary":"回滚项目前端站点：切换到指定的既有版本并重建导出（?environment=dev 回滚开发站点）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["version"],"properties":{"version":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["version"],"properties":{"version":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["version"],"properties":{"version":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}}}},"operationId":"postApiV1ProjectsByProjectIdFrontendRollback"}},"/api/v1/functions/{id}/openapi":{"get":{"summary":"查询函数当前已发布版本的 OpenAPI 推导 schema（供 MCP 复用同一数据源）","tags":["functions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1FunctionsByIdOpenapi"}},"/api/v1/projects/{projectId}/preview":{"post":{"summary":"上传前端预览产物（入口 HTML + 内容寻址模块），返回可跨浏览器打开的预览地址","tags":["preview"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["html","modules"],"properties":{"html":{"type":"string"},"modules":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"paths":{"type":"array","items":{"type":"string"}},"port":{"type":"number"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["html","modules"],"properties":{"html":{"type":"string"},"modules":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"paths":{"type":"array","items":{"type":"string"}},"port":{"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["html","modules"],"properties":{"html":{"type":"string"},"modules":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"paths":{"type":"array","items":{"type":"string"}},"port":{"type":"number"}}}}}},"operationId":"postApiV1ProjectsByProjectIdPreview"}},"/api/v1/functions/{id}/run":{"post":{"summary":"调试执行：用请求构造器触发当前草稿源码一次执行，返回模拟状态码 / 耗时 / 响应体 / 日志","tags":["functions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string"},"query":{"type":"object","patternProperties":{"^(.*)$":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"body":{}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string"},"query":{"type":"object","patternProperties":{"^(.*)$":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"body":{}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string"},"query":{"type":"object","patternProperties":{"^(.*)$":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"body":{}}}}}},"operationId":"postApiV1FunctionsByIdRun"}},"/api/v1/functions/{id}/logs":{"get":{"summary":"查询函数最近执行日志（已脱敏；M1 面板 2s 轮询拉取）","tags":["functions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tail","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1FunctionsByIdLogs"}},"/api/v1/projects/{projectId}/env":{"get":{"summary":"列出项目环境变量（secret 只回掩码，public 回明文）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdEnv"},"post":{"summary":"创建/更新环境变量（加密落库；secret 值写入后不可读回明文）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["environment","key","value"],"properties":{"environment":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"isSecret":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["environment","key","value"],"properties":{"environment":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"isSecret":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["environment","key","value"],"properties":{"environment":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"isSecret":{"type":"boolean"}}}}}},"operationId":"postApiV1ProjectsByProjectIdEnv"}},"/api/v1/projects/{projectId}/env/{key}":{"delete":{"summary":"删除环境变量（物理删除，立即对沙箱注入失效）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdEnvByKey"}},"/api/v1/projects/{projectId}/invocations":{"get":{"summary":"项目云函数调用记录（分页 + 函数/来源/状态/时间窗过滤，最新在前）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"string"}},{"name":"functionId","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdInvocations"}},"/api/v1/projects/{projectId}/invocations/stats":{"get":{"summary":"项目云函数调用分析：窗口内聚合（总量/成功率/平均耗时）+ 来源分布 + Top 函数 + 时间桶序列","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"functionId","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"buckets","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdInvocationsStats"}},"/api/v1/projects/{projectId}/state-objects":{"get":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdState-objects"}},"/api/v1/projects/{projectId}/state-objects/{type}/{id}":{"get":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdState-objectsByTypeById"}},"/api/v1/projects/{projectId}/state-objects/{type}/{id}/{method}":{"post":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"method","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdState-objectsByTypeByIdByMethod"}},"/api/v1/projects/{projectId}/triggers":{"get":{"summary":"列出项目触发器（含目标函数名）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdTriggers"},"post":{"summary":"创建触发器（cron 型须带合法 cron 表达式；storage.upload 型可带 prefix 前缀过滤）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["functionId","type"],"properties":{"functionId":{"type":"string"},"type":{"type":"string"},"cron":{"type":"string"},"prefix":{"type":"string"},"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["functionId","type"],"properties":{"functionId":{"type":"string"},"type":{"type":"string"},"cron":{"type":"string"},"prefix":{"type":"string"},"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["functionId","type"],"properties":{"functionId":{"type":"string"},"type":{"type":"string"},"cron":{"type":"string"},"prefix":{"type":"string"},"enabled":{"type":"boolean"}}}}}},"operationId":"postApiV1ProjectsByProjectIdTriggers"}},"/api/v1/projects/{projectId}/triggers/{id}":{"patch":{"summary":"启停触发器（停用即时生效：调度器每轮实时读库）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"operationId":"patchApiV1ProjectsByProjectIdTriggersById"},"delete":{"summary":"删除触发器（软删，调度器不再可见）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdTriggersById"}},"/api/v1/projects/{projectId}/triggers/runs":{"get":{"summary":"查询项目触发执行记录（触发源 / 函数版本 / 耗时 / 结果状态）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tail","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdTriggersRuns"}},"/api/v1/functions/pool":{"get":{"summary":"函数池只读状态（FN-028 集群入口）","description":"返回 FN-027 池化执行器的启用/就绪/池大小/存活容器/派发中容器/失败原因；未启用时返回 enabled:false 的同一形状（非 404）。","tags":["functions"],"operationId":"getApiV1FunctionsPool"}},"/api/v1/projects/{projectId}/deps/builtin":{"get":{"summary":"内置依赖白名单：命中者零安装直用（秒级冷启动），自定义依赖发布时装载","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDepsBuiltin"}},"/api/v1/functions/{id}/deps":{"get":{"summary":"函数依赖清单状态：package.json 逐依赖标注 builtin（免安装）/ custom（发布时装载）","tags":["functions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1FunctionsByIdDeps"}},"/api/v1/projects":{"post":{"summary":"创建项目（slug 全局唯一 + 系统域名），返回子域名地址","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"spaceId":{"type":"string"},"template":{"type":"string"},"envVars":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"source":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}},"git":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"spaceId":{"type":"string"},"template":{"type":"string"},"envVars":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"source":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}},"git":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"spaceId":{"type":"string"},"template":{"type":"string"},"envVars":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"source":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}},"git":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}}}}}}},"operationId":"postApiV1Projects"},"get":{"summary":"列出当前用户的项目（含每项目函数计数 functionCount）","tags":["projects"],"operationId":"getApiV1Projects"}},"/api/v1/projects/{projectId}":{"get":{"summary":"读取项目详情（含系统域名、默认子域地址与访问状态、函数前缀）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectId"},"patch":{"summary":"更新项目设置（名称 / slug / 云函数前缀；至少给一项）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"functionsPrefix":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"functionsPrefix":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"functionsPrefix":{"type":"string"}}}}}},"operationId":"patchApiV1ProjectsByProjectId"},"delete":{"summary":"删除项目（级联软删函数/草稿/环境变量/触发器/Git 绑定/域名，子域名立即下线）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectId"}},"/api/v1/projects/{projectId}/readme":{"get":{"summary":"读取项目 README（Markdown 原文，null = 从未写过）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdReadme"},"put":{"summary":"写入 / 清空项目 README（Markdown 原文；传 null 即清空）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["readme"],"properties":{"readme":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["readme"],"properties":{"readme":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["readme"],"properties":{"readme":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"operationId":"putApiV1ProjectsByProjectIdReadme"}},"/api/v1/projects/{projectId}/transfer":{"post":{"summary":"转移项目（交接给其他用户 / 迁移到自己的另一个空间）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetUserId":{"type":"string"},"targetEmail":{"type":"string"},"targetSpaceId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"targetUserId":{"type":"string"},"targetEmail":{"type":"string"},"targetSpaceId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"targetUserId":{"type":"string"},"targetEmail":{"type":"string"},"targetSpaceId":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdTransfer"}},"/api/v1/projects/{projectId}/domains":{"post":{"summary":"绑定自定义域名：返回 CNAME 目标与一次性 TXT 校验值（pending 态）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdDomains"},"get":{"summary":"列出项目自定义域名记录（含证书方式、边缘就绪位与部署能力位）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDomains"}},"/api/v1/projects/{projectId}/domains/{domainId}/verify":{"post":{"summary":"校验域名所有权：TXT 通过后置为 verified（网关路由生效）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdDomainsByDomainIdVerify"}},"/api/v1/projects/{projectId}/domains/{domainId}":{"delete":{"summary":"解绑自定义域名（立即下线）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdDomainsByDomainId"},"patch":{"summary":"切换域名的证书签发方式（重置边缘就绪位，等待边缘重新下发）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["certMode"],"properties":{"certMode":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["certMode"],"properties":{"certMode":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["certMode"],"properties":{"certMode":{"type":"string"}}}}}},"operationId":"patchApiV1ProjectsByProjectIdDomainsByDomainId"}},"/api/v1/projects/{projectId}/domains/{domainId}/cert":{"post":{"summary":"上传自有证书链与私钥（加密落盘，响应只回材料指纹，绝不回显私钥）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chain","key"],"properties":{"chain":{"type":"string"},"key":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["chain","key"],"properties":{"chain":{"type":"string"},"key":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["chain","key"],"properties":{"chain":{"type":"string"},"key":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdDomainsByDomainIdCert"},"delete":{"summary":"清除自有证书材料并把证书方式落回自动签发（不留悬挂态）","tags":["projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdDomainsByDomainIdCert"}},"/api/v1/spaces":{"get":{"summary":"列出当前用户的空间（自动保证个人空间存在）","tags":["spaces"],"operationId":"getApiV1Spaces"},"post":{"summary":"创建团队空间（创建者自动为 Owner）","tags":["spaces"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string"},"slug":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string"},"slug":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string"},"slug":{"type":"string"}}}}}},"operationId":"postApiV1Spaces"}},"/api/v1/spaces/{spaceId}":{"get":{"summary":"读取空间详情（成员可读）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceId"},"patch":{"summary":"重命名空间（仅 Owner；slug 不可改）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}},"operationId":"patchApiV1SpacesBySpaceId"},"delete":{"summary":"删除空间（仅 Owner；有项目则拒绝）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1SpacesBySpaceId"}},"/api/v1/spaces/{spaceId}/members":{"get":{"summary":"列出空间成员（成员可读）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdMembers"},"post":{"summary":"添加成员或调整其角色（Owner/Admin；userId 或 email 二选一）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"userId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["role"],"properties":{"userId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["role"],"properties":{"userId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"}}}}}},"operationId":"postApiV1SpacesBySpaceIdMembers"}},"/api/v1/spaces/{spaceId}/members/{userId}":{"delete":{"summary":"移除空间成员（Owner 全权 / Admin 限 dev·viewer）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1SpacesBySpaceIdMembersByUserId"}},"/api/v1/spaces/{spaceId}/membership":{"delete":{"summary":"退出空间（Owner 必须先转让所有权）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1SpacesBySpaceIdMembership"}},"/api/v1/spaces/{spaceId}/transfer-owner":{"post":{"summary":"转让空间所有权（仅 Owner，目标须为本空间成员）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"}}}}}},"operationId":"postApiV1SpacesBySpaceIdTransfer-owner"}},"/api/v1/spaces/{spaceId}/plan":{"patch":{"summary":"切换空间订阅档位（Owner/Admin）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string"}}}}}},"operationId":"patchApiV1SpacesBySpaceIdPlan"}},"/api/v1/spaces/{spaceId}/addons":{"post":{"summary":"加购空间资源包扩容（Owner/Admin）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dimension","amount"],"properties":{"dimension":{"type":"string"},"amount":{"type":"number"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["dimension","amount"],"properties":{"dimension":{"type":"string"},"amount":{"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["dimension","amount"],"properties":{"dimension":{"type":"string"},"amount":{"type":"number"}}}}}},"operationId":"postApiV1SpacesBySpaceIdAddons"},"get":{"summary":"列出空间资源包叠加记录（成员可读）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdAddons"}},"/api/v1/spaces/{spaceId}/usage":{"get":{"summary":"读取空间当期计量用量（月度滚动窗口，成员可读）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdUsage"}},"/api/v1/spaces/{spaceId}/quota":{"get":{"summary":"读取空间生效配额（两级口径，成员可读）","tags":["spaces"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdQuota"}},"/api/v1/ai/quota":{"get":{"summary":"读取本人平台池 AI 每日免费额度（当日已用/剩余，只读）","tags":["spaces"],"operationId":"getApiV1AiQuota"}},"/api/v1/ai/usage":{"get":{"summary":"读取本人平台池 AI 调用流水（倒序分页，只读）","tags":["spaces"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AiUsage"}},"/api/v1/projects/{projectId}/runtime-summary":{"get":{"summary":"项目运行监控聚合（部署状态 / 版本历史 / 用量读数）","tags":["billing"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdRuntime-summary"}},"/api/v1/billing/payment-methods":{"get":{"summary":"列出已启用支付渠道（公开目录，配置门控）","tags":["billing"],"operationId":"getApiV1BillingPayment-methods"}},"/api/v1/spaces/{spaceId}/orders":{"get":{"summary":"空间订单账单列表（Owner/Admin，创建时间倒序，分页）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdOrders"},"post":{"summary":"创建支付订单并获取支付凭证（Owner/Admin）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["itemType","itemCode"],"properties":{"itemType":{"type":"string"},"itemCode":{"type":"string"},"channel":{"type":"string"},"returnUrl":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["itemType","itemCode"],"properties":{"itemType":{"type":"string"},"itemCode":{"type":"string"},"channel":{"type":"string"},"returnUrl":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["itemType","itemCode"],"properties":{"itemType":{"type":"string"},"itemCode":{"type":"string"},"channel":{"type":"string"},"returnUrl":{"type":"string"}}}}}},"operationId":"postApiV1SpacesBySpaceIdOrders"}},"/api/v1/spaces/{spaceId}/orders/{orderNo}":{"get":{"summary":"查询支付订单状态（Owner/Admin，收银台轮询用）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"orderNo","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdOrdersByOrderNo"}},"/api/v1/billing/webhook/xunhu":{"post":{"summary":"虎皮椒支付回调（签名校验，无会话）","tags":["billing"],"operationId":"postApiV1BillingWebhookXunhu"}},"/api/v1/billing/webhook/paddle":{"post":{"summary":"Paddle 支付回调（HMAC-SHA256 签名校验，无会话）","tags":["billing"],"operationId":"postApiV1BillingWebhookPaddle"}},"/api/v1/billing/webhook/wechatpay":{"post":{"summary":"微信支付 v3 回调（平台证书验签 + AES-GCM 解密，无会话）","tags":["billing"],"operationId":"postApiV1BillingWebhookWechatpay"}},"/api/v1/billing/webhook/alipay":{"post":{"summary":"支付宝回调（RSA2 签名校验，无会话）","tags":["billing"],"operationId":"postApiV1BillingWebhookAlipay"}},"/api/v1/billing/webhook/unionpay":{"post":{"summary":"银联全渠道回调（SHA256withRSA 签名校验，无会话）","tags":["billing"],"operationId":"postApiV1BillingWebhookUnionpay"}},"/api/v1/spaces/{spaceId}/invoices/eligible-orders":{"get":{"summary":"可开票订单列表（Owner/Admin；fulfilled 且未被有效发票引用）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdInvoicesEligible-orders"}},"/api/v1/spaces/{spaceId}/invoices":{"get":{"summary":"空间发票列表（Owner/Admin，倒序分页）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdInvoices"},"post":{"summary":"申请开票（Owner/Admin，金额服务端计算）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["orderIds","titleType","title","email"],"properties":{"orderIds":{"type":"array","items":{"type":"string"}},"titleType":{"type":"string"},"title":{"type":"string"},"taxId":{"type":"string"},"email":{"type":"string"},"remark":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["orderIds","titleType","title","email"],"properties":{"orderIds":{"type":"array","items":{"type":"string"}},"titleType":{"type":"string"},"title":{"type":"string"},"taxId":{"type":"string"},"email":{"type":"string"},"remark":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["orderIds","titleType","title","email"],"properties":{"orderIds":{"type":"array","items":{"type":"string"}},"titleType":{"type":"string"},"title":{"type":"string"},"taxId":{"type":"string"},"email":{"type":"string"},"remark":{"type":"string"}}}}}},"operationId":"postApiV1SpacesBySpaceIdInvoices"}},"/api/v1/spaces/{spaceId}/invoices/{invoiceId}":{"get":{"summary":"发票详情（Owner/Admin；跨空间按不存在处理）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"invoiceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdInvoicesByInvoiceId"}},"/api/v1/spaces/{spaceId}/invoices/{invoiceId}/void":{"post":{"summary":"撤销待开票申请（Owner/Admin）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"invoiceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1SpacesBySpaceIdInvoicesByInvoiceIdVoid"}},"/api/v1/spaces/{spaceId}/invoices/{invoiceId}/file":{"get":{"summary":"下载发票文件（Owner/Admin，私有读）","tags":["billing"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"invoiceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1SpacesBySpaceIdInvoicesByInvoiceIdFile"}},"/api/v1/admin/stop-impersonating":{"post":{"summary":"结束模拟会话（审计回写 actor/on_behalf_of）","tags":["admin"],"operationId":"postApiV1AdminStop-impersonating"}},"/api/v1/admin/dashboard":{"get":{"summary":"管理员概览（需 super_admin）","tags":["admin"],"operationId":"getApiV1AdminDashboard"}},"/api/v1/admin/users":{"get":{"summary":"全平台用户列表 / 检索（需 super_admin）","tags":["admin"],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number"}},{"name":"offset","in":"query","required":false,"schema":{"type":"number"}}],"operationId":"getApiV1AdminUsers"}},"/api/v1/admin/users/{userId}/role":{"patch":{"summary":"调整平台角色（super_admin / user，需 super_admin）","tags":["admin"],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"string"}}}}}},"operationId":"patchApiV1AdminUsersByUserIdRole"}},"/api/v1/admin/users/{userId}/ban":{"post":{"summary":"禁用用户（需 super_admin）","tags":["admin"],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"operationId":"postApiV1AdminUsersByUserIdBan"}},"/api/v1/admin/users/{userId}/unban":{"post":{"summary":"启用用户（需 super_admin）","tags":["admin"],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminUsersByUserIdUnban"}},"/api/v1/admin/users/{userId}":{"delete":{"summary":"物理删除用户及其全部数据（需 super_admin，不可逆）","tags":["admin"],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1AdminUsersByUserId"},"patch":{"summary":"修改用户信息（姓名 / 邮箱）或重置密码（需 super_admin，审计留痕）","tags":["admin"],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"}}}}}},"operationId":"patchApiV1AdminUsersByUserId"}},"/api/v1/admin/users/{userId}/impersonate":{"post":{"summary":"以目标用户身份模拟会话（需 super_admin，审计留痕）","tags":["admin"],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminUsersByUserIdImpersonate"}},"/api/v1/admin/spaces":{"get":{"summary":"空间列表（含成员与项目明细）与项目占用（需 super_admin）","tags":["admin"],"operationId":"getApiV1AdminSpaces"}},"/api/v1/admin/spaces/{spaceId}/plan":{"patch":{"summary":"调整空间订阅档位（需 super_admin，审计留痕）","tags":["admin"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string"}}}}}},"operationId":"patchApiV1AdminSpacesBySpaceIdPlan"}},"/api/v1/admin/spaces/{spaceId}/quota":{"patch":{"summary":"按维度设置空间配额叠加（需 super_admin，审计留痕）","tags":["admin"],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dimensions"],"properties":{"dimensions":{"type":"object","patternProperties":{"^(.*)$":{"type":"number"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["dimensions"],"properties":{"dimensions":{"type":"object","patternProperties":{"^(.*)$":{"type":"number"}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["dimensions"],"properties":{"dimensions":{"type":"object","patternProperties":{"^(.*)$":{"type":"number"}}}}}}}},"operationId":"patchApiV1AdminSpacesBySpaceIdQuota"}},"/api/v1/admin/health":{"get":{"summary":"系统健康：内存 / 并发池水位 / 慢查询 Top N（需 super_admin）","tags":["admin"],"parameters":[{"name":"topN","in":"query","required":false,"schema":{"type":"number"}}],"operationId":"getApiV1AdminHealth"}},"/api/v1/admin/audit-logs":{"get":{"summary":"审计日志（只追加只读，需 super_admin）","tags":["admin"],"parameters":[{"name":"actorId","in":"query","required":false,"schema":{"type":"string"}},{"name":"onBehalfOfId","in":"query","required":false,"schema":{"type":"string"}},{"name":"targetType","in":"query","required":false,"schema":{"type":"string"}},{"name":"targetId","in":"query","required":false,"schema":{"type":"string"}},{"name":"tail","in":"query","required":false,"schema":{"type":"number"}}],"operationId":"getApiV1AdminAudit-logs"}},"/api/v1/admin/invoices":{"get":{"summary":"发票开票队列（需 super_admin，按状态升序分页）","tags":["admin"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number"}},{"name":"offset","in":"query","required":false,"schema":{"type":"number"}}],"operationId":"getApiV1AdminInvoices"}},"/api/v1/admin/invoices/{invoiceId}/issue":{"post":{"summary":"回填开票（multipart：invoiceNo + file，需 super_admin）","tags":["admin"],"parameters":[{"name":"invoiceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminInvoicesByInvoiceIdIssue"}},"/api/v1/admin/invoices/{invoiceId}/file":{"get":{"summary":"下载发票文件（需 super_admin，私有读）","tags":["admin"],"parameters":[{"name":"invoiceId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1AdminInvoicesByInvoiceIdFile"}},"/api/v1/admin/settings":{"get":{"summary":"系统配置全量读数（需 super_admin）","tags":["admin"],"operationId":"getApiV1AdminSettings"},"put":{"summary":"写入配置覆盖（需 super_admin；审计留痕）","tags":["admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key","value"],"properties":{"key":{"maxLength":128,"type":"string"},"value":{}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["key","value"],"properties":{"key":{"maxLength":128,"type":"string"},"value":{}}}},"multipart/form-data":{"schema":{"type":"object","required":["key","value"],"properties":{"key":{"maxLength":128,"type":"string"},"value":{}}}}}},"operationId":"putApiV1AdminSettings"}},"/api/v1/admin/settings/{key}":{"delete":{"summary":"恢复配置默认值（需 super_admin；审计留痕）","tags":["admin"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"maxLength":128,"type":"string"}}],"operationId":"deleteApiV1AdminSettingsByKey"}},"/api/v1/admin/ai/platform-pool":{"get":{"summary":"平台内置模型池配置读数（需 super_admin；密钥只回掩码）","tags":["admin"],"operationId":"getApiV1AdminAiPlatform-pool"},"put":{"summary":"写入平台内置模型池面板配置（需 super_admin；密钥加密落库 + 审计留痕）","tags":["admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"},"apiKey":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}]},"baseUrl":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"maxLength":128,"type":"string"},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"},"apiKey":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}]},"baseUrl":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"maxLength":128,"type":"string"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"},"apiKey":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}]},"baseUrl":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"maxLength":128,"type":"string"},{"type":"null"}]}}}}}},"operationId":"putApiV1AdminAiPlatform-pool"},"delete":{"summary":"清空平台内置模型池面板配置（需 super_admin；回落 env 兜底）","tags":["admin"],"operationId":"deleteApiV1AdminAiPlatform-pool"}},"/api/v1/functions/{id}/publish":{"post":{"summary":"发布函数：生成不可变版本并原子切换当前服务版本；force 可放行警告级密钥命中","tags":["functions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["force"],"properties":{"force":{"default":false,"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["force"],"properties":{"force":{"default":false,"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["force"],"properties":{"force":{"default":false,"type":"boolean"}}}}}},"operationId":"postApiV1FunctionsByIdPublish"}},"/api/v1/functions/{id}/rollback":{"post":{"summary":"回滚函数：切换到指定的既有版本（不可回滚到已裁剪版本）","tags":["functions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["version"],"properties":{"version":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["version"],"properties":{"version":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["version"],"properties":{"version":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}}}},"operationId":"postApiV1FunctionsByIdRollback"}},"/api/v1/functions/{id}/versions":{"get":{"summary":"列出函数全部保留版本（倒序）与当前服务版本，含镜像引用信息（FN-015）","tags":["functions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1FunctionsByIdVersions"}},"/api/v1/deploy/diff":{"post":{"summary":"部署差异比对：返回需上传/发布的函数清单（CLI adep deploy 的远端比对端点）","tags":["functions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["slug","functions"],"properties":{"slug":{"type":"string"},"functions":{"type":"array","items":{"type":"object","required":["name","files"],"properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["slug","functions"],"properties":{"slug":{"type":"string"},"functions":{"type":"array","items":{"type":"object","required":["name","files"],"properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["slug","functions"],"properties":{"slug":{"type":"string"},"functions":{"type":"array","items":{"type":"object","required":["name","files"],"properties":{"name":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1DeployDiff"}},"/api/v1/projects/{projectId}/functions/{name}/releases":{"post":{"summary":"创建灰度发布单：canary 必须是已发布版本且 ≠ 当前 stable；weight>0 即开始放量","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["canaryVersion"],"properties":{"canaryVersion":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"weightPercent":{"minimum":0,"maximum":100,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":100,"type":"integer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["canaryVersion"],"properties":{"canaryVersion":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"weightPercent":{"minimum":0,"maximum":100,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":100,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["canaryVersion"],"properties":{"canaryVersion":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"weightPercent":{"minimum":0,"maximum":100,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":100,"type":"integer"}]}}}}}},"operationId":"postApiV1ProjectsByProjectIdFunctionsByNameReleases"},"get":{"summary":"灰度发布单列表（最新在前）+ 当前在放量的一条","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdFunctionsByNameReleases"}},"/api/v1/projects/{projectId}/functions/{name}/releases/{rid}":{"patch":{"summary":"调整灰度放量百分比（0 → 退回 pending，>0 → active）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["weightPercent"],"properties":{"weightPercent":{"minimum":0,"maximum":100,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":100,"type":"integer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["weightPercent"],"properties":{"weightPercent":{"minimum":0,"maximum":100,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":100,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["weightPercent"],"properties":{"weightPercent":{"minimum":0,"maximum":100,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":100,"type":"integer"}]}}}}}},"operationId":"patchApiV1ProjectsByProjectIdFunctionsByNameReleasesByRid"}},"/api/v1/projects/{projectId}/functions/{name}/releases/{rid}/promote":{"post":{"summary":"canary 转正：publishedVersion 切到 canary，发布单进 promoted 终态","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdFunctionsByNameReleasesByRidPromote"}},"/api/v1/projects/{projectId}/functions/{name}/releases/{rid}/rollback":{"post":{"summary":"撤销灰度：全量回 stable，publishedVersion 不变","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdFunctionsByNameReleasesByRidRollback"}},"/api/v1/projects/{projectId}/publish-saga":{"post":{"summary":"发布批次：一次发布多个函数并打一个 tag；失败则整批退回发布前状态","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"minItems":1,"type":"array","items":{"type":"object","required":["functionId"],"properties":{"functionId":{"minLength":1,"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["items"],"properties":{"items":{"minItems":1,"type":"array","items":{"type":"object","required":["functionId"],"properties":{"functionId":{"minLength":1,"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["items"],"properties":{"items":{"minItems":1,"type":"array","items":{"type":"object","required":["functionId"],"properties":{"functionId":{"minLength":1,"type":"string"}}}}}}}}},"operationId":"postApiV1ProjectsByProjectIdPublish-saga"}},"/api/v1/projects/{projectId}/publish-saga/{sagaId}/rollback":{"post":{"summary":"整批回滚：把该批次涉及的函数全部退回发布前版本（全部可回滚才动手）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sagaId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdPublish-sagaBySagaIdRollback"}},"/api/v1/projects/{projectId}/publish-sagas":{"get":{"summary":"发布批次列表（新→旧）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":200,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":200,"type":"integer"}]}}],"operationId":"getApiV1ProjectsByProjectIdPublish-sagas"}},"/api/v1/projects/{projectId}/publish-queue/submit":{"post":{"summary":"离线发布项回网入队（校验 + baseVersion 冲突预检，不产生线上版本）","tags":["functions"],"description":"需登录 + 项目空间 write 权限；payload.functionId 必须属于路径项目。批内存在冲突项时整批 409（逐项结果不连坐），冲突负载含线上当前内容（三条人工裁决路径的数据）。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["queueId","items"],"properties":{"queueId":{"type":"string"},"items":{"type":"array","items":{"type":"object","required":["intent","payload"],"properties":{"intent":{"type":"string"},"payload":{"type":"object","properties":{"functionId":{"type":"string"},"code":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"componentId":{"type":"string"},"content":{}}},"baseVersion":{"type":"number"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["queueId","items"],"properties":{"queueId":{"type":"string"},"items":{"type":"array","items":{"type":"object","required":["intent","payload"],"properties":{"intent":{"type":"string"},"payload":{"type":"object","properties":{"functionId":{"type":"string"},"code":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"componentId":{"type":"string"},"content":{}}},"baseVersion":{"type":"number"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["queueId","items"],"properties":{"queueId":{"type":"string"},"items":{"type":"array","items":{"type":"object","required":["intent","payload"],"properties":{"intent":{"type":"string"},"payload":{"type":"object","properties":{"functionId":{"type":"string"},"code":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"componentId":{"type":"string"},"content":{}}},"baseVersion":{"type":"number"}}}}}}}}},"operationId":"postApiV1ProjectsByProjectIdPublish-queueSubmit"}},"/api/v1/projects/{projectId}/publish-queue/replay":{"post":{"summary":"回网重放：对已入队项走真实发布流水线（幂等，重复重放不叠加版本）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["queueId"],"properties":{"queueId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["queueId"],"properties":{"queueId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["queueId"],"properties":{"queueId":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdPublish-queueReplay"}},"/api/v1/projects/{projectId}/publish-queue/resolve":{"post":{"summary":"冲突裁决三条人工路径：use-local（rebase 后发布）/ discard / load-cloud（返回线上当前内容）","tags":["functions"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["queueId","index","resolution"],"properties":{"queueId":{"type":"string"},"index":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"resolution":{"type":"string"},"code":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["queueId","index","resolution"],"properties":{"queueId":{"type":"string"},"index":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"resolution":{"type":"string"},"code":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["queueId","index","resolution"],"properties":{"queueId":{"type":"string"},"index":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"resolution":{"type":"string"},"code":{"type":"string"},"files":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}}}}}}},"operationId":"postApiV1ProjectsByProjectIdPublish-queueResolve"}},"/api/v1/functions/{id}/mcp-publish":{"post":{"summary":"把函数发布为 MCP Tool（请求体可带 toolName / description 覆盖），立即反映到该项目 tools/list","tags":["mcp"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1FunctionsByIdMcp-publish"},"delete":{"summary":"取消发布 MCP Tool（可带 ?tool= 指定别名，缺省按函数名），立即从该项目 tools/list 移除","tags":["mcp"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1FunctionsByIdMcp-publish"}},"/api/v1/projects/{projectId}/mcp/auth":{"get":{"summary":"查看项目 MCP 鉴权模式与有效 Key 列表","tags":["mcp"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdMcpAuth"}},"/api/v1/projects/{projectId}/mcp/auth/audit-logs":{"get":{"summary":"读取项目 MCP 审计日志（Key 操作 + 调用，脱敏，新→旧）","tags":["mcp"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdMcpAuthAudit-logs"}},"/api/v1/projects/{projectId}/mcp/auth/mode":{"put":{"summary":"设置项目 MCP 鉴权模式","tags":["mcp"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string"}}}}}},"operationId":"putApiV1ProjectsByProjectIdMcpAuthMode"}},"/api/v1/projects/{projectId}/mcp/auth/keys":{"post":{"summary":"签发项目 API Key（明文仅此一次返回；存储只为摘要）","tags":["mcp"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdMcpAuthKeys"}},"/api/v1/projects/{projectId}/mcp/auth/keys/{keyId}":{"delete":{"summary":"吊销项目 API Key（立即生效）","tags":["mcp"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdMcpAuthKeysByKeyId"}},"/api/v1/projects/{projectId}/mcp/auth/keys/{keyId}/rotate":{"post":{"summary":"轮换项目 API Key（旧 secret 立即失效）","tags":["mcp"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdMcpAuthKeysByKeyIdRotate"}},"/api/v1/realtime/ticket":{"post":{"summary":"换取实时通道握手票据（一次性，60s 过期；ticket 走 Sec-WebSocket-Protocol）","tags":["realtime"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string"}}}}}},"operationId":"postApiV1RealtimeTicket"}},"/api/v1/realtime/meter":{"get":{"summary":"查看项目实时通道计量（pushCount 按命中连接数累加；upstreamCount 为函数调用次数）","tags":["realtime"],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1RealtimeMeter"}},"/api/v1/realtime/meter/export":{"get":{"summary":"导出项目实时计量 NDJSON 行（本地文件 + 进程内 buffer）","tags":["realtime"],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1RealtimeMeterExport"}},"/api/v1/projects/{projectId}/hosting":{"get":{"summary":"获取静态托管配置与站点文件树（读 ≥ Viewer）","tags":["storage"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdHosting"},"put":{"summary":"更新静态托管配置（托管开关 / SPA 回退模式，写 ≥ Dev）","tags":["storage"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"spaMode":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"spaMode":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"spaMode":{"type":"boolean"}}}}}},"operationId":"putApiV1ProjectsByProjectIdHosting"}},"/api/v1/mcp":{"post":{"summary":"平台级 MCP 端点（JSON-RPC 2.0 / 2025-06-18）","tags":["mcp"],"operationId":"postApiV1Mcp"}},"/api/v1/mcp/keys":{"get":{"summary":"列出当前用户已签发的平台 API Key","tags":["mcp"],"operationId":"getApiV1McpKeys"},"post":{"summary":"签发平台 API Key（明文仅此一次返回；绑定当前用户；可带作用域白名单）","tags":["mcp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"scopes":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"string"}},"projects":{"type":"array","items":{"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"label":{"type":"string"},"scopes":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"string"}},"projects":{"type":"array","items":{"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"label":{"type":"string"},"scopes":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"string"}},"projects":{"type":"array","items":{"type":"string"}}}}}}}}},"operationId":"postApiV1McpKeys"}},"/api/v1/mcp/keys/{keyId}":{"delete":{"summary":"吊销平台 API Key（立即生效）","tags":["mcp"],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1McpKeysByKeyId"}},"/api/v1/mcp/market/listings":{"get":{"summary":"公开市场列表（仅已上架条目，无需登录）","tags":["mcp-market"],"operationId":"getApiV1McpMarketListings"},"post":{"summary":"上架申请（需登录，提交即进审核）","tags":["mcp-market"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","name","tools"],"properties":{"projectId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tools":{"type":"array","items":{"type":"object","required":["toolName","description"],"properties":{"toolName":{"type":"string"},"description":{"type":"string"}}}},"commissionBps":{"type":"number"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["projectId","name","tools"],"properties":{"projectId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tools":{"type":"array","items":{"type":"object","required":["toolName","description"],"properties":{"toolName":{"type":"string"},"description":{"type":"string"}}}},"commissionBps":{"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["projectId","name","tools"],"properties":{"projectId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tools":{"type":"array","items":{"type":"object","required":["toolName","description"],"properties":{"toolName":{"type":"string"},"description":{"type":"string"}}}},"commissionBps":{"type":"number"}}}}}},"operationId":"postApiV1McpMarketListings"}},"/api/v1/mcp/market/listings/{id}":{"get":{"summary":"上架条目详情（无需登录）","tags":["mcp-market"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1McpMarketListingsById"}},"/api/v1/mcp/market/listings/mine":{"get":{"summary":"我的上架条目（需登录）","tags":["mcp-market"],"operationId":"getApiV1McpMarketListingsMine"}},"/api/v1/mcp/market/listings/{id}/unlist":{"post":{"summary":"下架上架条目（需登录且为上架方）","tags":["mcp-market"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1McpMarketListingsByIdUnlist"}},"/api/v1/mcp/market/listings/{id}/installs":{"get":{"summary":"某上架条目的安装列表（需登录且为上架方）","tags":["mcp-market"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1McpMarketListingsByIdInstalls"}},"/api/v1/mcp/market/listings/{id}/install":{"post":{"summary":"一键接入（签发专用 API Key，明文一次性返回）","tags":["mcp-market"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1McpMarketListingsByIdInstall"}},"/api/v1/mcp/market/installs/mine":{"get":{"summary":"我的安装记录（需登录）","tags":["mcp-market"],"operationId":"getApiV1McpMarketInstallsMine"}},"/api/v1/mcp/market/installs/{id}/revoke":{"post":{"summary":"吊销安装（需登录且为订阅方，吊销即断流）","tags":["mcp-market"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1McpMarketInstallsByIdRevoke"}},"/api/v1/mcp/market/admin/listings":{"get":{"summary":"全部上架条目（含待审/已拒绝/已下架，需 super_admin）","tags":["mcp-market","admin"],"operationId":"getApiV1McpMarketAdminListings"}},"/api/v1/mcp/market/admin/listings/{id}/review":{"post":{"summary":"审核上架申请（需 super_admin）","tags":["mcp-market","admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["approved"],"properties":{"approved":{"type":"boolean"},"reviewNote":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["approved"],"properties":{"approved":{"type":"boolean"},"reviewNote":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["approved"],"properties":{"approved":{"type":"boolean"},"reviewNote":{"type":"string"}}}}}},"operationId":"postApiV1McpMarketAdminListingsByIdReview"}},"/api/v1/account/export":{"get":{"summary":"导出当前用户个人信息副本（个保法查阅复制权）","tags":["account"],"operationId":"getApiV1AccountExport"}},"/api/v1/setup/status":{"get":{"summary":"首次部署引导状态（只读，不含任何密钥）","tags":["setup"],"operationId":"getApiV1SetupStatus"}},"/api/v1/setup/check":{"post":{"operationId":"postApiV1SetupCheck"}},"/api/v1/setup/verify-token":{"post":{"operationId":"postApiV1SetupVerify-token"}},"/api/v1/setup/admin":{"post":{"operationId":"postApiV1SetupAdmin"}},"/api/v1/npm-relay/registry":{"get":{"summary":"npm 中继：白名单 registry 列表（限速）","tags":["platform","functions"],"operationId":"getApiV1Npm-relayRegistry"}},"/api/v1/npm-relay/package":{"get":{"summary":"npm 中继：解析包到可安装版本（含元数据缓存 + 限速）","tags":["platform","functions"],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"spec","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Npm-relayPackage"}},"/api/v1/npm-relay/tarball":{"get":{"summary":"npm 中继：取 tarball 二进制（含缓存 + 限速）","tags":["platform","functions"],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1Npm-relayTarball"}},"/api/v1/http-relay/fetch":{"post":{"summary":"HTTP 中继：代理浏览器终端 curl/wget 请求（SSRF 防护 + 限速 + 并发闸）","tags":["platform","functions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":4096,"type":"string"},"method":{"maxLength":16,"type":"string"},"headers":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"body":{"maxLength":1048576,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":4096,"type":"string"},"method":{"maxLength":16,"type":"string"},"headers":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"body":{"maxLength":1048576,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":4096,"type":"string"},"method":{"maxLength":16,"type":"string"},"headers":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"body":{"maxLength":1048576,"type":"string"}}}}}},"operationId":"postApiV1Http-relayFetch"}},"/api/v1/http-relay/stats":{"get":{"summary":"HTTP 中继聚合观测（跨访客标量，免登录只读；单实例进程内口径）","description":"只回跨全访客的聚合计数（累计 / 近一分钟请求与回传字节、拒绝与失败分类、当前与峰值并发），不含任何单用户、单项目或目标主机信息。","tags":["platform","functions"],"operationId":"getApiV1Http-relayStats"}},"/api/v1/projects/{projectId}/database":{"post":{"summary":"启动项目数据库（新建 201 / 停止后重新激活 200 / 运行中重复 409）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdDatabase"},"get":{"summary":"查询项目数据库状态与用量（体积 / 表数 / 行数）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDatabase"},"delete":{"summary":"停止项目数据库（连接关闭并标记；文件保留）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdDatabase"}},"/api/v1/projects/{projectId}/database/console":{"get":{"summary":"控制台概览（状态 / 用量 / 配额比例，用量卡片告警依据）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDatabaseConsole"}},"/api/v1/projects/{projectId}/database/console/tables":{"get":{"summary":"控制台表列表（含每表行数）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDatabaseConsoleTables"},"post":{"summary":"控制台新建表（DDL，含审计）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","columns"],"properties":{"name":{"type":"string"},"columns":{"type":"array","items":{"type":"object","required":["name","type","nullable"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"nullable":{"default":true,"type":"boolean"},"default":{},"unique":{"type":"boolean"},"index":{"type":"boolean"}}}},"owned":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","columns"],"properties":{"name":{"type":"string"},"columns":{"type":"array","items":{"type":"object","required":["name","type","nullable"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"nullable":{"default":true,"type":"boolean"},"default":{},"unique":{"type":"boolean"},"index":{"type":"boolean"}}}},"owned":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","columns"],"properties":{"name":{"type":"string"},"columns":{"type":"array","items":{"type":"object","required":["name","type","nullable"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"nullable":{"default":true,"type":"boolean"},"default":{},"unique":{"type":"boolean"},"index":{"type":"boolean"}}}},"owned":{"type":"boolean"}}}}}},"operationId":"postApiV1ProjectsByProjectIdDatabaseConsoleTables"}},"/api/v1/projects/{projectId}/database/console/tables/{table}":{"get":{"summary":"表结构自省（字段 / 索引 / 建表 DDL，不经系统表裸通道）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDatabaseConsoleTablesByTable"},"delete":{"summary":"删除表（DDL，含审计）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdDatabaseConsoleTablesByTable"}},"/api/v1/projects/{projectId}/database/console/tables/{table}/columns":{"post":{"summary":"新增字段（DDL，含审计）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","type","nullable"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"nullable":{"default":true,"type":"boolean"},"default":{},"unique":{"type":"boolean"},"index":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","type","nullable"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"nullable":{"default":true,"type":"boolean"},"default":{},"unique":{"type":"boolean"},"index":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","type","nullable"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"nullable":{"default":true,"type":"boolean"},"default":{},"unique":{"type":"boolean"},"index":{"type":"boolean"}}}}}},"operationId":"postApiV1ProjectsByProjectIdDatabaseConsoleTablesByTableColumns"}},"/api/v1/projects/{projectId}/database/console/tables/{table}/columns/{column}":{"delete":{"summary":"删除字段（DDL，含审计）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"column","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdDatabaseConsoleTablesByTableColumnsByColumn"}},"/api/v1/projects/{projectId}/database/console/tables/{table}/rows":{"get":{"summary":"数据网格分页查询（rowid 投影 + 筛选 + 排序，走受控只读通道）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDatabaseConsoleTablesByTableRows"},"post":{"summary":"数据网格新增行（走 builder 参数化插入）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","patternProperties":{"^(.*)$":{}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","patternProperties":{"^(.*)$":{}}}},"multipart/form-data":{"schema":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"operationId":"postApiV1ProjectsByProjectIdDatabaseConsoleTablesByTableRows"}},"/api/v1/projects/{projectId}/database/console/tables/{table}/rows/{rowid}":{"patch":{"summary":"数据网格行内编辑（按 rowid，走 builder 参数化更新）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowid","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","patternProperties":{"^(.*)$":{}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","patternProperties":{"^(.*)$":{}}}},"multipart/form-data":{"schema":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"operationId":"patchApiV1ProjectsByProjectIdDatabaseConsoleTablesByTableRowsByRowid"},"delete":{"summary":"数据网格删除行（按 rowid，走 builder 参数化删除）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowid","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdDatabaseConsoleTablesByTableRowsByRowid"}},"/api/v1/projects/{projectId}/database/console/audit":{"get":{"summary":"DDL 审计日志（最近 50 条）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDatabaseConsoleAudit"}},"/api/v1/projects/{projectId}/database/console/sql":{"post":{"summary":"SQL 控制台：边界内执行单条语句（含二次确认 / 截断 / 审计）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sql"],"properties":{"sql":{"type":"string"},"params":{"type":"array","items":{}},"confirmTable":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["sql"],"properties":{"sql":{"type":"string"},"params":{"type":"array","items":{}},"confirmTable":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["sql"],"properties":{"sql":{"type":"string"},"params":{"type":"array","items":{}},"confirmTable":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdDatabaseConsoleSql"}},"/api/v1/projects/{projectId}/database/snapshots":{"post":{"summary":"创建手动数据库快照（免费版 → 403 权益未开放）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdDatabaseSnapshots"},"get":{"summary":"列出项目数据库快照（按创建时间倒序）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdDatabaseSnapshots"}},"/api/v1/projects/{projectId}/database/snapshots/{snapshotId}/restore":{"post":{"summary":"整体还原数据库到快照时刻（付费档位；跨项目快照互不可见）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"snapshotId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdDatabaseSnapshotsBySnapshotIdRestore"}},"/api/v1/projects/{projectId}/database/rollback":{"post":{"summary":"时间点回滚到指定时刻（团队版；基于 __changes 变更流重放）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdDatabaseRollback"}},"/api/v1/projects/{projectId}/database/dev-reset":{"post":{"summary":"重置开发环境（删 dev 库 + 清 .env-dev/ 前缀对象；幂等，生产库与生产对象不受影响）","tags":["database"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdDatabaseDev-reset"}},"/api/v1/projects/{projectId}/files":{"post":{"summary":"上传文件（multipart；path 目标路径，visibility public|private；M1 单文件 ≤ 50MB）","tags":["storage"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdFiles"},"get":{"summary":"列出项目文件（按前缀过滤；private 附签名 URL；?environment=dev 看开发段）","tags":["storage"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"prefix","in":"query","required":false,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdFiles"}},"/api/v1/projects/{projectId}/files/summary":{"get":{"summary":"项目文件计数概要（count + totalBytes；不附签名 URL / 元数据，?environment=dev 看开发段）","tags":["storage"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdFilesSummary"}},"/api/v1/projects/{projectId}/files/{path}":{"get":{"summary":"下载文件（public 直连；private 需签名 URL）","tags":["storage"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}},{"name":"x-expires","in":"query","required":false,"schema":{"type":"string"}},{"name":"x-signature","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdFilesByPath"},"delete":{"summary":"删除文件（写 ≥ Dev；?environment=dev 删开发段）","tags":["storage"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdFilesByPath"}},"/api/v1/platform/metrics":{"get":{"summary":"平台公开聚合指标（免登录、只读，首页数据带数据源）","description":"仅返回跨全平台聚合后的标量（注册开发者数 / 本月函数调用累计 / 运行时长 / 健康态），不含单用户或单项目可识别数据；无真实出处的指标（P95 / SLA）恒为 null。","tags":["platform"],"operationId":"getApiV1PlatformMetrics"}},"/api/v1/gateway/tls-ask":{"get":{"operationId":"getApiV1GatewayTls-ask"}},"/api/v1/gateway/edge-desired-state":{"get":{"operationId":"getApiV1GatewayEdge-desired-state"}},"/api/v1/gateway/edge-report":{"post":{"summary":"边缘回写域名证书就绪位（幂等；接受默认子域与已校验自定义域）","tags":["gateway"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain","ready"],"properties":{"domain":{"type":"string"},"ready":{"type":"boolean"},"reason":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["domain","ready"],"properties":{"domain":{"type":"string"},"ready":{"type":"boolean"},"reason":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["domain","ready"],"properties":{"domain":{"type":"string"},"ready":{"type":"boolean"},"reason":{"type":"string"}}}}}},"operationId":"postApiV1GatewayEdge-report"}},"/api/v1/health":{"get":{"summary":"平台宿主运行时健康检查","description":"返回平台自身运行状态，供 e2e 与容器 healthcheck 使用。","tags":["platform"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"operationId":"getApiV1Health"}},"/api/v1/license":{"get":{"operationId":"getApiV1License"}},"/api/v1/license/identity":{"get":{"operationId":"getApiV1LicenseIdentity"}},"/api/v1/license/gating":{"get":{"operationId":"getApiV1LicenseGating"}},"/api/v1/license/activate-local":{"post":{"summary":"用激活码向授权商换取绑定本节点指纹的 License（需登录本节点控制台）","tags":["license"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","org"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"org":{"minLength":1,"maxLength":64,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["code","org"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"org":{"minLength":1,"maxLength":64,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["code","org"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"org":{"minLength":1,"maxLength":64,"type":"string"}}}}}},"operationId":"postApiV1LicenseActivate-local"}},"/api/v1/jobs":{"get":{"summary":"按项目列最近同类任务（刷新 / 跨设备恢复的读取口）","tags":["jobs"],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string"}},{"name":"projectId","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":20,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":20,"type":"integer"}]}}],"operationId":"getApiV1Jobs"},"post":{"summary":"创建长任务（排队）","tags":["jobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","steps"],"properties":{"kind":{"type":"string"},"payload":{},"steps":{"type":"array","items":{"type":"string"}},"maxAttempts":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["kind","steps"],"properties":{"kind":{"type":"string"},"payload":{},"steps":{"type":"array","items":{"type":"string"}},"maxAttempts":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["kind","steps"],"properties":{"kind":{"type":"string"},"payload":{},"steps":{"type":"array","items":{"type":"string"}},"maxAttempts":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}}}},"operationId":"postApiV1Jobs"}},"/api/v1/jobs/{id}":{"get":{"summary":"任务详情（含步骤流水）","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1JobsById"}},"/api/v1/jobs/{id}/start":{"post":{"summary":"开始执行任务（立即返回，推进交后台）","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1JobsByIdStart"}},"/api/v1/jobs/{id}/suspend":{"post":{"summary":"挂起任务（记录原因）","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string"},"runAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string"},"runAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string"},"runAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}}}}}},"operationId":"postApiV1JobsByIdSuspend"}},"/api/v1/jobs/{id}/resume":{"post":{"summary":"恢复被挂起的任务（立即返回，推进交后台）","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1JobsByIdResume"}},"/api/v1/jobs/{id}/retry":{"post":{"summary":"重试任务（从当前轮继续，立即返回）","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1JobsByIdRetry"}},"/api/v1/jobs/{id}/cancel":{"post":{"summary":"取消任务","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"operationId":"postApiV1JobsByIdCancel"}},"/api/v1/notifications":{"get":{"summary":"列出当前用户的站内通知（limit 缺省 50，钳制 1~200；含 unreadTotal）","tags":["notify"],"parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Notifications"}},"/api/v1/notifications/invite-guide/qr":{"get":{"summary":"邀请码引导弹窗的服务号二维码（未接服务号时 available=false）","tags":["notify"],"operationId":"getApiV1NotificationsInvite-guideQr"}},"/api/v1/notifications/{id}/read":{"patch":{"summary":"标记通知为已读","tags":["notify"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"patchApiV1NotificationsByIdRead"}},"/api/v1/announcements":{"get":{"summary":"我的公告列表（收件人视角，创建时间倒序）","tags":["announce"],"operationId":"getApiV1Announcements"}},"/api/v1/announcements/{id}":{"get":{"summary":"公告详情（仅收件人可读）","tags":["announce"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1AnnouncementsById"}},"/api/v1/announcements/{id}/claim":{"post":{"summary":"领取公告积分（同人一次；过 expiresAt 后 410）","tags":["announce"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AnnouncementsByIdClaim"}},"/api/v1/admin/announcements":{"get":{"summary":"公告管理列表（含收件/领取统计）","tags":["announce"],"operationId":"getApiV1AdminAnnouncements"},"post":{"summary":"发布公告（排除名单 + 邮件开关 + 可选积分奖励）","tags":["announce"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","body"],"properties":{"title":{"minLength":1,"maxLength":100,"type":"string"},"body":{"minLength":1,"maxLength":5000,"type":"string"},"excludedUserIds":{"default":[],"type":"array","items":{"type":"string"}},"emailEnabled":{"default":false,"type":"boolean"},"reward":{"anyOf":[{"type":"object","required":["points"],"properties":{"points":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"label":{"maxLength":30,"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["title","body"],"properties":{"title":{"minLength":1,"maxLength":100,"type":"string"},"body":{"minLength":1,"maxLength":5000,"type":"string"},"excludedUserIds":{"default":[],"type":"array","items":{"type":"string"}},"emailEnabled":{"default":false,"type":"boolean"},"reward":{"anyOf":[{"type":"object","required":["points"],"properties":{"points":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"label":{"maxLength":30,"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["title","body"],"properties":{"title":{"minLength":1,"maxLength":100,"type":"string"},"body":{"minLength":1,"maxLength":5000,"type":"string"},"excludedUserIds":{"default":[],"type":"array","items":{"type":"string"}},"emailEnabled":{"default":false,"type":"boolean"},"reward":{"anyOf":[{"type":"object","required":["points"],"properties":{"points":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"label":{"maxLength":30,"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]}}}}}},"operationId":"postApiV1AdminAnnouncements"}},"/api/v1/admin/announcements/{id}":{"delete":{"summary":"下线公告（软删；名单与领取记录保留）","tags":["announce"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1AdminAnnouncementsById"}},"/api/v1/templates":{"get":{"summary":"已启用预设模板清单","tags":["src"],"operationId":"getApiV1Templates"}},"/api/v1/templates/{code}/package":{"get":{"summary":"下载模板包（脚手架文件集）","tags":["src"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1TemplatesByCodePackage"},"put":{"summary":"上传模板包（管理面，需登录）","tags":["src"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","version","manifest","files"],"properties":{"code":{"type":"string"},"version":{"type":"string"},"manifest":{},"files":{"type":"array","items":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string"},"content":{"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["code","version","manifest","files"],"properties":{"code":{"type":"string"},"version":{"type":"string"},"manifest":{},"files":{"type":"array","items":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string"},"content":{"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["code","version","manifest","files"],"properties":{"code":{"type":"string"},"version":{"type":"string"},"manifest":{},"files":{"type":"array","items":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string"},"content":{"type":"string"}}}}}}}}},"operationId":"putApiV1TemplatesByCodePackage"}},"/api/v1/projects/{projectId}/gitsync":{"get":{"summary":"读取项目 Git 绑定（源码是否由外部仓库托管）","tags":["src"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdGitsync"},"delete":{"summary":"解绑项目 Git 仓库（confirmed=true 二次确认）","tags":["src"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"confirmed","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1ProjectsByProjectIdGitsync"}},"/api/v1/projects/{projectId}/gitsync/bind":{"post":{"summary":"绑定/更新项目 Git 仓库（浅层 clone 校验连通性，支持私有仓库凭据）","tags":["src"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"syncEnabled":{"type":"boolean"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"syncEnabled":{"type":"boolean"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["repoUrl","branch"],"properties":{"repoUrl":{"minLength":1,"type":"string"},"branch":{"minLength":1,"type":"string"},"functionRoot":{"type":"string"},"syncEnabled":{"type":"boolean"},"authUsername":{"type":"string"},"authToken":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdGitsyncBind"}},"/api/v1/gitsync/webhook":{"post":{"summary":"Git push webhook（签名校验后触发同步/部署）","tags":["src"],"operationId":"postApiV1GitsyncWebhook"}},"/api/v1/projects/{projectId}/gitsync/sync":{"post":{"summary":"手动触发一次 Git 同步 + 自动部署（本地无 webhook 可达时用）","tags":["src"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdGitsyncSync"}},"/api/v1/ai/provider":{"put":{"summary":"设置 / 清空本人 AI 模型配置（用户级；缺任一要素即清空）","tags":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiHost":{"type":"string"},"apiKey":{"type":"string"},"model":{"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"apiHost":{"type":"string"},"apiKey":{"type":"string"},"model":{"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"apiHost":{"type":"string"},"apiKey":{"type":"string"},"model":{"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"operationId":"putApiV1AiProvider"},"get":{"summary":"本人 AI 模型状态（host / model + key 掩码，无明文 key；用户级）","tags":["ai"],"operationId":"getApiV1AiProvider"}},"/api/v1/ai/models":{"get":{"summary":"列出本人多模型档案（无明文 key）","tags":["ai"],"operationId":"getApiV1AiModels"},"post":{"summary":"新增一条模型档案（首条自动生效，其余需 activate 切换）","tags":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["apiHost","model"],"properties":{"label":{"type":"string"},"apiHost":{"minLength":1,"type":"string"},"apiKey":{"type":"string"},"model":{"minLength":1,"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["apiHost","model"],"properties":{"label":{"type":"string"},"apiHost":{"minLength":1,"type":"string"},"apiKey":{"type":"string"},"model":{"minLength":1,"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["apiHost","model"],"properties":{"label":{"type":"string"},"apiHost":{"minLength":1,"type":"string"},"apiKey":{"type":"string"},"model":{"minLength":1,"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"}}}}}},"operationId":"postApiV1AiModels"}},"/api/v1/ai/models/{id}":{"put":{"summary":"更新一条模型档案（apiKey 留空 = 沿用原 key）","tags":["ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["apiHost","model"],"properties":{"label":{"type":"string"},"apiHost":{"minLength":1,"type":"string"},"apiKey":{"type":"string"},"model":{"minLength":1,"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["apiHost","model"],"properties":{"label":{"type":"string"},"apiHost":{"minLength":1,"type":"string"},"apiKey":{"type":"string"},"model":{"minLength":1,"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["apiHost","model"],"properties":{"label":{"type":"string"},"apiHost":{"minLength":1,"type":"string"},"apiKey":{"type":"string"},"model":{"minLength":1,"type":"string"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsVision":{"type":"boolean"}}}}}},"operationId":"putApiV1AiModelsById"},"delete":{"summary":"删除一条模型档案（删当前生效档案时自动切到最近一条）","tags":["ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1AiModelsById"}},"/api/v1/ai/models/{id}/activate":{"post":{"summary":"切换当前生效模型档案","tags":["ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AiModelsByIdActivate"}},"/api/v1/ai/models/test":{"post":{"summary":"测试一条模型配置的连通性（保存前探测；结果 200 内含 ok/message）","tags":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["profileId","apiHost","apiKey","model"],"properties":{"profileId":{"default":"","type":"string"},"apiHost":{"default":"","type":"string"},"apiKey":{"default":"","type":"string"},"model":{"default":"","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["profileId","apiHost","apiKey","model"],"properties":{"profileId":{"default":"","type":"string"},"apiHost":{"default":"","type":"string"},"apiKey":{"default":"","type":"string"},"model":{"default":"","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["profileId","apiHost","apiKey","model"],"properties":{"profileId":{"default":"","type":"string"},"apiHost":{"default":"","type":"string"},"apiKey":{"default":"","type":"string"},"model":{"default":"","type":"string"}}}}}},"operationId":"postApiV1AiModelsTest"}},"/api/v1/ai/usage/summary":{"get":{"summary":"本人 token 用量汇总（总量 / 按日 / 按模型，只读）","tags":["ai"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AiUsageSummary"}},"/api/v1/ai/usage/records":{"get":{"summary":"本人 token 用量明细（倒序分页，只读）","tags":["ai"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AiUsageRecords"}},"/api/v1/projects/{projectId}/ai/ide-turn":{"post":{"summary":"Web IDE 单回合推理代理（解密项目 AI 配置 → 调一次模型 → 回 content + toolCalls）","description":"无状态：不执行工具、不落库。工具的执行与结果回灌发生在浏览器（IDE 内核命令总线）。","tags":["ai"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messages","tools"],"properties":{"messages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"anyOf":[{"maxLength":16000,"type":"string"},{"minItems":1,"maxItems":8,"type":"array","items":{"anyOf":[{"type":"object","required":["type","text"],"properties":{"type":{"const":"text","type":"string"},"text":{"maxLength":16000,"type":"string"}}},{"type":"object","required":["type","image_url"],"properties":{"type":{"const":"image_url","type":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":1400000,"type":"string"}}}}}]}}]},"toolCallId":{"type":"string"},"toolCalls":{"type":"array","items":{"type":"object","required":["id","name","arguments"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"}}}}}}},"tools":{"maxItems":96,"type":"array","items":{"type":"object","required":["name","description","parameters"],"properties":{"name":{"minLength":1,"type":"string"},"description":{"type":"string"},"parameters":{"additionalProperties":true,"type":"object","properties":{}}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["messages","tools"],"properties":{"messages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"anyOf":[{"maxLength":16000,"type":"string"},{"minItems":1,"maxItems":8,"type":"array","items":{"anyOf":[{"type":"object","required":["type","text"],"properties":{"type":{"const":"text","type":"string"},"text":{"maxLength":16000,"type":"string"}}},{"type":"object","required":["type","image_url"],"properties":{"type":{"const":"image_url","type":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":1400000,"type":"string"}}}}}]}}]},"toolCallId":{"type":"string"},"toolCalls":{"type":"array","items":{"type":"object","required":["id","name","arguments"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"}}}}}}},"tools":{"maxItems":96,"type":"array","items":{"type":"object","required":["name","description","parameters"],"properties":{"name":{"minLength":1,"type":"string"},"description":{"type":"string"},"parameters":{"additionalProperties":true,"type":"object","properties":{}}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["messages","tools"],"properties":{"messages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"anyOf":[{"maxLength":16000,"type":"string"},{"minItems":1,"maxItems":8,"type":"array","items":{"anyOf":[{"type":"object","required":["type","text"],"properties":{"type":{"const":"text","type":"string"},"text":{"maxLength":16000,"type":"string"}}},{"type":"object","required":["type","image_url"],"properties":{"type":{"const":"image_url","type":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":1400000,"type":"string"}}}}}]}}]},"toolCallId":{"type":"string"},"toolCalls":{"type":"array","items":{"type":"object","required":["id","name","arguments"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"}}}}}}},"tools":{"maxItems":96,"type":"array","items":{"type":"object","required":["name","description","parameters"],"properties":{"name":{"minLength":1,"type":"string"},"description":{"type":"string"},"parameters":{"additionalProperties":true,"type":"object","properties":{}}}}}}}}}},"operationId":"postApiV1ProjectsByProjectIdAiIde-turn"}},"/api/v1/agent/chat":{"post":{"summary":"/agent 对话回合（LLM + 平台 MCP 工具编排，应答含逐步工具调用记录）","tags":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","messages"],"properties":{"projectId":{"minLength":1,"type":"string"},"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"minLength":1,"maxLength":4000,"type":"string"},{"minItems":1,"maxItems":8,"type":"array","items":{"anyOf":[{"type":"object","required":["type","text"],"properties":{"type":{"const":"text","type":"string"},"text":{"maxLength":4000,"type":"string"}}},{"type":"object","required":["type","image_url"],"properties":{"type":{"const":"image_url","type":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":1400000,"type":"string"}}}}}]}}]}}}},"widgets":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":64,"type":"string"}},"dbEnvironment":{"type":"string","enum":["dev","prod"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["projectId","messages"],"properties":{"projectId":{"minLength":1,"type":"string"},"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"minLength":1,"maxLength":4000,"type":"string"},{"minItems":1,"maxItems":8,"type":"array","items":{"anyOf":[{"type":"object","required":["type","text"],"properties":{"type":{"const":"text","type":"string"},"text":{"maxLength":4000,"type":"string"}}},{"type":"object","required":["type","image_url"],"properties":{"type":{"const":"image_url","type":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":1400000,"type":"string"}}}}}]}}]}}}},"widgets":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":64,"type":"string"}},"dbEnvironment":{"type":"string","enum":["dev","prod"]}}}},"multipart/form-data":{"schema":{"type":"object","required":["projectId","messages"],"properties":{"projectId":{"minLength":1,"type":"string"},"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"minLength":1,"maxLength":4000,"type":"string"},{"minItems":1,"maxItems":8,"type":"array","items":{"anyOf":[{"type":"object","required":["type","text"],"properties":{"type":{"const":"text","type":"string"},"text":{"maxLength":4000,"type":"string"}}},{"type":"object","required":["type","image_url"],"properties":{"type":{"const":"image_url","type":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":1400000,"type":"string"}}}}}]}}]}}}},"widgets":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":64,"type":"string"}},"dbEnvironment":{"type":"string","enum":["dev","prod"]}}}}}},"operationId":"postApiV1AgentChat"}},"/api/v1/projects/generate":{"post":{"summary":"AI 生成项目脚手架（模板命中走确定性模板，否则驱动 agent-chat 首轮生成）","tags":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"minLength":1,"type":"string"},"templateId":{"minLength":1,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"minLength":1,"type":"string"},"templateId":{"minLength":1,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"minLength":1,"type":"string"},"templateId":{"minLength":1,"type":"string"}}}}}},"operationId":"postApiV1ProjectsGenerate"}},"/api/v1/tickets":{"get":{"summary":"工单列表（按项目 + 可选状态）","tags":["ai"],"parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","answered","expired","cancelled"]}}],"operationId":"getApiV1Tickets"},"post":{"summary":"创建工单（问卷形态；创作模式拍板通道）","tags":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","type","question"],"properties":{"projectId":{"type":"string"},"type":{"type":"string"},"question":{"type":"string"},"fields":{}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["projectId","type","question"],"properties":{"projectId":{"type":"string"},"type":{"type":"string"},"question":{"type":"string"},"fields":{}}}},"multipart/form-data":{"schema":{"type":"object","required":["projectId","type","question"],"properties":{"projectId":{"type":"string"},"type":{"type":"string"},"question":{"type":"string"},"fields":{}}}}}},"operationId":"postApiV1Tickets"}},"/api/v1/tickets/{id}":{"get":{"summary":"工单详情（结构化 fields）","tags":["ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1TicketsById"}},"/api/v1/tickets/{id}/answer":{"post":{"summary":"填答工单（结构化答复）→ answered + 可选恢复 JOB","tags":["ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["values"],"properties":{"values":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["values"],"properties":{"values":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["values"],"properties":{"values":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}},"operationId":"postApiV1TicketsByIdAnswer"}},"/api/v1/snapshots":{"post":{"summary":"导出项目快照（zip + manifest，存对象存储）","tags":["src"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"minLength":1,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"minLength":1,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"minLength":1,"type":"string"}}}}}},"operationId":"postApiV1Snapshots"}},"/api/v1/snapshots/restore":{"post":{"summary":"恢复快照（覆盖当前项目 / 另存为新项目，可含数据库重放）","tags":["src"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["snapshotId","strategy"],"properties":{"snapshotId":{"minLength":1,"type":"string"},"strategy":{"type":"string","enum":["overwrite","new-project"]},"newProjectName":{"type":"string"},"newProjectSlug":{"type":"string"},"restoreDatabase":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["snapshotId","strategy"],"properties":{"snapshotId":{"minLength":1,"type":"string"},"strategy":{"type":"string","enum":["overwrite","new-project"]},"newProjectName":{"type":"string"},"newProjectSlug":{"type":"string"},"restoreDatabase":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["snapshotId","strategy"],"properties":{"snapshotId":{"minLength":1,"type":"string"},"strategy":{"type":"string","enum":["overwrite","new-project"]},"newProjectName":{"type":"string"},"newProjectSlug":{"type":"string"},"restoreDatabase":{"type":"boolean"}}}}}},"operationId":"postApiV1SnapshotsRestore"}},"/api/v1/projects/{projectId}/snapshots":{"get":{"summary":"项目快照列表（导出时间倒序）","tags":["src"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdSnapshots"}},"/api/v1/projects/{projectId}/export":{"post":{"summary":"触发应用导出（长任务，立即返回 job）","tags":["appexport"],"description":"需项目所属空间 manage 权限。withData=true 时带数据库行数据；源码默认随包导出，withoutSource=true 出纯产物包。返回体 progress 为 0~100 的整数百分比。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"withData":{"type":"boolean"},"withSource":{"type":"boolean"},"withoutSource":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"withData":{"type":"boolean"},"withSource":{"type":"boolean"},"withoutSource":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"withData":{"type":"boolean"},"withSource":{"type":"boolean"},"withoutSource":{"type":"boolean"}}}}}},"operationId":"postApiV1ProjectsByProjectIdExport"}},"/api/v1/exports/{jobId}":{"get":{"summary":"导出任务进度（read 权限，按项目所属空间判定）","tags":["appexport"],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ExportsByJobId"}},"/api/v1/exports/{jobId}/download":{"get":{"summary":"导出产物签名下载 URL（15 分钟有效）","tags":["appexport"],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ExportsByJobIdDownload"}},"/api/v1/projects/{projectId}/app-packaging":{"get":{"summary":"读取项目当前打包配置与 manifest app 段（从未配置过返回 packaging: null）","tags":["appbuild"],"description":"返回值只读：配置版本行不可变，改配置请 PUT 一份新配置（产生新版本行）。packaging.build 为该版本产出离线包后的绑定信息，未产出为 null。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdApp-packaging"},"put":{"summary":"保存打包配置（产生不可变新版本；同配置重复保存幂等）","tags":["appbuild"],"description":"需项目所属空间 manage 权限。离线函数白名单默认空（未列出的函数离线态不可执行）；权限声明默认空（未声明即不可用）；预置资源默认不含。未知字段一律 400，不静默丢弃。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","properties":{"appName":{"maxLength":64,"type":"string"},"scheme":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"runtimePolicy":{"type":"string","enum":["online","offline","offline_only"]},"targetPlatforms":{"type":"array","items":{"type":"string","enum":["ios","android","macos","windows","linux"]}},"offlineFunctions":{"type":"array","items":{"type":"string"}},"baselineTables":{"type":"array","items":{"type":"string"}},"presetResources":{"type":"array","items":{"type":"string"}},"permissions":{"type":"array","items":{"type":"string"}}}}},"application/x-www-form-urlencoded":{"schema":{"additionalProperties":true,"type":"object","properties":{"appName":{"maxLength":64,"type":"string"},"scheme":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"runtimePolicy":{"type":"string","enum":["online","offline","offline_only"]},"targetPlatforms":{"type":"array","items":{"type":"string","enum":["ios","android","macos","windows","linux"]}},"offlineFunctions":{"type":"array","items":{"type":"string"}},"baselineTables":{"type":"array","items":{"type":"string"}},"presetResources":{"type":"array","items":{"type":"string"}},"permissions":{"type":"array","items":{"type":"string"}}}}},"multipart/form-data":{"schema":{"additionalProperties":true,"type":"object","properties":{"appName":{"maxLength":64,"type":"string"},"scheme":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"runtimePolicy":{"type":"string","enum":["online","offline","offline_only"]},"targetPlatforms":{"type":"array","items":{"type":"string","enum":["ios","android","macos","windows","linux"]}},"offlineFunctions":{"type":"array","items":{"type":"string"}},"baselineTables":{"type":"array","items":{"type":"string"}},"presetResources":{"type":"array","items":{"type":"string"}},"permissions":{"type":"array","items":{"type":"string"}}}}}}},"operationId":"putApiV1ProjectsByProjectIdApp-packaging"}},"/api/v1/projects/{projectId}/app-packaging/versions":{"get":{"summary":"打包配置版本历史（版本号降序，含离线包产出绑定）","tags":["appbuild"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdApp-packagingVersions"}},"/api/v1/projects/{projectId}/app-installations":{"post":{"summary":"签发安装身份（首次启动换取 ownerKey 与恢复码）","tags":["appbuild"],"description":"ownerKey 与恢复码均为高熵凭据，**明文只在本响应里出现一次**（服务端只存摘要）。ownerKey 存设备 Keychain / Keystore；恢复码请提示用户导出保存，用于重装 / 换机认领同一分区。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","required":["platform"],"properties":{"platform":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"additionalProperties":true,"type":"object","required":["platform"],"properties":{"platform":{"type":"string"}}}},"multipart/form-data":{"schema":{"additionalProperties":true,"type":"object","required":["platform"],"properties":{"platform":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdApp-installations"},"get":{"summary":"项目安装清单（排障与配额计量；不含任何明文凭据）","tags":["appbuild"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdApp-installations"}},"/api/v1/projects/{projectId}/app-installations/recover":{"post":{"summary":"用恢复码换发凭据（重装 / 换机认领同一数据分区）","tags":["appbuild"],"description":"换发后旧 ownerKey 与旧恢复码同时失效，同一安装的数据分区原样交接（含变更流位点）。恢复码校验不通过一律 401，不区分「安装不存在」与「码写错」。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","required":["recoveryCode"],"properties":{"recoveryCode":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"additionalProperties":true,"type":"object","required":["recoveryCode"],"properties":{"recoveryCode":{"type":"string"}}}},"multipart/form-data":{"schema":{"additionalProperties":true,"type":"object","required":["recoveryCode"],"properties":{"recoveryCode":{"type":"string"}}}}}},"operationId":"postApiV1ProjectsByProjectIdApp-installationsRecover"}},"/api/v1/projects/{projectId}/app-installations/{installationId}/revoke":{"post":{"summary":"吊销安装（该 ownerKey 的同步端点此后一律拒绝）","tags":["appbuild"],"description":"需项目所属空间 manage 权限。吊销不删除数据：分区行仍留在项目库，需人工确认后再清理。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdApp-installationsByInstallationIdRevoke"}},"/api/v1/projects/{projectId}/app-sync/upstream":{"post":{"summary":"上报 outbox 批次（整批原子应用；失败即整批回滚且不推进 acked_seq）","tags":["appbuild"],"description":"需 `Authorization: Bearer <ownerKey>`。批次内 `seq` 必须严格递增且落在已确认位点之后；整批要么全生效要么全不生效，失败响应给出 `failedSeq` 与可操作原因。行的 `__owner_key` 由服务端按凭据盖章，载荷里的同名列不被采信。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","properties":{"batchId":{"type":"string"},"entries":{"type":"array","items":{"additionalProperties":true,"type":"object","properties":{"seq":{"type":"number"},"table":{"type":"string"},"pk":{"type":"string"},"op":{"type":"string"},"txId":{"anyOf":[{"type":"string"},{"type":"null"}]},"before":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{}},{"type":"null"}]},"after":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{}},{"type":"null"}]}}}}}}},"application/x-www-form-urlencoded":{"schema":{"additionalProperties":true,"type":"object","properties":{"batchId":{"type":"string"},"entries":{"type":"array","items":{"additionalProperties":true,"type":"object","properties":{"seq":{"type":"number"},"table":{"type":"string"},"pk":{"type":"string"},"op":{"type":"string"},"txId":{"anyOf":[{"type":"string"},{"type":"null"}]},"before":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{}},{"type":"null"}]},"after":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{}},{"type":"null"}]}}}}}}},"multipart/form-data":{"schema":{"additionalProperties":true,"type":"object","properties":{"batchId":{"type":"string"},"entries":{"type":"array","items":{"additionalProperties":true,"type":"object","properties":{"seq":{"type":"number"},"table":{"type":"string"},"pk":{"type":"string"},"op":{"type":"string"},"txId":{"anyOf":[{"type":"string"},{"type":"null"}]},"before":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{}},{"type":"null"}]},"after":{"anyOf":[{"additionalProperties":true,"type":"object","properties":{}},{"type":"null"}]}}}}}}}}},"operationId":"postApiV1ProjectsByProjectIdApp-syncUpstream"}},"/api/v1/projects/{projectId}/app-sync/changes":{"get":{"summary":"拉取本 owner 的变更增量（含删除墓碑）","tags":["appbuild"],"description":"需 `Authorization: Bearer <ownerKey>`。`since` 为上一轮响应的 `cursor`（时间位点，epoch 毫秒；缺省 0 = 从最早开始）。只返回本 ownerKey 分区的行，且按毫秒组原子下发。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"number"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number"}}],"operationId":"getApiV1ProjectsByProjectIdApp-syncChanges"}},"/api/v1/projects/{projectId}/app-packaging/build":{"post":{"summary":"触发离线包构建（长任务，立即返回 job）","tags":["appbuild"],"description":"需项目所属空间 manage 权限。按当前打包配置（白名单/权限/baseline 表/预置资源）收集输入并执行可移植性检测 + 组装；失败时 job.status=failed 且 error 含违规详情。返回体 progress 为 0~100 的整数百分比。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1ProjectsByProjectIdApp-packagingBuild"}},"/api/v1/projects/{projectId}/app-packaging/builds/{jobId}":{"get":{"summary":"查询离线包构建进度","tags":["appbuild"],"description":"需项目所属空间 read 权限。job.status 为 pending/running/completed/failed。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdApp-packagingBuildsByJobId"}},"/api/v1/projects/{projectId}/app-packaging/builds/{jobId}/download":{"get":{"summary":"下载离线包（.adepack 签名 URL）","tags":["appbuild"],"description":"需项目所属空间 read 权限。仅构建成功后可下载；downloadUrl 15 分钟内有效。","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1ProjectsByProjectIdApp-packagingBuildsByJobIdDownload"}},"/api/v1/growth/invite/code":{"post":{"summary":"签发我的邀请码（幂等，每用户唯一一码，全局唯一、不过期）","tags":["growth"],"description":"重复调用返回同一个码。新用户注册时在 sign-up 请求体携带 `inviteCode` 即建立邀请关系（CORE-026）。","operationId":"postApiV1GrowthInviteCode"}},"/api/v1/growth/invite/list":{"get":{"summary":"我的邀请列表与上限进度（status: pending_bind / linked / rewarded）","tags":["growth"],"operationId":"getApiV1GrowthInviteList"}},"/api/v1/growth/points":{"get":{"summary":"我的积分余额与流水（发生时间倒序，分页；余额恒等于流水净额）","tags":["growth"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1GrowthPoints"}},"/api/v1/growth/redeem":{"post":{"summary":"积分兑换（functionCalls → 空间资源包；balance 见 redeem-options 可用性）","tags":["growth"],"description":"requestId 是幂等键：同一 requestId 重试只扣一次分、只发一次资源包。扣积分与发放资源包在同一事务内，失败整体回滚（不留半账）。","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channel","requestId","quantity"],"properties":{"channel":{"minLength":1,"type":"string"},"requestId":{"minLength":8,"maxLength":64,"type":"string"},"spaceId":{"minLength":1,"type":"string"},"quantity":{"type":"number"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["channel","requestId","quantity"],"properties":{"channel":{"minLength":1,"type":"string"},"requestId":{"minLength":8,"maxLength":64,"type":"string"},"spaceId":{"minLength":1,"type":"string"},"quantity":{"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["channel","requestId","quantity"],"properties":{"channel":{"minLength":1,"type":"string"},"requestId":{"minLength":8,"maxLength":64,"type":"string"},"spaceId":{"minLength":1,"type":"string"},"quantity":{"type":"number"}}}}}},"operationId":"postApiV1GrowthRedeem"}},"/api/v1/growth/redeem-options":{"get":{"summary":"兑换比例与通道可用性（配置为运行时真相源）","tags":["growth"],"operationId":"getApiV1GrowthRedeem-options"}},"/api/v1/wallet/balance":{"get":{"summary":"我的余额与流水（分；余额恒等于流水净额，只读自己）","tags":["wallet"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1WalletBalance"}},"/api/v1/vouchers/redeem":{"post":{"summary":"兑换码兑换积分（登录用户本人；同码重放返回首次结果）","tags":["voucher"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"captchaId":{"maxLength":128,"type":"string"},"captchaCode":{"maxLength":32,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"captchaId":{"maxLength":128,"type":"string"},"captchaCode":{"maxLength":32,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"captchaId":{"maxLength":128,"type":"string"},"captchaCode":{"maxLength":32,"type":"string"}}}}}},"operationId":"postApiV1VouchersRedeem"}},"/api/v1/vouchers/mine":{"get":{"summary":"我的卡密核销流水（掩码，不含明文码与密文）","tags":["voucher"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1VouchersMine"}},"/api/v1/vouchers/licenses":{"get":{"summary":"我的授权（激活码换取的 License，可重看授权键）","tags":["voucher"],"operationId":"getApiV1VouchersLicenses"}},"/api/v1/license/activate":{"post":{"summary":"用激活码换取绑定本节点指纹的 License 授权键（匿名，按 IP 限流）","tags":["license","voucher"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","org","fingerprint"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"org":{"minLength":1,"maxLength":64,"type":"string"},"fingerprint":{"minLength":1,"maxLength":128,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["code","org","fingerprint"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"org":{"minLength":1,"maxLength":64,"type":"string"},"fingerprint":{"minLength":1,"maxLength":128,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["code","org","fingerprint"],"properties":{"code":{"minLength":1,"maxLength":256,"type":"string"},"org":{"minLength":1,"maxLength":64,"type":"string"},"fingerprint":{"minLength":1,"maxLength":128,"type":"string"}}}}}},"operationId":"postApiV1LicenseActivate"}},"/api/v1/admin/vouchers/skus":{"get":{"summary":"卡密商品目录（权益参数；平台不定义售价）","tags":["admin","voucher"],"operationId":"getApiV1AdminVouchersSkus"}},"/api/v1/admin/vouchers/batches":{"post":{"summary":"新建卡密批次（明文码只在本次响应返回）","tags":["admin","voucher"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","issueMode","skuCode","channel","quantity"],"properties":{"kind":{"type":"string"},"issueMode":{"type":"string"},"skuCode":{"minLength":1,"type":"string"},"channel":{"minLength":1,"maxLength":32,"type":"string"},"channelRef":{"maxLength":128,"type":"string"},"quantity":{"type":"number"},"expiresAt":{"type":"string"},"note":{"maxLength":256,"type":"string"},"licenseOrg":{"maxLength":64,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["kind","issueMode","skuCode","channel","quantity"],"properties":{"kind":{"type":"string"},"issueMode":{"type":"string"},"skuCode":{"minLength":1,"type":"string"},"channel":{"minLength":1,"maxLength":32,"type":"string"},"channelRef":{"maxLength":128,"type":"string"},"quantity":{"type":"number"},"expiresAt":{"type":"string"},"note":{"maxLength":256,"type":"string"},"licenseOrg":{"maxLength":64,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["kind","issueMode","skuCode","channel","quantity"],"properties":{"kind":{"type":"string"},"issueMode":{"type":"string"},"skuCode":{"minLength":1,"type":"string"},"channel":{"minLength":1,"maxLength":32,"type":"string"},"channelRef":{"maxLength":128,"type":"string"},"quantity":{"type":"number"},"expiresAt":{"type":"string"},"note":{"maxLength":256,"type":"string"},"licenseOrg":{"maxLength":64,"type":"string"}}}}}},"operationId":"postApiV1AdminVouchersBatches"},"get":{"summary":"卡密批次列表（含统计）","tags":["admin","voucher"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AdminVouchersBatches"}},"/api/v1/admin/vouchers/batches/{id}/codes":{"get":{"summary":"批内卡密（掩码 + 状态，不含哈希与密文）","tags":["admin","voucher"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AdminVouchersBatchesByIdCodes"}},"/api/v1/admin/vouchers/batches/{id}/export":{"get":{"summary":"导出批次内未核销卡密（CSV，明文；必写审计）","tags":["admin","voucher"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1AdminVouchersBatchesByIdExport"}},"/api/v1/admin/vouchers/codes/{id}/void":{"post":{"summary":"作废单张未核销卡密","tags":["admin","voucher"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminVouchersCodesByIdVoid"}},"/api/v1/admin/vouchers/batches/{id}/void":{"post":{"summary":"批量作废本批未核销卡密","tags":["admin","voucher"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminVouchersBatchesByIdVoid"}},"/api/v1/admin/vouchers/redemptions":{"get":{"summary":"卡密核销流水（管理端查询）","tags":["admin","voucher"],"parameters":[{"name":"batchId","in":"query","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AdminVouchersRedemptions"}},"/api/v1/admin/vouchers/claim-channel":{"get":{"summary":"读渠道领取配置（含码池余量与已发数）；未配置时 channel 为 null","tags":["admin","voucher"],"parameters":[{"name":"channel","in":"query","required":true,"schema":{"minLength":1,"maxLength":32,"type":"string"}}],"operationId":"getApiV1AdminVouchersClaim-channel"},"put":{"summary":"设置渠道领取码池（选批次 / 启用暂停 / 自定义问候语；只接受兑换码批次，写审计）","tags":["admin","voucher"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channel","batchId","enabled"],"properties":{"channel":{"minLength":1,"maxLength":32,"type":"string"},"batchId":{"minLength":1,"maxLength":64,"type":"string"},"enabled":{"type":"boolean"},"greeting":{"maxLength":1000,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["channel","batchId","enabled"],"properties":{"channel":{"minLength":1,"maxLength":32,"type":"string"},"batchId":{"minLength":1,"maxLength":64,"type":"string"},"enabled":{"type":"boolean"},"greeting":{"maxLength":1000,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["channel","batchId","enabled"],"properties":{"channel":{"minLength":1,"maxLength":32,"type":"string"},"batchId":{"minLength":1,"maxLength":64,"type":"string"},"enabled":{"type":"boolean"},"greeting":{"maxLength":1000,"type":"string"}}}}}},"operationId":"putApiV1AdminVouchersClaim-channel"},"delete":{"summary":"下线渠道领取活动（软删配置，领取记录保留）","tags":["admin","voucher"],"parameters":[{"name":"channel","in":"query","required":true,"schema":{"minLength":1,"maxLength":32,"type":"string"}}],"operationId":"deleteApiV1AdminVouchersClaim-channel"}},"/api/v1/admin/vouchers/claims":{"get":{"summary":"渠道领取记录（掩码；查询谁在什么时候领走了哪一枚）","tags":["admin","voucher"],"parameters":[{"name":"channel","in":"query","required":false,"schema":{"type":"string"}},{"name":"batchId","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AdminVouchersClaims"}},"/api/v1/wechat/mp/callback":{"get":{"summary":"公众号服务器配置地址验证（明文/安全模式；验签通过则回显 echostr 明文）","tags":["wechat"],"parameters":[{"name":"signature","in":"query","required":false,"schema":{"type":"string"}},{"name":"timestamp","in":"query","required":false,"schema":{"type":"string"}},{"name":"nonce","in":"query","required":false,"schema":{"type":"string"}},{"name":"echostr","in":"query","required":false,"schema":{"type":"string"}},{"name":"msg_signature","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1WechatMpCallback"},"post":{"summary":"公众号消息 / 事件推送（关注事件自动回一枚兑换码）","tags":["wechat"],"parameters":[{"name":"signature","in":"query","required":false,"schema":{"type":"string"}},{"name":"timestamp","in":"query","required":false,"schema":{"type":"string"}},{"name":"nonce","in":"query","required":false,"schema":{"type":"string"}},{"name":"encrypt_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"msg_signature","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"postApiV1WechatMpCallback"}},"/api/v1/wechat/login/bound":{"get":{"summary":"当前会话账号是否已绑定微信服务号（登录态）","tags":["wechat"],"operationId":"getApiV1WechatLoginBound"}},"/api/v1/wechat/login/status":{"get":{"summary":"微信扫码登录能力探测（404 = 未启用，登录页不渲染微信按钮）","tags":["wechat"],"operationId":"getApiV1WechatLoginStatus"}},"/api/v1/wechat/login/qr":{"post":{"summary":"创建微信扫码登录会话（返回临时二维码）","tags":["wechat"],"operationId":"postApiV1WechatLoginQr"}},"/api/v1/wechat/login/session/{sessionId}":{"get":{"summary":"轮询扫码登录会话状态（已绑定用户首次轮询即登录）","tags":["wechat"],"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1WechatLoginSessionBySessionId"}},"/api/v1/wechat/login/complete":{"post":{"summary":"设置昵称头像并完成微信扫码登录（下发会话 Cookie）","tags":["wechat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sessionId","nickname"],"properties":{"sessionId":{"type":"string"},"nickname":{"maxLength":64,"type":"string"},"avatarUrl":{"nullable":true,"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["sessionId","nickname"],"properties":{"sessionId":{"type":"string"},"nickname":{"maxLength":64,"type":"string"},"avatarUrl":{"nullable":true,"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["sessionId","nickname"],"properties":{"sessionId":{"type":"string"},"nickname":{"maxLength":64,"type":"string"},"avatarUrl":{"nullable":true,"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}]}}}}}},"operationId":"postApiV1WechatLoginComplete"}},"/api/v1/admin/wechat/menu":{"get":{"summary":"公众号菜单对账（本地定义与微信侧现状并排；未提交过时 remote.buttons 为空数组）","tags":["admin","wechat"],"operationId":"getApiV1AdminWechatMenu"},"put":{"summary":"提交公众号菜单（覆盖微信侧现有菜单；先本地结构校验，写审计）","tags":["admin","wechat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["buttons"],"properties":{"buttons":{"maxItems":12,"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["buttons"],"properties":{"buttons":{"maxItems":12,"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["buttons"],"properties":{"buttons":{"maxItems":12,"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}}},"operationId":"putApiV1AdminWechatMenu"},"delete":{"summary":"删除公众号菜单（幂等；本地定义保留），写审计","tags":["admin","wechat"],"operationId":"deleteApiV1AdminWechatMenu"}},"/api/v1/admin/content/topics":{"post":{"summary":"录入选题（打分可选）","tags":["content"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":2,"maxLength":200,"type":"string"},"notes":{"maxLength":2000,"type":"string"},"source":{"maxLength":64,"type":"string"},"sourceRef":{"maxLength":500,"type":"string"},"demandScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"costFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"platformFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":2,"maxLength":200,"type":"string"},"notes":{"maxLength":2000,"type":"string"},"source":{"maxLength":64,"type":"string"},"sourceRef":{"maxLength":500,"type":"string"},"demandScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"costFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"platformFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":2,"maxLength":200,"type":"string"},"notes":{"maxLength":2000,"type":"string"},"source":{"maxLength":64,"type":"string"},"sourceRef":{"maxLength":500,"type":"string"},"demandScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"costFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"platformFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]}}}}}},"operationId":"postApiV1AdminContentTopics"},"get":{"summary":"选题列表（按可解释总分降序）","tags":["content"],"operationId":"getApiV1AdminContentTopics"}},"/api/v1/admin/content/topics/{id}":{"patch":{"summary":"选题打分（三轴整体更新）","tags":["content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"demandScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"costFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"platformFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"demandScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"costFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"platformFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"demandScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"costFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]},"platformFitScore":{"minimum":1,"maximum":5,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":5,"type":"integer"}]}}}}}},"operationId":"patchApiV1AdminContentTopicsById"}},"/api/v1/admin/content/topics/{id}/scripts/{platform}":{"post":{"summary":"生成分平台脚本（自动跑合规预检）","tags":["content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["channels","video","bilibili","xhs"]}}],"operationId":"postApiV1AdminContentTopicsByIdScriptsByPlatform"}},"/api/v1/admin/content/topics/{id}/scripts":{"get":{"summary":"某选题的全部平台脚本","tags":["content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1AdminContentTopicsByIdScripts"}},"/api/v1/admin/content/scripts/{id}/compliance":{"post":{"summary":"重跑合规预检（词表升级后）","tags":["content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminContentScriptsByIdCompliance"}},"/api/v1/admin/content/scripts/{id}/approve":{"post":{"summary":"人工确认脚本（approved 后机器生成不得覆盖）","tags":["content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminContentScriptsByIdApprove"}},"/api/v1/admin/content/queue":{"post":{"summary":"脚本入发布队列（闸门：最新合规预检必须 passed）","tags":["content"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scriptId"],"properties":{"scriptId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["scriptId"],"properties":{"scriptId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["scriptId"],"properties":{"scriptId":{"type":"string"}}}}}},"operationId":"postApiV1AdminContentQueue"},"get":{"summary":"在队列表","tags":["content"],"operationId":"getApiV1AdminContentQueue"}},"/api/v1/admin/content/queue/{id}/dequeue":{"post":{"summary":"出队（人工确认已发布 / 撤回）","tags":["content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminContentQueueByIdDequeue"}},"/api/v1/wechat/binding":{"get":{"summary":"本人服务号绑定状态（未绑定时 bound:false）","tags":["wechat"],"operationId":"getApiV1WechatBinding"},"post":{"summary":"输入服务号下发的绑定码，完成 openid ↔ 当前账号绑定","tags":["wechat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":4,"maxLength":12,"pattern":"^[0-9]+$","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":4,"maxLength":12,"pattern":"^[0-9]+$","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":4,"maxLength":12,"pattern":"^[0-9]+$","type":"string"}}}}}},"operationId":"postApiV1WechatBinding"},"delete":{"summary":"解绑本人的服务号微信（软删；解绑后可绑新号）","tags":["wechat"],"operationId":"deleteApiV1WechatBinding"}},"/api/v1/wechat/binding/notify":{"put":{"summary":"推送开关（站内事件是否推送到服务号；默认关）","tags":["wechat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"operationId":"putApiV1WechatBindingNotify"}},"/api/v1/wechat/signup":{"post":{"summary":"微信内一键注册（ticket 即凭据；成功 Set-Cookie 登录）","tags":["wechat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ticket"],"properties":{"ticket":{"minLength":8,"maxLength":64,"type":"string"},"name":{"maxLength":64,"type":"string"},"email":{"maxLength":254,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["ticket"],"properties":{"ticket":{"minLength":8,"maxLength":64,"type":"string"},"name":{"maxLength":64,"type":"string"},"email":{"maxLength":254,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["ticket"],"properties":{"ticket":{"minLength":8,"maxLength":64,"type":"string"},"name":{"maxLength":64,"type":"string"},"email":{"maxLength":254,"type":"string"}}}}}},"operationId":"postApiV1WechatSignup"}},"/api/v1/wx/entry-ticket":{"get":{"summary":"站内签发 wx 入口 ticket（登录且已绑定）","tags":["wx"],"operationId":"getApiV1WxEntry-ticket"}},"/api/v1/wx/enter":{"post":{"summary":"一次性 ticket 换 wx 会话（Set-Cookie；未绑定回引导态）","tags":["wx"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ticket"],"properties":{"ticket":{"minLength":8,"maxLength":64,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["ticket"],"properties":{"ticket":{"minLength":8,"maxLength":64,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["ticket"],"properties":{"ticket":{"minLength":8,"maxLength":64,"type":"string"}}}}}},"operationId":"postApiV1WxEnter"}},"/api/v1/wx/projects":{"get":{"summary":"我的项目（wx 会话；轻量视图）","tags":["wx"],"operationId":"getApiV1WxProjects"}},"/api/v1/wx/projects/{id}/pause":{"post":{"summary":"暂停项目（网关访问闸）","tags":["wx"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1WxProjectsByIdPause"}},"/api/v1/wx/projects/{id}/resume":{"post":{"summary":"恢复项目","tags":["wx"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1WxProjectsByIdResume"}},"/api/v1/shop/setup/verify":{"get":{"operationId":"getApiV1ShopSetupVerify"}},"/api/v1/shop/callback":{"get":{"operationId":"getApiV1ShopCallback"},"post":{"operationId":"postApiV1ShopCallback"}},"/api/v1/admin/shop/maps":{"get":{"operationId":"getApiV1AdminShopMaps"},"post":{"summary":"shop-admin","tags":["shop-admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["productId","entitlementType","params"],"properties":{"productId":{"minLength":1,"maxLength":128,"type":"string"},"skuId":{"nullable":true,"anyOf":[{"maxLength":128,"type":"string"},{"type":"null"}]},"entitlementType":{"type":"string","enum":["points_voucher","site_template","source_access","license_voucher"]},"params":{"type":"object","patternProperties":{"^(.*)$":{}}},"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["productId","entitlementType","params"],"properties":{"productId":{"minLength":1,"maxLength":128,"type":"string"},"skuId":{"nullable":true,"anyOf":[{"maxLength":128,"type":"string"},{"type":"null"}]},"entitlementType":{"type":"string","enum":["points_voucher","site_template","source_access","license_voucher"]},"params":{"type":"object","patternProperties":{"^(.*)$":{}}},"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["productId","entitlementType","params"],"properties":{"productId":{"minLength":1,"maxLength":128,"type":"string"},"skuId":{"nullable":true,"anyOf":[{"maxLength":128,"type":"string"},{"type":"null"}]},"entitlementType":{"type":"string","enum":["points_voucher","site_template","source_access","license_voucher"]},"params":{"type":"object","patternProperties":{"^(.*)$":{}}},"enabled":{"type":"boolean"}}}}}},"operationId":"postApiV1AdminShopMaps"}},"/api/v1/admin/shop/maps/{id}":{"patch":{"summary":"shop-admin","tags":["shop-admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entitlementType":{"type":"string","enum":["points_voucher","site_template","source_access","license_voucher"]},"params":{"type":"object","patternProperties":{"^(.*)$":{}}},"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"entitlementType":{"type":"string","enum":["points_voucher","site_template","source_access","license_voucher"]},"params":{"type":"object","patternProperties":{"^(.*)$":{}}},"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"entitlementType":{"type":"string","enum":["points_voucher","site_template","source_access","license_voucher"]},"params":{"type":"object","patternProperties":{"^(.*)$":{}}},"enabled":{"type":"boolean"}}}}}},"operationId":"patchApiV1AdminShopMapsById"},"delete":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1AdminShopMapsById"}},"/api/v1/admin/shop/fulfillments":{"get":{"operationId":"getApiV1AdminShopFulfillments"}},"/api/v1/admin/shop/fulfillments/{id}/transition":{"post":{"summary":"shop-admin","tags":["shop-admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string"},"reason":{"maxLength":500,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string"},"reason":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string"},"reason":{"maxLength":500,"type":"string"}}}}}},"operationId":"postApiV1AdminShopFulfillmentsByIdTransition"}},"/api/v1/shop/setup/start":{"post":{"summary":"三步向导提交（凭一次性 ticket）","tags":["shop-setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["siteName","templateCode"],"properties":{"siteName":{"minLength":1,"maxLength":60,"type":"string"},"templateCode":{"maxLength":64,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["siteName","templateCode"],"properties":{"siteName":{"minLength":1,"maxLength":60,"type":"string"},"templateCode":{"maxLength":64,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["siteName","templateCode"],"properties":{"siteName":{"minLength":1,"maxLength":60,"type":"string"},"templateCode":{"maxLength":64,"type":"string"}}}}}},"operationId":"postApiV1ShopSetupStart"}},"/api/v1/shop/setup/delivery":{"get":{"summary":"交付页数据（轮询进度 + 四件套）","tags":["shop-setup"],"operationId":"getApiV1ShopSetupDelivery"}},"/api/v1/shop/setup/retry":{"post":{"summary":"失败重试（清半成品 + 新任务）","tags":["shop-setup"],"operationId":"postApiV1ShopSetupRetry"}},"/api/v1/admin/attr/dashboard":{"get":{"summary":"增长看板（ATTR-004）","tags":["attr"],"parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AdminAttrDashboard"}},"/api/v1/admin/attr/channels":{"get":{"summary":"渠道码列表（ATTR-002）","tags":["attr"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}},{"name":"enabled","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AdminAttrChannels"},"post":{"summary":"登记渠道码（ATTR-002）","tags":["attr"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scene","platform"],"properties":{"scene":{"minLength":1,"maxLength":64,"type":"string"},"platform":{"minLength":1,"maxLength":32,"type":"string"},"note":{"maxLength":500,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["scene","platform"],"properties":{"scene":{"minLength":1,"maxLength":64,"type":"string"},"platform":{"minLength":1,"maxLength":32,"type":"string"},"note":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["scene","platform"],"properties":{"scene":{"minLength":1,"maxLength":64,"type":"string"},"platform":{"minLength":1,"maxLength":32,"type":"string"},"note":{"maxLength":500,"type":"string"}}}}}},"operationId":"postApiV1AdminAttrChannels"}},"/api/v1/admin/attr/channels/{id}":{"patch":{"summary":"停用 / 启用渠道码（ATTR-002）","tags":["attr"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"operationId":"patchApiV1AdminAttrChannelsById"}},"/api/v1/admin/attr/channels/{scene}/qr":{"post":{"summary":"生成渠道永久二维码（ATTR-002）","tags":["attr"],"parameters":[{"name":"scene","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminAttrChannelsBySceneQr"}},"/api/v1/attr/landing/{scene}":{"get":{"summary":"短链落地数据（ATTR-003，公开）","tags":["attr"],"parameters":[{"name":"scene","in":"path","required":true,"schema":{"minLength":1,"maxLength":64,"type":"string"}}],"operationId":"getApiV1AttrLandingByScene"}},"/api/v1/marketplace":{"get":{"summary":"项目市场公开列表（q 搜索 / tags 过滤 / sort=newest|likes）","tags":["marketplace"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"tags","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Marketplace"},"post":{"summary":"上架/更新我的项目分享（同一项目幂等更新）","tags":["marketplace"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","title"],"properties":{"projectId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"forkPrice":{"type":"number"},"downloadPrice":{"type":"number"},"forkWithEnv":{"type":"boolean"},"sourcePublic":{"type":"boolean"},"status":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["projectId","title"],"properties":{"projectId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"forkPrice":{"type":"number"},"downloadPrice":{"type":"number"},"forkWithEnv":{"type":"boolean"},"sourcePublic":{"type":"boolean"},"status":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["projectId","title"],"properties":{"projectId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"forkPrice":{"type":"number"},"downloadPrice":{"type":"number"},"forkWithEnv":{"type":"boolean"},"sourcePublic":{"type":"boolean"},"status":{"type":"string"}}}}}},"operationId":"postApiV1Marketplace"}},"/api/v1/marketplace/mine":{"get":{"summary":"我的上架列表（含已下架）","tags":["marketplace"],"operationId":"getApiV1MarketplaceMine"}},"/api/v1/marketplace/{id}":{"get":{"summary":"市场条目详情（作者、积分价、互动状态）","tags":["marketplace"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1MarketplaceById"}},"/api/v1/marketplace/{id}/preview":{"get":{"summary":"预览可用性（不 Fork 直接看运行效果；已发布站点 → IDE 草稿产物 三层回落）","tags":["marketplace"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1MarketplaceByIdPreview"}},"/api/v1/marketplace/{id}/source":{"get":{"summary":"只读源码树（作者逐条授权公开；未授权回 open:false 且不下发路径）","tags":["marketplace"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1MarketplaceByIdSource"}},"/api/v1/marketplace/{id}/source/file":{"get":{"summary":"只读单文件内容（path 必须命中文件树；白名单为仓库真实行，不做路径拼接）","tags":["marketplace"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1MarketplaceByIdSourceFile"}},"/api/v1/marketplace/{id}/like":{"post":{"summary":"点赞 / 取消点赞（toggle）","tags":["marketplace"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1MarketplaceByIdLike"}},"/api/v1/marketplace/{id}/fork":{"post":{"summary":"Fork：扣积分（>0 时）→ 深拷贝项目到我的空间","tags":["marketplace"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1MarketplaceByIdFork"}},"/api/v1/marketplace/{id}/download":{"post":{"summary":"下载源码包（扣积分 >0 时）→ 签名 URL（10 分钟有效）","tags":["marketplace"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1MarketplaceByIdDownload"}},"/api/v1/admin/marketplace/{id}/template":{"post":{"summary":"管理员把市场共享项目固定为创建项目模板（super_admin）","tags":["marketplace","admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminMarketplaceByIdTemplate"}},"/api/v1/gallery":{"get":{"summary":"应用画廊列表（GALLERY-001，公开）","tags":["platform"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Gallery"}},"/api/v1/gallery/readme":{"get":{"summary":"应用 README 原文（GALLERY-004，公开）","tags":["platform"],"parameters":[{"name":"repo","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1GalleryReadme"}},"/api/v1/gallery/cover/{owner}/{file}":{"get":{"summary":"应用封面（GALLERY-006，公开，动画 WebP）","tags":["platform"],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}},{"name":"v","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1GalleryCoverByOwnerByFile"}},"/api/v1/template-params":{"get":{"summary":"解析 Git 仓库的模板参数声明（SRC-009，登录）","tags":["platform"],"parameters":[{"name":"repo","in":"query","required":true,"schema":{"minLength":1,"maxLength":2048,"type":"string"}},{"name":"branch","in":"query","required":false,"schema":{"maxLength":256,"type":"string"}}],"operationId":"getApiV1Template-params"}}},"components":{"schemas":{"HealthResponse":{"type":"object","required":["status","runtime","timestamp"],"properties":{"status":{"const":"ok","type":"string"},"runtime":{"type":"string"},"timestamp":{"type":"string"},"instanceId":{"type":"string"}},"$id":"#/components/schemas/HealthResponse","additionalProperties":false},"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","traceId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"traceId":{"type":"string"}}}},"$id":"#/components/schemas/ErrorEnvelope","additionalProperties":false}}}}