将工作流查询、配置、执行、差异、调试、目录和 DataLink 记录、表达式、审计分别归位。 门面保留显式导出,消除 tracker 及分支类型经聚合出口形成的循环,补充文件级循环检查。 同步总纲、层级文档与接口源码索引,交付完整整改报告。 验证:943 项测试通过,类型、版本和 README 审计通过;二进制和插件构建、验证与打包通过。 81 个迁移函数体保持一致,公共 SDK 导出名和三份生成规范与原始基线一致。
117 lines
4.9 KiB
JSON
117 lines
4.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://hose-use.local/specs/hose-close-api/schemas/workflow-job-execution.schema.json",
|
|
"title": "Workflow job execution",
|
|
"description": "Piper 任务实例与节点执行数据。/execution 与 /execution/level/failed 的 data 可能是数组,也可能是分页对象 {number,size,totalPages,totalItems,items}。",
|
|
"x-source": [
|
|
"code-derived: src/domains/platform/workflow/types.ts:339",
|
|
"reference: _tmp-captured/raw/GET-api-easo-jobs-id-execution.json",
|
|
"reference: _tmp-captured/raw/GET-api-easo-jobs-id-execution-completed.json"
|
|
],
|
|
"type": "object",
|
|
"properties": {
|
|
"job": { "$ref": "#/$defs/Job" },
|
|
"executionTree": { "type": "array", "items": { "$ref": "#/$defs/TaskExecution" } },
|
|
"failedExecutions": { "type": "array", "items": { "$ref": "#/$defs/TaskExecution" } },
|
|
"workflow": { "type": "object", "additionalProperties": true },
|
|
"conditionDiagnoses": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
"timeline": { "type": "array", "items": { "type": "object", "additionalProperties": true } }
|
|
},
|
|
"additionalProperties": true,
|
|
"$defs": {
|
|
"Job": {
|
|
"type": "object",
|
|
"required": ["id", "pipelineId", "status"],
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"pipelineId": { "type": "string" },
|
|
"label": { "type": "string" },
|
|
"status": { "type": "string", "description": "例如 FAILED、COMPLETED。" },
|
|
"runType": { "type": "string", "description": "DEBUG / PROD。" },
|
|
"startTime": { "type": ["number", "string", "null"] },
|
|
"endTime": { "type": ["number", "string", "null"] },
|
|
"createTime": { "type": ["number", "string", "null"] },
|
|
"inputs": { "type": "object", "additionalProperties": true },
|
|
"outputs": { "type": "object", "additionalProperties": true },
|
|
"corporationId": { "type": "string" },
|
|
"currentTask": { "type": "number" },
|
|
"priority": { "type": "number" },
|
|
"webhooks": { "type": "array", "items": {} },
|
|
"parentTaskExecutionId": { "type": ["string", "null"] },
|
|
"isQueuedJob": { "type": "boolean" },
|
|
"initialQueuedJobsAhead": { "type": "number" }
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"TaskExecution": {
|
|
"type": "object",
|
|
"description": "单个节点的一次执行。不同节点类型会带各自配置字段,未列出字段按 additionalProperties 保留。",
|
|
"required": ["id", "jobId", "pipelineId", "name", "type", "status"],
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"parentId": { "type": ["string", "null"] },
|
|
"jobId": { "type": "string" },
|
|
"pipelineId": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"displayName": { "type": ["string", "null"] },
|
|
"label": { "type": ["string", "null"] },
|
|
"type": { "type": "string" },
|
|
"orderIndex": { "type": "number" },
|
|
"levelIndex": { "type": "array", "items": { "type": "number" } },
|
|
"status": { "type": "string" },
|
|
"executionTime": { "type": "number" },
|
|
"startTime": { "type": ["number", "string", "null"] },
|
|
"endTime": { "type": ["number", "string", "null"] },
|
|
"createTime": { "type": ["number", "string", "null"] },
|
|
"currentLoopPath": { "type": ["string", "null"] },
|
|
"output": { "type": ["object", "array", "string", "number", "boolean", "null"] },
|
|
"error": { "$ref": "#/$defs/ExecutionError" },
|
|
"form": { "type": ["object", "array", "null"] },
|
|
"details": { "type": ["object", "null"] },
|
|
"executionLogs": { "type": "array", "items": {} }
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"ExecutionError": {
|
|
"type": "object",
|
|
"required": ["message", "stackTrace"],
|
|
"properties": {
|
|
"message": { "type": "string" },
|
|
"stackTrace": { "type": "array", "items": { "type": "string" } }
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"ExecutionPage": {
|
|
"type": "object",
|
|
"required": ["items"],
|
|
"properties": {
|
|
"number": { "type": "number" },
|
|
"size": { "type": "number" },
|
|
"totalPages": { "type": "number" },
|
|
"totalItems": { "type": "number" },
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{ "$ref": "#/$defs/TaskExecution" },
|
|
{ "type": "array", "items": { "$ref": "#/$defs/TaskExecution" } }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"ExecutionLog": {
|
|
"type": "object",
|
|
"required": ["message"],
|
|
"properties": {
|
|
"id": { "type": ["string", "number"] },
|
|
"level": { "type": "string" },
|
|
"message": { "type": "string" },
|
|
"createAt": { "type": ["string", "number"] }
|
|
},
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|