{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zvid-io/json-schema/zvid-io-bulk-render-accepted-schema.json",
  "title": "BulkRenderAccepted",
  "description": "Bulk submission result. `queued` is a boolean acknowledgement — the\nnumber of queued jobs is `totalJobs`. Items that failed validation are\nlisted in `errors`; each entry carries the item's original request\nindex as `item` (0-based).\n",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zvid-io-openapi.yaml#/components/schemas/BulkRenderAccepted",
  "type": "object",
  "properties": {
    "bulkId": {
      "type": "string"
    },
    "queued": {
      "type": "boolean"
    },
    "totalJobs": {
      "type": "integer",
      "description": "Number of jobs actually queued."
    },
    "rejectedItems": {
      "type": "integer",
      "description": "Number of items that failed validation (`errors.length`)."
    },
    "errors": {
      "type": "array",
      "description": "Per-item validation failures (best-effort — the rest were queued).",
      "items": {
        "type": "object",
        "properties": {
          "item": {
            "type": "integer",
            "description": "Original 0-based index of the item in the request's `items` array."
          },
          "error": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "failedToQueue": {
      "type": "integer",
      "description": "Valid items that could not be enqueued (queue failure, not validation)."
    },
    "creditsReserved": {
      "type": "integer",
      "description": "Total credits reserved for the batch."
    },
    "clientRoom": {
      "type": "string",
      "description": "Socket.IO room emitting progress events for this batch."
    },
    "queueAhead": {
      "type": "integer",
      "description": "Jobs ahead of this batch in the render queue."
    },
    "jobs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "index": {
            "type": "integer",
            "description": "The job's original 0-based position in the request's `items` array."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "creditsReserved": {
            "type": "integer"
          }
        }
      }
    }
  },
  "required": [
    "bulkId",
    "queued",
    "totalJobs",
    "jobs"
  ]
}