{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trajectory/json-schema/trajectory-paginated-response-pipeline-run-summary-schema.json",
  "title": "PaginatedResponse[PipelineRunSummary]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trajectory-pipelines-api-openapi.yml#/components/schemas/PaginatedResponse_PipelineRunSummary_",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/PipelineRunSummary"
      },
      "type": "array",
      "title": "Items"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor"
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More"
    }
  },
  "type": "object",
  "required": [
    "items",
    "has_more"
  ],
  "$defs": {
    "PipelineKind": {
      "type": "string",
      "enum": [
        "generic",
        "eval",
        "train",
        "env_eval"
      ],
      "title": "PipelineKind"
    },
    "PipelineRunStatus": {
      "type": "string",
      "enum": [
        "pending",
        "running",
        "finalizing",
        "cancelling",
        "cancelled",
        "succeeded",
        "failed"
      ],
      "title": "PipelineRunStatus"
    },
    "PipelineRunSummary": {
      "properties": {
        "run_id": {
          "type": "string",
          "title": "Run Id"
        },
        "pipeline_config_id": {
          "type": "string",
          "title": "Pipeline Config Id"
        },
        "pipeline_name": {
          "type": "string",
          "title": "Pipeline Name"
        },
        "kind": {
          "$ref": "#/$defs/PipelineKind"
        },
        "status": {
          "$ref": "#/$defs/PipelineRunStatus"
        },
        "code_version": {
          "type": "string",
          "title": "Code Version"
        },
        "execution_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Execution Id"
        },
        "node_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Node Count"
        },
        "stages_done": {
          "type": "integer",
          "title": "Stages Done",
          "default": 0
        },
        "stages_failed": {
          "type": "integer",
          "title": "Stages Failed",
          "default": 0
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created At"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updated At"
        }
      },
      "type": "object",
      "required": [
        "run_id",
        "pipeline_config_id",
        "pipeline_name",
        "kind",
        "status",
        "code_version"
      ],
      "title": "PipelineRunSummary"
    }
  }
}