{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/good-grants/json-schema/good-grants-review-task-list-schema.json",
  "title": "Action task list",
  "description": "Paginated list of action tasks.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/good-grants-action-tasks-api-openapi.yml#/components/schemas/ReviewTaskList",
  "allOf": [
    {
      "$ref": "#/$defs/Pagination"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "description": "Action tasks for the current page.",
          "items": {
            "$ref": "#/$defs/ReviewTask"
          }
        }
      }
    }
  ],
  "$defs": {
    "Pagination": {
      "type": "object",
      "title": "Pagination",
      "properties": {
        "current_page": {
          "type": "integer",
          "description": "Number of the page returned by this response, starting at `1`."
        },
        "first_page_url": {
          "type": "string",
          "description": "URL of the first page in the result set, relative when the requested page is beyond the last page."
        },
        "from": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Position of the first record on this page within the full result set, starting at `1`, or `null` when the requested page is beyond the last page."
        },
        "last_page": {
          "type": "integer",
          "description": "Total number of pages."
        },
        "last_page_url": {
          "type": "string",
          "description": "URL of the last page in the result set, relative when the requested page is beyond the last page."
        },
        "next_page_url": {
          "type": "string",
          "description": "URL of the next page in the result set, empty when the current page is the last page."
        },
        "path": {
          "type": "string",
          "description": "Canonical URL of the endpoint, without query parameters."
        },
        "per_page": {
          "type": "integer",
          "default": 10,
          "description": "Maximum number of records returned per page."
        },
        "prev_page_url": {
          "type": "string",
          "description": "URL of the previous page in the result set, empty when the current page is the first page."
        },
        "to": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Position of the last record on this page within the full result set, or `null` when the requested page is beyond the last page."
        },
        "total": {
          "type": "integer",
          "description": "Total number of records across all pages."
        }
      }
    },
    "ReviewTask": {
      "title": "Action task",
      "description": "Single action task, an application paired with an action stage, listing the reviewers responsible for actioning it.",
      "type": "object",
      "properties": {
        "action_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Date and time when the action task was actioned, `null` if not yet actioned."
        },
        "category": {
          "type": "object",
          "description": "Category the application belongs to.",
          "properties": {
            "slug": {
              "type": "string",
              "description": "Short URL-safe identifier for the category."
            },
            "link": {
              "type": "string",
              "format": "uri",
              "description": "Canonical URL for the category resource."
            },
            "name": {
              "type": "object",
              "description": "Translated name of the category, keyed by locale code.",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time when the action task was created."
        },
        "decision": {
          "type": [
            "string",
            "null"
          ],
          "description": "Decision recorded against the action task, `null` if none recorded."
        },
        "application": {
          "type": "object",
          "description": "Application the action task relates to.",
          "properties": {
            "slug": {
              "type": "string",
              "description": "Short URL-safe identifier for the application."
            },
            "link": {
              "type": "string",
              "format": "uri",
              "description": "Canonical URL for the application resource."
            },
            "title": {
              "type": "string",
              "description": "Title of the application."
            }
          }
        },
        "action_stage": {
          "type": "object",
          "description": "Action stage the task belongs to.",
          "properties": {
            "slug": {
              "type": "string",
              "description": "Short URL-safe identifier for the action stage."
            },
            "link": {
              "type": "string",
              "format": "uri",
              "description": "Canonical URL for the action stage resource."
            },
            "name": {
              "type": "object",
              "description": "Translated name of the action stage, keyed by locale code.",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        },
        "reviewer": {
          "type": "array",
          "description": "Reviewers responsible for actioning the action task.",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Display name of the reviewer."
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "Email address of the reviewer."
              }
            }
          }
        },
        "season": {
          "type": "object",
          "description": "Season the application belongs to.",
          "properties": {
            "slug": {
              "type": "string",
              "description": "Short URL-safe identifier for the season."
            },
            "link": {
              "type": "string",
              "format": "uri",
              "description": "Canonical URL for the season resource."
            },
            "name": {
              "type": "object",
              "description": "Translated name of the season, keyed by locale code.",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        },
        "token": {
          "type": "string",
          "description": "Token uniquely identifying the action task."
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time when the action task was last updated."
        }
      }
    }
  }
}