{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ctlsurf-com/json-schema/ctlsurf-com-selection-task-response-schema.json",
  "title": "SelectionTaskResponse",
  "description": "Selection task response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ctlsurf-com-selection-tasks-api-openapi.yml#/components/schemas/SelectionTaskResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "page_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Page Id"
    },
    "block_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Block Id"
    },
    "selection_type": {
      "type": "string",
      "title": "Selection Type"
    },
    "selection_data": {
      "additionalProperties": true,
      "type": "object",
      "title": "Selection Data"
    },
    "selection_display": {
      "type": "string",
      "title": "Selection Display"
    },
    "prompt": {
      "type": "string",
      "title": "Prompt"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "notes": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Notes"
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At"
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At"
    },
    "completed_summary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed Summary"
    },
    "result_page_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Result Page Id"
    },
    "root_path": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Root Path"
    },
    "source": {
      "anyOf": [
        {
          "$ref": "#/$defs/SelectionSource"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "id",
    "selection_type",
    "selection_data",
    "selection_display",
    "prompt",
    "status",
    "notes"
  ],
  "$defs": {
    "SelectionSource": {
      "properties": {
        "page_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Page Id"
        },
        "page_title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Page Title"
        },
        "block_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Block Id"
        },
        "block_title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Block Title"
        }
      },
      "type": "object",
      "title": "SelectionSource",
      "description": "Source location of a selection task."
    }
  }
}