refactor(q1): src/api 全量清零 any + types/monitor 扩展输入 DTO

ROADMAP Q1 推进(前端类型安全治理 in_progress):

- src/api/ 整个目录 any 清零(含 monitor/ deploy/ 子目录 12+ 文件)
  create/update 入参 any -> Record<string, unknown> / object
  mock 桩 trace/grafana 对接 types/ 标准类型(Trace/GrafanaDashboard)
  典型接口 LdapFormData/ProbeForm 等强类型表单用 object 接收
- types/monitor.ts 扩展 ~150 行接口:
  ZabbixDatasource / AlertSilence / 7 个输入 DTO
  Trace / TraceSpan / TraceServiceMetrics / GrafanaDashboard / DashboardPanel
  HealthProbeInput

验证:
- 整个 src/api/ 目录 any=0
- ESLint no-explicit-any: 995 -> 937 (本项目此轮贡献 -58)
- tsc -b 零错误, npm run build ✓ (17.06s)
- API 回归 8/8 核心端点通过, Docker 部署 healthy
This commit is contained in:
attacker committed 2026-06-26 03:37:56 +08:00
1 parent 480e677042
commit b553c7956d
436 files changed
+410 -1198

No files matched your search

@@ -0,0 +1 @@
import{h as s}from"./index-o4rKtKfJ.js";const i={getPipelines:async e=>s.get("/pipelines",e),getPipelineDetail:async e=>s.get(`/pipelines/${e}`),createPipeline:async e=>s.post("/pipelines",e),updatePipeline:async(e,p)=>s.put(`/pipelines/${e}`,p),deletePipeline:async e=>s.delete(`/pipelines/${e}`),triggerPipeline:async e=>s.post(`/pipelines/${e}/trigger`),getRuns:async e=>s.get(`/pipelines/${e}/runs`),stopRun:async(e,p)=>s.post(`/pipelines/${e}/runs/${p}/stop`),getRunLog:async(e,p)=>s.get(`/pipelines/${e}/runs/${p}/log`),getMembers:async e=>s.get(`/pipelines/${e}/members`),addMember:async(e,p)=>s.post(`/pipelines/${e}/members`,p),removeMember:async(e,p)=>s.delete(`/pipelines/${e}/members/${p}`),assignGroup:async(e,p)=>s.post(`/pipelines/${e}/groups`,p),getByCode:e=>s.get(`/pipelines/${e}`),getRunsByCode:(e,p=50)=>s.get(`/pipelines/${e}/runs`,{page_size:p}),triggerByCode:e=>s.post(`/pipelines/${e}/trigger`,{}),stopRunByCode:(e,p)=>s.post(`/pipelines/${e}/runs/${p}/stop`,{}),batchDeleteRuns:(e,p)=>s.post(`/pipelines/${e}/runs/batch-delete`,{ids:p}),getRunLogStream:e=>s.get(`/pipelines/runs/${e}/log-stream`),getQueue:e=>s.get(`/pipelines/${e}/queue`),removeFromQueue:(e,p)=>s.delete(`/pipelines/${e}/queue/${p}`),getWorkspace:e=>s.get(`/pipelines/runs/${e}/workspace`),listRunFiles:(e,p)=>s.get(`/pipelines/runs/${e}/files`,p?{path:p}:void 0)};export{i as p};