{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/witwiki-app/json-schema/witwiki-app-import-job-schema.json",
  "title": "ImportJob",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/witwiki-app-openapi.yaml#/components/schemas/ImportJob",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "org_id": {
      "type": "string"
    },
    "project_id": {
      "type": "string"
    },
    "started_by": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "paused",
        "failed",
        "cancelled",
        "done"
      ]
    },
    "step": {
      "type": "string",
      "enum": [
        "read",
        "digest",
        "plan",
        "write",
        "check",
        "finish"
      ]
    },
    "expected_archive_rate": {
      "type": [
        "number",
        "null"
      ]
    },
    "ceiling_micros": {
      "type": "integer",
      "format": "int64",
      "description": "Most the import may spend, in micro-dollars."
    },
    "spent_micros": {
      "type": "integer",
      "format": "int64",
      "description": "Spent so far, in micro-dollars."
    },
    "pages_total": {
      "type": "integer"
    },
    "error": {
      "type": "string",
      "description": "Why a failed import stopped, in a sentence for the org's admins; empty otherwise."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "finished_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}