{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bernstein-run/json-schema/bernstein-run-list-approvals-response-schema.json",
  "title": "ListApprovalsResponse",
  "description": "Response for GET /approvals.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bernstein-run-approvals-api-openapi.yml#/components/schemas/ListApprovalsResponse",
  "properties": {
    "pending": {
      "items": {
        "$ref": "#/$defs/PendingApproval"
      },
      "type": "array",
      "title": "Pending"
    }
  },
  "type": "object",
  "required": [
    "pending"
  ],
  "$defs": {
    "PendingApproval": {
      "properties": {
        "task_id": {
          "type": "string",
          "title": "Task Id"
        },
        "task_title": {
          "type": "string",
          "title": "Task Title"
        },
        "session_id": {
          "type": "string",
          "title": "Session Id"
        },
        "diff": {
          "type": "string",
          "title": "Diff",
          "default": ""
        },
        "test_summary": {
          "type": "string",
          "title": "Test Summary",
          "default": ""
        },
        "mechanism": {
          "type": "string",
          "title": "Mechanism",
          "default": "task_review"
        },
        "prompt": {
          "type": "string",
          "title": "Prompt",
          "default": ""
        },
        "default_action": {
          "type": "string",
          "title": "Default Action",
          "default": ""
        },
        "timeout_at_iso": {
          "type": "string",
          "title": "Timeout At Iso",
          "default": ""
        },
        "created_iso": {
          "type": "string",
          "title": "Created Iso",
          "default": ""
        },
        "timeout_seconds": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Timeout Seconds"
        },
        "unblocks": {
          "type": "string",
          "title": "Unblocks",
          "default": "task completion and merge"
        },
        "resolution_endpoint": {
          "type": "string",
          "title": "Resolution Endpoint",
          "default": ""
        }
      },
      "type": "object",
      "required": [
        "task_id",
        "task_title",
        "session_id"
      ],
      "title": "PendingApproval",
      "description": "A single pending approval request (task-level or pre-spawn)."
    }
  }
}