{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/memestack-ai/json-schema/memestack-ai-archive-import-schema.json",
  "title": "ArchiveImport",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/memestack-ai-openapi.json#/components/schemas/ArchiveImport",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "creator_id": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "enum": [
        "zip",
        "url_list"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "awaiting_transfer",
        "transferring",
        "queued",
        "running",
        "draining",
        "completed",
        "failed",
        "cancelled",
        "reverting",
        "reverted"
      ]
    },
    "archive_size_bytes": {
      "type": [
        "integer",
        "null"
      ]
    },
    "total_entries": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Set once the transfer is validated (zip: central directory entry count; url_list: url count)."
    },
    "cursor": {
      "type": "integer",
      "description": "Next entry index the consumer will process."
    },
    "error_count": {
      "type": "integer"
    },
    "skip_count": {
      "type": "integer",
      "description": "Non-image entries, oversized entries, and dedup skips."
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "entry": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "description": "Capped at 200; overflow only increments error_count."
    },
    "last_error": {
      "type": [
        "string",
        "null"
      ]
    },
    "user_context": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "started_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}