{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hud-ai/json-schema/hud-ai-import-response-schema.json",
  "title": "ImportResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hud-ai-imports-api-openapi.yml#/components/schemas/ImportResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "format": {
      "type": "string",
      "const": "harbor",
      "title": "Format"
    },
    "taskset_id": {
      "type": "string",
      "format": "uuid",
      "title": "Taskset Id"
    },
    "file": {
      "$ref": "#/$defs/ImportFile",
      "description": "The bundle, as it was when the import started"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "starting",
        "running",
        "cancelling",
        "completed",
        "stopped",
        "failed",
        "cancelled"
      ],
      "title": "Status",
      "description": "`stopped`: the importer refused the bundle or stopped partway, and its report says why; `failed`: the import did not run to an outcome"
    },
    "summary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Summary",
      "description": "The importer's account of the outcome; set once completed or stopped"
    },
    "metrics": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metrics",
      "description": "Named counts the importer reports, e.g. `tasks_imported`; set with `summary`"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error",
      "description": "Why a failed import failed"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At",
      "description": "Null while the import is live"
    }
  },
  "type": "object",
  "required": [
    "id",
    "format",
    "taskset_id",
    "file",
    "status",
    "created_at"
  ],
  "$defs": {
    "ImportFile": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "filename": {
          "type": "string",
          "title": "Filename"
        },
        "size_bytes": {
          "type": "integer",
          "title": "Size Bytes"
        }
      },
      "type": "object",
      "required": [
        "id",
        "filename",
        "size_bytes"
      ],
      "title": "ImportFile"
    }
  }
}