{ "$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/models/execution.ts:5", "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 } } }