{
  "components": {
    "schemas": {
      "AccessLevelResponse": {
        "description": "Access level response model.",
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "created_at",
          "updated_at"
        ],
        "title": "AccessLevelResponse",
        "type": "object"
      },
      "AdminUserCreate": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "first_name": {
            "default": "Admin",
            "title": "First Name",
            "type": "string"
          },
          "last_name": {
            "default": "User",
            "title": "Last Name",
            "type": "string"
          },
          "pin": {
            "title": "Pin",
            "type": "string"
          }
        },
        "required": [
          "email",
          "pin"
        ],
        "title": "AdminUserCreate",
        "type": "object"
      },
      "AuditLogListResponse": {
        "description": "Audit log list response.",
        "properties": {
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "logs": {
            "items": {
              "$ref": "#/components/schemas/AuditLogResponse"
            },
            "title": "Logs",
            "type": "array"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "logs",
          "total",
          "offset",
          "limit"
        ],
        "title": "AuditLogListResponse",
        "type": "object"
      },
      "AuditLogResponse": {
        "description": "Audit log response model.",
        "properties": {
          "command_records": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Command Records"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id"
          },
          "endpoint": {
            "title": "Endpoint",
            "type": "string"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "method": {
            "title": "Method",
            "type": "string"
          },
          "request_body": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Body"
          },
          "request_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Duration Ms"
          },
          "response_body": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Body"
          },
          "response_status": {
            "title": "Response Status",
            "type": "integer"
          },
          "timestamp": {
            "title": "Timestamp",
            "type": "string"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "user_id",
          "user_email",
          "timestamp",
          "method",
          "endpoint",
          "request_body",
          "response_status",
          "response_body",
          "command_records",
          "error_message",
          "ip_address",
          "user_agent",
          "request_duration_ms",
          "correlation_id"
        ],
        "title": "AuditLogResponse",
        "type": "object"
      },
      "AuditVerifyResponse": {
        "properties": {
          "checked": {
            "title": "Checked",
            "type": "integer"
          },
          "first_error_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Error Seq"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "checked",
          "first_error_seq",
          "message"
        ],
        "title": "AuditVerifyResponse",
        "type": "object"
      },
      "AxisCoordinate": {
        "properties": {
          "s": {
            "default": 0,
            "title": "S",
            "type": "integer"
          },
          "x": {
            "title": "X",
            "type": "number"
          },
          "y": {
            "title": "Y",
            "type": "number"
          },
          "z_offset": {
            "default": 0.0,
            "title": "Z Offset",
            "type": "number"
          }
        },
        "required": [
          "x",
          "y"
        ],
        "title": "AxisCoordinate",
        "type": "object"
      },
      "BarcodeRequest": {
        "description": "Request payload identifying one item by barcode.",
        "properties": {
          "barcode": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Barcode",
            "type": "string"
          }
        },
        "required": [
          "barcode"
        ],
        "title": "BarcodeRequest",
        "type": "object"
      },
      "BinContentsResponse": {
        "properties": {
          "barcode": {
            "title": "Barcode",
            "type": "string"
          },
          "compartment": {
            "anyOf": [
              {
                "maximum": 1024.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Compartment number, starting at 1 at the top left, left-to-right then top-to-bottom at IO; null when unassigned or the bin is undivided.",
            "title": "Compartment"
          },
          "confirmed": {
            "title": "Confirmed",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "barcode",
          "name",
          "confirmed"
        ],
        "title": "BinContentsResponse",
        "type": "object"
      },
      "BinItemSummary": {
        "properties": {
          "barcode": {
            "title": "Barcode",
            "type": "string"
          },
          "compartment": {
            "anyOf": [
              {
                "maximum": 1024.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Compartment number, starting at 1 at the top left, left-to-right then top-to-bottom at IO; null when unassigned or the bin is undivided.",
            "title": "Compartment"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "barcode",
          "name"
        ],
        "title": "BinItemSummary",
        "type": "object"
      },
      "BinResponse": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "available_volume": {
            "description": "Remaining volume in cubic millimeters",
            "title": "Available Volume",
            "type": "number"
          },
          "barcode": {
            "title": "Barcode",
            "type": "string"
          },
          "compartment_dimensions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StorageBinDimensionsSettings"
              },
              {
                "type": "null"
              }
            ],
            "description": "Compartment dimensions in millimeters: the inner width and length less the outer walls and dividers, split evenly by columns and rows, less placement leeway, and the full inner height; null for an undivided bin."
          },
          "compartment_layout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompartmentLayoutSettings"
              },
              {
                "type": "null"
              }
            ],
            "description": "Equal-sized compartment rows and columns; null for an undivided bin."
          },
          "gross_weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Bin plus contents in grams; only available at home",
            "title": "Gross Weight"
          },
          "home_location": {
            "$ref": "#/components/schemas/ItemLocationCreate"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "inner_dimensions": {
            "additionalProperties": {
              "type": "number"
            },
            "title": "Inner Dimensions",
            "type": "object"
          },
          "item_count": {
            "title": "Item Count",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/BinItemSummary"
            },
            "title": "Items",
            "type": "array"
          },
          "max_item_dimensions": {
            "additionalProperties": {
              "type": "number"
            },
            "title": "Max Item Dimensions",
            "type": "object"
          },
          "max_items": {
            "title": "Max Items",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "used_volume": {
            "description": "Occupied volume in cubic millimeters",
            "title": "Used Volume",
            "type": "number"
          }
        },
        "required": [
          "id",
          "barcode",
          "home_location",
          "inner_dimensions",
          "max_item_dimensions",
          "max_items",
          "item_count",
          "used_volume",
          "available_volume",
          "status",
          "gross_weight",
          "active",
          "items"
        ],
        "title": "BinResponse",
        "type": "object"
      },
      "BinWorkflowCreate": {
        "properties": {
          "barcode": {
            "title": "Barcode",
            "type": "string"
          },
          "operation": {
            "pattern": "^(store|retrieve)$",
            "title": "Operation",
            "type": "string"
          },
          "storage_mode": {
            "anyOf": [
              {
                "enum": [
                  "bin",
                  "direct"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Mode"
          }
        },
        "required": [
          "operation",
          "barcode"
        ],
        "title": "BinWorkflowCreate",
        "type": "object"
      },
      "BinWorkflowEnvelope": {
        "properties": {
          "workflow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BinWorkflowResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "workflow"
        ],
        "title": "BinWorkflowEnvelope",
        "type": "object"
      },
      "BinWorkflowResponse": {
        "properties": {
          "bin": {
            "$ref": "#/components/schemas/BinResponse"
          },
          "compartment": {
            "anyOf": [
              {
                "maximum": 1024.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Persisted target compartment number, starting at 1 at the top left, left-to-right then top-to-bottom at IO; null when no target is assigned or the bin is undivided.",
            "title": "Compartment"
          },
          "contents": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BinContentsResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contents"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "history": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "History",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BinItemSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "operation": {
            "description": "store, retrieve, or return",
            "title": "Operation",
            "type": "string"
          },
          "resolution": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution"
          },
          "state": {
            "description": "Current tray interaction state",
            "title": "State",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "operation",
          "state",
          "bin",
          "item",
          "error",
          "history",
          "resolution",
          "created_at",
          "updated_at"
        ],
        "title": "BinWorkflowResponse",
        "type": "object"
      },
      "BinWorkflowReturn": {
        "properties": {
          "confirmed_item_ids": {
            "items": {
              "type": "integer"
            },
            "title": "Confirmed Item Ids",
            "type": "array"
          }
        },
        "required": [
          "confirmed_item_ids"
        ],
        "title": "BinWorkflowReturn",
        "type": "object"
      },
      "BinWorkflowStartResponse": {
        "properties": {
          "storage_mode": {
            "enum": [
              "direct",
              "bin"
            ],
            "title": "Storage Mode",
            "type": "string"
          },
          "workflow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BinWorkflowResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "workflow",
          "storage_mode"
        ],
        "title": "BinWorkflowStartResponse",
        "type": "object"
      },
      "BinWorkflowsResponse": {
        "properties": {
          "workflows": {
            "items": {
              "$ref": "#/components/schemas/BinWorkflowResponse"
            },
            "title": "Workflows",
            "type": "array"
          }
        },
        "required": [
          "workflows"
        ],
        "title": "BinWorkflowsResponse",
        "type": "object"
      },
      "BinsResponse": {
        "properties": {
          "bins": {
            "items": {
              "$ref": "#/components/schemas/BinResponse"
            },
            "title": "Bins",
            "type": "array"
          }
        },
        "required": [
          "bins"
        ],
        "title": "BinsResponse",
        "type": "object"
      },
      "BooleanSuccess": {
        "properties": {
          "success": {
            "description": "Operation result; inspect even when HTTP status is 200",
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "title": "BooleanSuccess",
        "type": "object"
      },
      "CabinetDoorState": {
        "properties": {
          "bottom_closed": {
            "title": "Bottom Closed",
            "type": "boolean"
          },
          "bottom_open": {
            "title": "Bottom Open",
            "type": "boolean"
          },
          "closed": {
            "title": "Closed",
            "type": "boolean"
          },
          "open": {
            "title": "Open",
            "type": "boolean"
          },
          "top_closed": {
            "title": "Top Closed",
            "type": "boolean"
          },
          "top_open": {
            "title": "Top Open",
            "type": "boolean"
          }
        },
        "required": [
          "top_closed",
          "bottom_closed",
          "closed",
          "top_open",
          "bottom_open",
          "open"
        ],
        "title": "CabinetDoorState",
        "type": "object"
      },
      "CabinetLatchState": {
        "properties": {
          "bottom_engaged": {
            "title": "Bottom Engaged",
            "type": "boolean"
          },
          "bottom_released": {
            "title": "Bottom Released",
            "type": "boolean"
          },
          "engaged": {
            "title": "Engaged",
            "type": "boolean"
          },
          "released": {
            "title": "Released",
            "type": "boolean"
          },
          "top_engaged": {
            "title": "Top Engaged",
            "type": "boolean"
          },
          "top_released": {
            "title": "Top Released",
            "type": "boolean"
          }
        },
        "required": [
          "top_released",
          "bottom_released",
          "released",
          "top_engaged",
          "bottom_engaged",
          "engaged"
        ],
        "title": "CabinetLatchState",
        "type": "object"
      },
      "CabinetReleaseResponse": {
        "properties": {
          "action": {
            "enum": [
              "passive",
              "release"
            ],
            "title": "Action",
            "type": "string"
          },
          "doors": {
            "$ref": "#/components/schemas/CabinetDoorState"
          },
          "latches": {
            "$ref": "#/components/schemas/CabinetLatchState"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "action",
          "doors",
          "latches"
        ],
        "title": "CabinetReleaseResponse",
        "type": "object"
      },
      "CabinetStatusResponse": {
        "properties": {
          "configured": {
            "default": true,
            "title": "Configured",
            "type": "boolean"
          },
          "doors": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CabinetDoorState"
              },
              {
                "type": "null"
              }
            ]
          },
          "latches": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CabinetLatchState"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "CabinetStatusResponse",
        "type": "object"
      },
      "CalibrationCoordinate": {
        "properties": {
          "s": {
            "default": 0,
            "title": "S",
            "type": "integer"
          },
          "x": {
            "title": "X",
            "type": "number"
          },
          "y": {
            "title": "Y",
            "type": "number"
          },
          "z_captured_at_stage_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Z Captured At Stage Mm"
          },
          "z_offset": {
            "default": 0.0,
            "title": "Z Offset",
            "type": "number"
          }
        },
        "required": [
          "x",
          "y"
        ],
        "title": "CalibrationCoordinate",
        "type": "object"
      },
      "CalibrationStatusResponse": {
        "properties": {
          "needs_home": {
            "title": "Needs Home",
            "type": "boolean"
          },
          "needs_home_axes": {
            "items": {
              "type": "string"
            },
            "title": "Needs Home Axes",
            "type": "array"
          },
          "needs_home_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Needs Home Reason"
          }
        },
        "required": [
          "needs_home"
        ],
        "title": "CalibrationStatusResponse",
        "type": "object"
      },
      "CameraInfo": {
        "properties": {
          "consumers": {
            "title": "Consumers",
            "type": "integer"
          },
          "has_frame": {
            "title": "Has Frame",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "online": {
            "title": "Online",
            "type": "boolean"
          },
          "running": {
            "title": "Running",
            "type": "boolean"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "online",
          "running",
          "consumers",
          "has_frame"
        ],
        "title": "CameraInfo",
        "type": "object"
      },
      "CamerasResponse": {
        "properties": {
          "cameras": {
            "items": {
              "$ref": "#/components/schemas/CameraInfo"
            },
            "title": "Cameras",
            "type": "array"
          }
        },
        "required": [
          "cameras"
        ],
        "title": "CamerasResponse",
        "type": "object"
      },
      "Cell": {
        "properties": {
          "calibration_point": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CalibrationCoordinate"
              },
              {
                "type": "null"
              }
            ]
          },
          "cell_idx": {
            "default": 0,
            "minimum": 0.0,
            "title": "Cell Idx",
            "type": "integer"
          },
          "dimensions": {
            "$ref": "#/components/schemas/Dimensions"
          },
          "is_manual": {
            "default": false,
            "title": "Is Manual",
            "type": "boolean"
          },
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CellItem"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CellStatus"
          }
        },
        "required": [
          "status",
          "item",
          "calibration_point",
          "dimensions"
        ],
        "title": "Cell",
        "type": "object"
      },
      "CellItem": {
        "properties": {
          "barcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Barcode"
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Json"
              },
              {
                "type": "null"
              }
            ]
          },
          "dimensions": {
            "$ref": "#/components/schemas/Dimensions"
          },
          "weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weight"
          }
        },
        "required": [
          "dimensions"
        ],
        "title": "CellItem",
        "type": "object"
      },
      "CellStatus": {
        "enum": [
          "occupied",
          "available",
          "maintenance",
          "disabled"
        ],
        "title": "CellStatus",
        "type": "string"
      },
      "Chemical": {
        "properties": {
          "cas_number": {
            "title": "Cas Number",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "cas_number"
        ],
        "title": "Chemical",
        "type": "object"
      },
      "ChemicalDetail": {
        "properties": {
          "cas_number": {
            "title": "Cas Number",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "source_url": {
            "title": "Source Url",
            "type": "string"
          },
          "synonyms": {
            "items": {
              "type": "string"
            },
            "title": "Synonyms",
            "type": "array"
          }
        },
        "required": [
          "name",
          "cas_number",
          "synonyms",
          "source_url"
        ],
        "title": "ChemicalDetail",
        "type": "object"
      },
      "ChemicalSearch": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/Chemical"
            },
            "title": "Results",
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "title": "ChemicalSearch",
        "type": "object"
      },
      "CommandAcceptedResponse": {
        "properties": {
          "command_id": {
            "title": "Command Id",
            "type": "string"
          },
          "message": {
            "const": "success",
            "title": "Message",
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "message",
          "command_id",
          "status"
        ],
        "title": "CommandAcceptedResponse",
        "type": "object"
      },
      "CommandLifecycleResponse": {
        "properties": {
          "command": {
            "title": "Command",
            "type": "string"
          },
          "command_id": {
            "title": "Command Id",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "command_id",
          "request_id",
          "command",
          "status",
          "result",
          "created_at",
          "started_at",
          "completed_at"
        ],
        "title": "CommandLifecycleResponse",
        "type": "object"
      },
      "CompartmentLayoutSettings": {
        "description": "Equal-sized compartments, numbered left-to-right then top-to-bottom at IO.",
        "properties": {
          "columns": {
            "maximum": 32.0,
            "minimum": 1.0,
            "title": "Columns",
            "type": "integer"
          },
          "rows": {
            "maximum": 32.0,
            "minimum": 1.0,
            "title": "Rows",
            "type": "integer"
          }
        },
        "required": [
          "rows",
          "columns"
        ],
        "title": "CompartmentLayoutSettings",
        "type": "object"
      },
      "DemoCycleStatusResponse": {
        "properties": {
          "current_cell_index": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Cell Index"
          },
          "is_running": {
            "title": "Is Running",
            "type": "boolean"
          },
          "total_cells": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Cells"
          }
        },
        "required": [
          "is_running"
        ],
        "title": "DemoCycleStatusResponse",
        "type": "object"
      },
      "Dimensions": {
        "properties": {
          "height": {
            "title": "Height",
            "type": "number"
          },
          "length": {
            "title": "Length",
            "type": "number"
          },
          "width": {
            "title": "Width",
            "type": "number"
          }
        },
        "required": [
          "length",
          "width",
          "height"
        ],
        "title": "Dimensions",
        "type": "object"
      },
      "DimensionsPayload": {
        "description": "Dimensions in millimeters (width, height, length).",
        "properties": {
          "height": {
            "title": "Height",
            "type": "number"
          },
          "length": {
            "title": "Length",
            "type": "number"
          },
          "width": {
            "title": "Width",
            "type": "number"
          }
        },
        "required": [
          "width",
          "height",
          "length"
        ],
        "title": "DimensionsPayload",
        "type": "object"
      },
      "DoorMoveResponse": {
        "properties": {
          "position": {
            "enum": [
              "close",
              "open"
            ],
            "title": "Position",
            "type": "string"
          },
          "position_mm": {
            "title": "Position Mm",
            "type": "number"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "position",
          "position_mm"
        ],
        "title": "DoorMoveResponse",
        "type": "object"
      },
      "DoorOperationResponse": {
        "properties": {
          "action": {
            "enum": [
              "open",
              "close",
              "home"
            ],
            "title": "Action",
            "type": "string"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "action"
        ],
        "title": "DoorOperationResponse",
        "type": "object"
      },
      "ErrorResponse": {
        "description": "Application errors; structured detail can include operation-specific context.",
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "description": "Text, an operation-specific error object, or request validation errors.",
            "examples": [
              {
                "code": "home_required",
                "message": "Home required before robot commands."
              }
            ],
            "title": "Detail"
          }
        },
        "required": [
          "detail"
        ],
        "title": "ErrorResponse",
        "type": "object"
      },
      "GridCellBatchItem": {
        "description": "One cell to update in an atomic multi-cell update.",
        "properties": {
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "dimensions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DimensionsPayload"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cell width, height, and length in millimeters; omit to keep the current dimensions."
          },
          "is_manual": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the calibration is locked (manual); omit to keep the current value.",
            "title": "Is Manual"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cell status: available, occupied, maintenance, or disabled.",
            "title": "Status"
          },
          "x": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibration x in millimeters; provide x, y, and z_offset together.",
            "title": "X"
          },
          "y": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibration y in millimeters; provide x, y, and z_offset together.",
            "title": "Y"
          },
          "z_offset": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibration z offset in millimeters; provide x, y, and z_offset together.",
            "title": "Z Offset"
          }
        },
        "required": [
          "shelf_idx",
          "cell_idx"
        ],
        "title": "GridCellBatchItem",
        "type": "object"
      },
      "GridCellUpdate": {
        "description": "Request payload for updating a robot storage-grid cell.",
        "properties": {
          "dimensions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DimensionsPayload"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cell width, height, and length in millimeters; omit to keep the current dimensions."
          },
          "is_manual": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the calibration is locked (manual); omit to keep the current value.",
            "title": "Is Manual"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cell status: available, occupied, maintenance, or disabled.",
            "title": "Status"
          },
          "x": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibration x in millimeters; provide x, y, and z_offset together.",
            "title": "X"
          },
          "y": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibration y in millimeters; provide x, y, and z_offset together.",
            "title": "Y"
          },
          "z_offset": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibration z offset in millimeters; provide x, y, and z_offset together.",
            "title": "Z Offset"
          }
        },
        "title": "GridCellUpdate",
        "type": "object"
      },
      "GridCellsBatchUpdate": {
        "description": "Request payload for an atomic multi-cell update.",
        "properties": {
          "cells": {
            "items": {
              "$ref": "#/components/schemas/GridCellBatchItem"
            },
            "title": "Cells",
            "type": "array"
          }
        },
        "required": [
          "cells"
        ],
        "title": "GridCellsBatchUpdate",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HealthResponse": {
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "robot_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Robot Error"
          },
          "robot_error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Robot Error Type"
          },
          "robot_phase": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Robot Phase"
          },
          "robot_status": {
            "title": "Robot Status",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "mode",
          "robot_status"
        ],
        "title": "HealthResponse",
        "type": "object"
      },
      "HomeCommand": {
        "properties": {
          "command": {
            "const": "home",
            "default": "home",
            "title": "Command",
            "type": "string"
          }
        },
        "title": "HomeCommand",
        "type": "object"
      },
      "HomeOnInitResponse": {
        "properties": {
          "home_on_init": {
            "title": "Home On Init",
            "type": "boolean"
          }
        },
        "required": [
          "home_on_init"
        ],
        "title": "HomeOnInitResponse",
        "type": "object"
      },
      "HomeOnInitUpdateRequest": {
        "properties": {
          "home_on_init": {
            "title": "Home On Init",
            "type": "boolean"
          }
        },
        "required": [
          "home_on_init"
        ],
        "title": "HomeOnInitUpdateRequest",
        "type": "object"
      },
      "IOBoxDoorMoveRequest": {
        "properties": {
          "close": {
            "maximum": 1000.0,
            "minimum": 0.0,
            "title": "Close",
            "type": "number"
          },
          "open": {
            "exclusiveMinimum": 0.0,
            "maximum": 1000.0,
            "title": "Open",
            "type": "number"
          },
          "position": {
            "enum": [
              "close",
              "open"
            ],
            "title": "Position",
            "type": "string"
          }
        },
        "required": [
          "close",
          "open",
          "position"
        ],
        "title": "IOBoxDoorMoveRequest",
        "type": "object"
      },
      "IOBoxDoorPositionRequest": {
        "properties": {
          "close": {
            "maximum": 1000.0,
            "minimum": 0.0,
            "title": "Close",
            "type": "number"
          },
          "open": {
            "exclusiveMinimum": 0.0,
            "maximum": 1000.0,
            "title": "Open",
            "type": "number"
          }
        },
        "required": [
          "close",
          "open"
        ],
        "title": "IOBoxDoorPositionRequest",
        "type": "object"
      },
      "IOBoxDoorPositionResponse": {
        "properties": {
          "close": {
            "title": "Close",
            "type": "number"
          },
          "open": {
            "title": "Open",
            "type": "number"
          }
        },
        "required": [
          "close",
          "open"
        ],
        "title": "IOBoxDoorPositionResponse",
        "type": "object"
      },
      "IOBoxJogRequest": {
        "properties": {
          "axis": {
            "enum": [
              "x",
              "y",
              "z",
              "stage"
            ],
            "title": "Axis",
            "type": "string"
          },
          "delta": {
            "description": "Signed displacement in millimeters",
            "title": "Delta",
            "type": "number"
          },
          "position": {
            "enum": [
              "low",
              "high"
            ],
            "title": "Position",
            "type": "string"
          }
        },
        "required": [
          "position",
          "axis",
          "delta"
        ],
        "title": "IOBoxJogRequest",
        "type": "object"
      },
      "IOBoxPositionResponse": {
        "properties": {
          "pickup_high_x": {
            "description": "Position or extension in millimeters",
            "title": "Pickup High X",
            "type": "number"
          },
          "pickup_high_y": {
            "description": "Position or extension in millimeters",
            "title": "Pickup High Y",
            "type": "number"
          },
          "pickup_low_x": {
            "description": "Position or extension in millimeters",
            "title": "Pickup Low X",
            "type": "number"
          },
          "pickup_low_y": {
            "description": "Position or extension in millimeters",
            "title": "Pickup Low Y",
            "type": "number"
          },
          "stage_extension": {
            "description": "Position or extension in millimeters",
            "title": "Stage Extension",
            "type": "number"
          },
          "warnings": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warnings"
          },
          "z_extension": {
            "description": "Position or extension in millimeters",
            "title": "Z Extension",
            "type": "number"
          }
        },
        "required": [
          "pickup_low_x",
          "pickup_low_y",
          "pickup_high_x",
          "pickup_high_y",
          "z_extension",
          "stage_extension"
        ],
        "title": "IOBoxPositionResponse",
        "type": "object"
      },
      "IOBoxSaveRequest": {
        "properties": {
          "pickup_high_x": {
            "description": "Position or extension in millimeters",
            "title": "Pickup High X",
            "type": "number"
          },
          "pickup_high_y": {
            "description": "Position or extension in millimeters",
            "title": "Pickup High Y",
            "type": "number"
          },
          "pickup_low_x": {
            "description": "Position or extension in millimeters",
            "title": "Pickup Low X",
            "type": "number"
          },
          "pickup_low_y": {
            "description": "Position or extension in millimeters",
            "title": "Pickup Low Y",
            "type": "number"
          },
          "stage_extension": {
            "description": "Position or extension in millimeters",
            "title": "Stage Extension",
            "type": "number"
          },
          "z_extension": {
            "description": "Position or extension in millimeters",
            "title": "Z Extension",
            "type": "number"
          }
        },
        "required": [
          "pickup_low_x",
          "pickup_low_y",
          "pickup_high_x",
          "pickup_high_y",
          "z_extension",
          "stage_extension"
        ],
        "title": "IOBoxSaveRequest",
        "type": "object"
      },
      "IOBoxSizerCalibrationConfig": {
        "properties": {
          "apply_depth_compensation": {
            "default": false,
            "title": "Apply Depth Compensation",
            "type": "boolean"
          },
          "mm_per_px_x": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mm Per Px X"
          },
          "mm_per_px_y": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mm Per Px Y"
          },
          "tof_blank_mm": {
            "items": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Tof Blank Mm",
            "type": "array"
          }
        },
        "title": "IOBoxSizerCalibrationConfig",
        "type": "object"
      },
      "IOBoxSizerCameraConfig": {
        "properties": {
          "buffer_size": {
            "default": 1,
            "exclusiveMinimum": 0.0,
            "title": "Buffer Size",
            "type": "integer"
          },
          "device": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ],
            "default": "/dev/video0",
            "title": "Device"
          },
          "flip_horizontal": {
            "default": true,
            "title": "Flip Horizontal",
            "type": "boolean"
          },
          "fps": {
            "default": 100,
            "exclusiveMinimum": 0.0,
            "title": "Fps",
            "type": "integer"
          },
          "height": {
            "default": 720,
            "exclusiveMinimum": 0.0,
            "title": "Height",
            "type": "integer"
          },
          "width": {
            "default": 1280,
            "exclusiveMinimum": 0.0,
            "title": "Width",
            "type": "integer"
          }
        },
        "title": "IOBoxSizerCameraConfig",
        "type": "object"
      },
      "IOBoxSizerConfig": {
        "properties": {
          "calibration": {
            "$ref": "#/components/schemas/IOBoxSizerCalibrationConfig"
          },
          "camera": {
            "$ref": "#/components/schemas/IOBoxSizerCameraConfig"
          },
          "detection": {
            "$ref": "#/components/schemas/IOBoxSizerDetectionConfig"
          },
          "enabled": {
            "default": false,
            "title": "Enabled",
            "type": "boolean"
          },
          "history": {
            "$ref": "#/components/schemas/IOBoxSizerHistoryConfig"
          },
          "measure_on_store": {
            "default": true,
            "title": "Measure On Store",
            "type": "boolean"
          },
          "observer_mode_enabled": {
            "default": true,
            "title": "Observer Mode Enabled",
            "type": "boolean"
          },
          "store_measurement_timeout_s": {
            "default": 2.0,
            "exclusiveMinimum": 0.0,
            "title": "Store Measurement Timeout S",
            "type": "number"
          },
          "tof": {
            "$ref": "#/components/schemas/IOBoxSizerToFConfig"
          }
        },
        "title": "IOBoxSizerConfig",
        "type": "object"
      },
      "IOBoxSizerDetectionConfig": {
        "properties": {
          "blank_frame_path": {
            "default": "data/iobox_sizer/blank_frame.png",
            "title": "Blank Frame Path",
            "type": "string"
          },
          "contour_selection": {
            "default": "largest",
            "enum": [
              "largest",
              "center"
            ],
            "title": "Contour Selection",
            "type": "string"
          },
          "diff_threshold": {
            "default": 15,
            "maximum": 255.0,
            "minimum": 0.0,
            "title": "Diff Threshold",
            "type": "integer"
          },
          "hsv_s_max": {
            "default": 55,
            "maximum": 255.0,
            "minimum": 0.0,
            "title": "Hsv S Max",
            "type": "integer"
          },
          "hsv_v_min": {
            "default": 170,
            "maximum": 255.0,
            "minimum": 0.0,
            "title": "Hsv V Min",
            "type": "integer"
          },
          "min_area_px": {
            "default": 500,
            "exclusiveMinimum": 0.0,
            "title": "Min Area Px",
            "type": "integer"
          },
          "mode": {
            "default": "brightness",
            "enum": [
              "brightness",
              "rectangle",
              "difference",
              "circle"
            ],
            "title": "Mode",
            "type": "string"
          },
          "roi_height": {
            "default": 360,
            "exclusiveMinimum": 0.0,
            "title": "Roi Height",
            "type": "integer"
          },
          "roi_width": {
            "default": 640,
            "exclusiveMinimum": 0.0,
            "title": "Roi Width",
            "type": "integer"
          },
          "roi_x": {
            "default": 320,
            "minimum": 0.0,
            "title": "Roi X",
            "type": "integer"
          },
          "roi_y": {
            "default": 180,
            "minimum": 0.0,
            "title": "Roi Y",
            "type": "integer"
          },
          "white_rgb_min": {
            "default": [
              200,
              200,
              200
            ],
            "maxItems": 3,
            "minItems": 3,
            "prefixItems": [
              {
                "type": "integer"
              },
              {
                "type": "integer"
              },
              {
                "type": "integer"
              }
            ],
            "title": "White Rgb Min",
            "type": "array"
          }
        },
        "title": "IOBoxSizerDetectionConfig",
        "type": "object"
      },
      "IOBoxSizerDimensions": {
        "properties": {
          "height": {
            "title": "Height",
            "type": "number"
          },
          "length": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Length"
          },
          "width": {
            "title": "Width",
            "type": "number"
          }
        },
        "required": [
          "width",
          "height"
        ],
        "title": "IOBoxSizerDimensions",
        "type": "object"
      },
      "IOBoxSizerHistoryConfig": {
        "properties": {
          "debug_image_dir": {
            "default": "data/iobox_sizer/captures",
            "title": "Debug Image Dir",
            "type": "string"
          },
          "max_recent_results": {
            "default": 200,
            "exclusiveMinimum": 0.0,
            "title": "Max Recent Results",
            "type": "integer"
          },
          "save_debug_images": {
            "default": false,
            "title": "Save Debug Images",
            "type": "boolean"
          }
        },
        "title": "IOBoxSizerHistoryConfig",
        "type": "object"
      },
      "IOBoxSizerMeasurement": {
        "properties": {
          "calibration_warnings": {
            "items": {
              "type": "string"
            },
            "title": "Calibration Warnings",
            "type": "array"
          },
          "center_x": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Center X"
          },
          "center_y": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Center Y"
          },
          "debug_image_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Debug Image Path"
          },
          "depth_delta_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Depth Delta Mm"
          },
          "depth_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Depth Mm"
          },
          "detected": {
            "title": "Detected",
            "type": "boolean"
          },
          "dimensions_mm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IOBoxSizerDimensions"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "integer"
          },
          "frame_height": {
            "title": "Frame Height",
            "type": "integer"
          },
          "frame_width": {
            "title": "Frame Width",
            "type": "integer"
          },
          "height_px": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height Px"
          },
          "mode": {
            "enum": [
              "brightness",
              "rectangle",
              "difference",
              "circle"
            ],
            "title": "Mode",
            "type": "string"
          },
          "sensor_channel": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sensor Channel"
          },
          "sensor_index": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sensor Index"
          },
          "timestamp": {
            "format": "date-time",
            "title": "Timestamp",
            "type": "string"
          },
          "tof_readings": {
            "items": {
              "$ref": "#/components/schemas/IOBoxSizerToFReading"
            },
            "title": "Tof Readings",
            "type": "array"
          },
          "width_px": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width Px"
          }
        },
        "required": [
          "detected",
          "mode",
          "frame_width",
          "frame_height",
          "duration_ms"
        ],
        "title": "IOBoxSizerMeasurement",
        "type": "object"
      },
      "IOBoxSizerToFConfig": {
        "properties": {
          "aggregation": {
            "default": "median",
            "enum": [
              "median",
              "mean",
              "nearest",
              "farthest"
            ],
            "title": "Aggregation",
            "type": "string"
          },
          "channels": {
            "items": {
              "type": "integer"
            },
            "title": "Channels",
            "type": "array"
          },
          "distance_mode": {
            "anyOf": [
              {
                "enum": [
                  1,
                  2
                ],
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Distance Mode"
          },
          "ftdi_url": {
            "default": "ftdi://ftdi:232h/1",
            "minLength": 1,
            "title": "Ftdi Url",
            "type": "string"
          },
          "mux_address": {
            "default": 112,
            "maximum": 127.0,
            "minimum": 0.0,
            "title": "Mux Address",
            "type": "integer"
          },
          "preferred_sensor_index": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Sensor Index"
          },
          "read_timeout_s": {
            "default": 0.5,
            "exclusiveMinimum": 0.0,
            "title": "Read Timeout S",
            "type": "number"
          },
          "roi_center": {
            "anyOf": [
              {
                "maximum": 255.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Roi Center"
          },
          "roi_height": {
            "anyOf": [
              {
                "maximum": 16.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Roi Height"
          },
          "roi_width": {
            "anyOf": [
              {
                "maximum": 16.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Roi Width"
          },
          "sample_interval_ms": {
            "default": 0,
            "maximum": 1000.0,
            "minimum": 0.0,
            "title": "Sample Interval Ms",
            "type": "integer"
          },
          "samples": {
            "default": 1,
            "maximum": 25.0,
            "minimum": 1.0,
            "title": "Samples",
            "type": "integer"
          },
          "sensor_address": {
            "default": 41,
            "maximum": 127.0,
            "minimum": 0.0,
            "title": "Sensor Address",
            "type": "integer"
          },
          "timing_budget_ms": {
            "default": 200,
            "exclusiveMinimum": 0.0,
            "title": "Timing Budget Ms",
            "type": "integer"
          }
        },
        "title": "IOBoxSizerToFConfig",
        "type": "object"
      },
      "IOBoxSizerToFReading": {
        "properties": {
          "depth_delta_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Depth Delta Mm"
          },
          "depth_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Depth Mm"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "sensor_channel": {
            "title": "Sensor Channel",
            "type": "integer"
          },
          "sensor_index": {
            "title": "Sensor Index",
            "type": "integer"
          }
        },
        "required": [
          "sensor_index",
          "sensor_channel"
        ],
        "title": "IOBoxSizerToFReading",
        "type": "object"
      },
      "IdleCommand": {
        "properties": {
          "command": {
            "const": "idle",
            "default": "idle",
            "title": "Command",
            "type": "string"
          }
        },
        "title": "IdleCommand",
        "type": "object"
      },
      "InitComponentResponse": {
        "properties": {
          "component": {
            "title": "Component",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "phase": {
            "title": "Phase",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "number"
          }
        },
        "required": [
          "component",
          "phase",
          "detail",
          "reason",
          "updated_at"
        ],
        "title": "InitComponentResponse",
        "type": "object"
      },
      "InitializeCommand": {
        "properties": {
          "command": {
            "const": "initialize",
            "default": "initialize",
            "title": "Command",
            "type": "string"
          }
        },
        "title": "InitializeCommand",
        "type": "object"
      },
      "InventoryPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemWithLocations"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "skip": {
            "title": "Skip",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "InventoryPage",
        "type": "object"
      },
      "ItemCreate": {
        "description": "Request payload for creating an item.",
        "properties": {
          "access_level_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Level Id"
          },
          "barcode": {
            "title": "Barcode",
            "type": "string"
          },
          "dimensions": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Positive width, height, and length in millimeters; required when enrolling a new item.",
            "examples": [
              {
                "height": 10,
                "length": 10,
                "width": 10
              }
            ],
            "title": "Dimensions"
          },
          "full_net_weight": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Mass in grams. Omit to preserve; null clears this reference.",
            "title": "Full Net Weight"
          },
          "item_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Arbitrary item metadata; metadata is also accepted as an input alias. Replaces the object when supplied.",
            "title": "Item Metadata"
          },
          "name": {
            "maxLength": 255,
            "title": "Name",
            "type": "string"
          },
          "net_weight": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contents mass in grams; requires known tare. Mutually exclusive with weight. Null clears current gross/net.",
            "examples": [
              250.5
            ],
            "title": "Net Weight"
          },
          "tare_weight": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Mass in grams. Omit to preserve; null clears this reference.",
            "title": "Tare Weight"
          },
          "weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gross mass in grams. Do not combine with net_weight; null does not clear stored gross.",
            "examples": [
              350.5
            ],
            "title": "Weight"
          }
        },
        "required": [
          "barcode",
          "name"
        ],
        "title": "ItemCreate",
        "type": "object"
      },
      "ItemLocationCreate": {
        "description": "Request payload for assigning a location to an item.",
        "properties": {
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          }
        },
        "required": [
          "side",
          "shelf_idx",
          "cell_idx"
        ],
        "title": "ItemLocationCreate",
        "type": "object"
      },
      "ItemLocationRequest": {
        "description": "Request payload for assigning or removing one item location.",
        "properties": {
          "barcode": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Barcode",
            "type": "string"
          },
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          }
        },
        "required": [
          "side",
          "shelf_idx",
          "cell_idx",
          "barcode"
        ],
        "title": "ItemLocationRequest",
        "type": "object"
      },
      "ItemUpdateRequest": {
        "description": "Request payload for updating one item.",
        "properties": {
          "access_level_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Level Id"
          },
          "barcode": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Barcode",
            "type": "string"
          },
          "dimensions": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Positive width, height, and length in millimeters; required when enrolling a new item.",
            "examples": [
              {
                "height": 10,
                "length": 10,
                "width": 10
              }
            ],
            "title": "Dimensions"
          },
          "full_net_weight": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Mass in grams. Omit to preserve; null clears this reference.",
            "title": "Full Net Weight"
          },
          "item_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Arbitrary item metadata; metadata is also accepted as an input alias. Replaces the object when supplied.",
            "title": "Item Metadata"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "net_weight": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contents mass in grams; requires known tare. Mutually exclusive with weight. Null clears current gross/net.",
            "examples": [
              250.5
            ],
            "title": "Net Weight"
          },
          "tare_weight": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Mass in grams. Omit to preserve; null clears this reference.",
            "title": "Tare Weight"
          },
          "weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gross mass in grams. Do not combine with net_weight; null does not clear stored gross.",
            "examples": [
              350.5
            ],
            "title": "Weight"
          }
        },
        "required": [
          "barcode"
        ],
        "title": "ItemUpdateRequest",
        "type": "object"
      },
      "ItemWithLocations": {
        "description": "Response payload describing an item with its locations.",
        "properties": {
          "access_level_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Level Id"
          },
          "barcode": {
            "title": "Barcode",
            "type": "string"
          },
          "bin": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Bin membership and aggregate state; null for direct inventory",
            "title": "Bin"
          },
          "can_retrieve": {
            "title": "Can Retrieve",
            "type": "boolean"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "dimensions": {
            "additionalProperties": {
              "type": "number"
            },
            "title": "Dimensions",
            "type": "object"
          },
          "full_net_weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full contents reference in grams; independent of current contents",
            "title": "Full Net Weight"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "locations": {
            "description": "Direct database locations, plus the bin home location when binned; use the bin workflow for binned items",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Locations",
            "type": "array"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "net_weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gross minus tare in grams, or null if unknown or gross is below tare",
            "title": "Net Weight"
          },
          "tare_weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Known empty-container mass in grams",
            "title": "Tare Weight"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weight"
          }
        },
        "required": [
          "id",
          "barcode",
          "name",
          "dimensions",
          "weight",
          "access_level_id",
          "locations",
          "created_at",
          "updated_at",
          "can_retrieve"
        ],
        "title": "ItemWithLocations",
        "type": "object"
      },
      "JogRequest": {
        "properties": {
          "axis": {
            "enum": [
              "x",
              "y",
              "z",
              "stage"
            ],
            "title": "Axis",
            "type": "string"
          },
          "delta": {
            "description": "Signed displacement in millimeters",
            "title": "Delta",
            "type": "number"
          }
        },
        "required": [
          "axis",
          "delta"
        ],
        "title": "JogRequest",
        "type": "object"
      },
      "Json": {
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "items": {},
              "type": "array"
            }
          ]
        },
        "type": "object"
      },
      "LabelScanRequest": {
        "properties": {
          "barcode": {
            "minLength": 1,
            "title": "Barcode",
            "type": "string"
          }
        },
        "required": [
          "barcode"
        ],
        "title": "LabelScanRequest",
        "type": "object"
      },
      "LaserAutoCalibrationAngleResult": {
        "properties": {
          "alpha_deg": {
            "title": "Alpha Deg",
            "type": "number"
          },
          "capture_y_mm": {
            "title": "Capture Y Mm",
            "type": "number"
          },
          "line_angle_deg": {
            "title": "Line Angle Deg",
            "type": "number"
          },
          "max_abs_residual_mm": {
            "title": "Max Abs Residual Mm",
            "type": "number"
          },
          "method": {
            "const": "stage_stall",
            "default": "stage_stall",
            "title": "Method",
            "type": "string"
          },
          "previous_rotation_deg": {
            "title": "Previous Rotation Deg",
            "type": "number"
          },
          "rms_residual_mm": {
            "title": "Rms Residual Mm",
            "type": "number"
          },
          "sample_count": {
            "title": "Sample Count",
            "type": "integer"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          },
          "stage_position_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Position Mm"
          },
          "updated_rotation_deg": {
            "title": "Updated Rotation Deg",
            "type": "number"
          }
        },
        "required": [
          "side",
          "alpha_deg",
          "sample_count",
          "capture_y_mm",
          "rms_residual_mm",
          "max_abs_residual_mm",
          "line_angle_deg",
          "previous_rotation_deg",
          "updated_rotation_deg"
        ],
        "title": "LaserAutoCalibrationAngleResult",
        "type": "object"
      },
      "LaserAutoCalibrationCandidate": {
        "properties": {
          "row_count": {
            "default": 1,
            "title": "Row Count",
            "type": "integer"
          },
          "shelf_idx": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shelf Idx"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          },
          "wall_depth_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Depth Mm"
          },
          "wall_sample_count": {
            "default": 0,
            "title": "Wall Sample Count",
            "type": "integer"
          },
          "x_max": {
            "title": "X Max",
            "type": "number"
          },
          "x_min": {
            "title": "X Min",
            "type": "number"
          },
          "y_max": {
            "title": "Y Max",
            "type": "number"
          },
          "y_min": {
            "title": "Y Min",
            "type": "number"
          }
        },
        "required": [
          "side",
          "x_min",
          "x_max",
          "y_min",
          "y_max"
        ],
        "title": "LaserAutoCalibrationCandidate",
        "type": "object"
      },
      "LaserAutoCalibrationCell": {
        "properties": {
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "center_x_mm": {
            "title": "Center X Mm",
            "type": "number"
          },
          "center_y_mm": {
            "title": "Center Y Mm",
            "type": "number"
          },
          "height_mm": {
            "title": "Height Mm",
            "type": "number"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          },
          "tool_x_mm": {
            "title": "Tool X Mm",
            "type": "number"
          },
          "tool_y_mm": {
            "title": "Tool Y Mm",
            "type": "number"
          },
          "wall_depth_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Depth Mm"
          },
          "width_mm": {
            "title": "Width Mm",
            "type": "number"
          }
        },
        "required": [
          "side",
          "shelf_idx",
          "cell_idx",
          "tool_x_mm",
          "tool_y_mm",
          "center_x_mm",
          "center_y_mm",
          "width_mm",
          "height_mm"
        ],
        "title": "LaserAutoCalibrationCell",
        "type": "object"
      },
      "LaserAutoCalibrationError": {
        "properties": {
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id"
          },
          "diagnostic_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Diagnostic Snapshot"
          },
          "error": {
            "title": "Error",
            "type": "string"
          },
          "error_type": {
            "title": "Error Type",
            "type": "string"
          },
          "fault_context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fault Context"
          },
          "phase": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          }
        },
        "required": [
          "error_type",
          "error"
        ],
        "title": "LaserAutoCalibrationError",
        "type": "object"
      },
      "LaserAutoCalibrationReferenceOffset": {
        "description": "Offset derived from the hand-calibrated cells a run used as its reference frame.",
        "properties": {
          "applied": {
            "default": false,
            "title": "Applied",
            "type": "boolean"
          },
          "configured_offset_x_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Configured Offset X Mm"
          },
          "configured_offset_y_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Configured Offset Y Mm"
          },
          "intercept_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intercept Mm"
          },
          "offset_x_mm": {
            "title": "Offset X Mm",
            "type": "number"
          },
          "offset_y_mm": {
            "title": "Offset Y Mm",
            "type": "number"
          },
          "persisted": {
            "default": false,
            "title": "Persisted",
            "type": "boolean"
          },
          "sample_count": {
            "title": "Sample Count",
            "type": "integer"
          },
          "samples": {
            "items": {
              "$ref": "#/components/schemas/LaserAutoCalibrationReferenceOffsetSample"
            },
            "title": "Samples",
            "type": "array"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          },
          "skipped": {
            "items": {
              "type": "string"
            },
            "title": "Skipped",
            "type": "array"
          },
          "slope_per_mm": {
            "default": 0.0,
            "title": "Slope Per Mm",
            "type": "number"
          },
          "spread_x_mm": {
            "title": "Spread X Mm",
            "type": "number"
          },
          "spread_y_mm": {
            "title": "Spread Y Mm",
            "type": "number"
          }
        },
        "required": [
          "side",
          "offset_x_mm",
          "offset_y_mm",
          "spread_x_mm",
          "spread_y_mm",
          "sample_count"
        ],
        "title": "LaserAutoCalibrationReferenceOffset",
        "type": "object"
      },
      "LaserAutoCalibrationReferenceOffsetSample": {
        "properties": {
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "delta_x_mm": {
            "title": "Delta X Mm",
            "type": "number"
          },
          "delta_y_mm": {
            "title": "Delta Y Mm",
            "type": "number"
          },
          "derived_intercept_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Derived Intercept Mm"
          },
          "detected_x_mm": {
            "title": "Detected X Mm",
            "type": "number"
          },
          "detected_y_mm": {
            "title": "Detected Y Mm",
            "type": "number"
          },
          "manual_x_mm": {
            "title": "Manual X Mm",
            "type": "number"
          },
          "manual_y_mm": {
            "title": "Manual Y Mm",
            "type": "number"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "wall_depth_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Depth Mm"
          }
        },
        "required": [
          "shelf_idx",
          "cell_idx",
          "manual_x_mm",
          "manual_y_mm",
          "detected_x_mm",
          "detected_y_mm",
          "delta_x_mm",
          "delta_y_mm"
        ],
        "title": "LaserAutoCalibrationReferenceOffsetSample",
        "type": "object"
      },
      "LaserAutoCalibrationScope": {
        "properties": {
          "cell_idx": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cell Idx"
          },
          "hold_y_enabled": {
            "default": true,
            "title": "Hold Y Enabled",
            "type": "boolean"
          },
          "include_angle_calibration": {
            "default": true,
            "title": "Include Angle Calibration",
            "type": "boolean"
          },
          "include_extension_calibration": {
            "default": true,
            "title": "Include Extension Calibration",
            "type": "boolean"
          },
          "mode": {
            "default": "all",
            "enum": [
              "all",
              "both",
              "side",
              "shelf",
              "cell"
            ],
            "title": "Mode",
            "type": "string"
          },
          "shelf_idx": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shelf Idx"
          },
          "side": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StorageModuleSide"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "LaserAutoCalibrationScope",
        "type": "object"
      },
      "LaserAutoCalibrationShelfEdge": {
        "properties": {
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          },
          "x_mm": {
            "title": "X Mm",
            "type": "number"
          },
          "y_mm": {
            "title": "Y Mm",
            "type": "number"
          }
        },
        "required": [
          "side",
          "x_mm",
          "y_mm"
        ],
        "title": "LaserAutoCalibrationShelfEdge",
        "type": "object"
      },
      "LaserAutoCalibrationSnapshot": {
        "properties": {
          "angle_results": {
            "items": {
              "$ref": "#/components/schemas/LaserAutoCalibrationAngleResult"
            },
            "title": "Angle Results",
            "type": "array"
          },
          "back_candidate_count": {
            "default": 0,
            "title": "Back Candidate Count",
            "type": "integer"
          },
          "back_detected_cell_count": {
            "default": 0,
            "title": "Back Detected Cell Count",
            "type": "integer"
          },
          "back_scouted_shelf_count": {
            "default": 0,
            "title": "Back Scouted Shelf Count",
            "type": "integer"
          },
          "back_stage_extension_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Back Stage Extension Mm"
          },
          "bounds": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScanBounds"
              },
              {
                "type": "null"
              }
            ]
          },
          "candidate_count": {
            "default": 0,
            "title": "Candidate Count",
            "type": "integer"
          },
          "current_side": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StorageModuleSide"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Stage"
          },
          "detected_cell_count": {
            "default": 0,
            "title": "Detected Cell Count",
            "type": "integer"
          },
          "detected_cells": {
            "items": {
              "$ref": "#/components/schemas/LaserAutoCalibrationCell"
            },
            "title": "Detected Cells",
            "type": "array"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "error_detail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LaserAutoCalibrationError"
              },
              {
                "type": "null"
              }
            ]
          },
          "front_candidate_count": {
            "default": 0,
            "title": "Front Candidate Count",
            "type": "integer"
          },
          "front_detected_cell_count": {
            "default": 0,
            "title": "Front Detected Cell Count",
            "type": "integer"
          },
          "front_scouted_shelf_count": {
            "default": 0,
            "title": "Front Scouted Shelf Count",
            "type": "integer"
          },
          "front_stage_extension_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Front Stage Extension Mm"
          },
          "reference_offset_results": {
            "items": {
              "$ref": "#/components/schemas/LaserAutoCalibrationReferenceOffset"
            },
            "title": "Reference Offset Results",
            "type": "array"
          },
          "requested_scope": {
            "$ref": "#/components/schemas/LaserAutoCalibrationScope"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "scouted_shelf_count": {
            "default": 0,
            "title": "Scouted Shelf Count",
            "type": "integer"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "shelf_candidates": {
            "items": {
              "$ref": "#/components/schemas/LaserAutoCalibrationCandidate"
            },
            "title": "Shelf Candidates",
            "type": "array"
          },
          "shelf_edges": {
            "items": {
              "$ref": "#/components/schemas/LaserAutoCalibrationShelfEdge"
            },
            "title": "Shelf Edges",
            "type": "array"
          },
          "stage_detail": {
            "additionalProperties": true,
            "title": "Stage Detail",
            "type": "object"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "state": {
            "default": "idle",
            "enum": [
              "idle",
              "starting",
              "running",
              "applying",
              "completed",
              "failed",
              "cancelled"
            ],
            "title": "State",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "z_stall_results": {
            "items": {
              "$ref": "#/components/schemas/LaserAutoCalibrationZStallResult"
            },
            "title": "Z Stall Results",
            "type": "array"
          }
        },
        "title": "LaserAutoCalibrationSnapshot",
        "type": "object"
      },
      "LaserAutoCalibrationZStallResult": {
        "description": "A probed z model, and how it stood up to the hand-calibrated datum.",
        "properties": {
          "applied": {
            "default": false,
            "title": "Applied",
            "type": "boolean"
          },
          "dropped_repeats": {
            "items": {
              "type": "string"
            },
            "title": "Dropped Repeats",
            "type": "array"
          },
          "fit_source": {
            "title": "Fit Source",
            "type": "string"
          },
          "intercept_mm": {
            "title": "Intercept Mm",
            "type": "number"
          },
          "manual_agreement_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manual Agreement Mm"
          },
          "manual_agreement_tolerance_mm": {
            "title": "Manual Agreement Tolerance Mm",
            "type": "number"
          },
          "manual_capture_unstamped": {
            "default": 0,
            "title": "Manual Capture Unstamped",
            "type": "integer"
          },
          "manual_captured_stage_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manual Captured Stage Mm"
          },
          "manual_intercept_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manual Intercept Mm"
          },
          "persisted": {
            "default": false,
            "title": "Persisted",
            "type": "boolean"
          },
          "sample_count": {
            "title": "Sample Count",
            "type": "integer"
          },
          "samples": {
            "items": {
              "$ref": "#/components/schemas/LaserAutoCalibrationZStallSample"
            },
            "title": "Samples",
            "type": "array"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          },
          "skipped": {
            "items": {
              "type": "string"
            },
            "title": "Skipped",
            "type": "array"
          },
          "slope_per_mm": {
            "title": "Slope Per Mm",
            "type": "number"
          },
          "slope_source": {
            "default": "probe",
            "title": "Slope Source",
            "type": "string"
          },
          "stage_extension_mm": {
            "title": "Stage Extension Mm",
            "type": "number"
          },
          "x_span_mm": {
            "title": "X Span Mm",
            "type": "number"
          },
          "z_place_mm": {
            "title": "Z Place Mm",
            "type": "number"
          }
        },
        "required": [
          "side",
          "intercept_mm",
          "slope_per_mm",
          "fit_source",
          "sample_count",
          "x_span_mm",
          "stage_extension_mm",
          "z_place_mm",
          "manual_agreement_tolerance_mm"
        ],
        "title": "LaserAutoCalibrationZStallResult",
        "type": "object"
      },
      "LaserAutoCalibrationZStallSample": {
        "properties": {
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "delta_mm": {
            "title": "Delta Mm",
            "type": "number"
          },
          "probe_x_mm": {
            "title": "Probe X Mm",
            "type": "number"
          },
          "probe_y_mm": {
            "title": "Probe Y Mm",
            "type": "number"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "wall_depth_mm": {
            "title": "Wall Depth Mm",
            "type": "number"
          },
          "z_contact_mm": {
            "title": "Z Contact Mm",
            "type": "number"
          },
          "z_contact_repeat_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Z Contact Repeat Mm"
          }
        },
        "required": [
          "shelf_idx",
          "cell_idx",
          "probe_x_mm",
          "probe_y_mm",
          "wall_depth_mm",
          "z_contact_mm",
          "z_contact_repeat_mm",
          "delta_mm"
        ],
        "title": "LaserAutoCalibrationZStallSample",
        "type": "object"
      },
      "LaserReadingResponse": {
        "properties": {
          "distance_mm": {
            "title": "Distance Mm",
            "type": "number"
          }
        },
        "required": [
          "distance_mm"
        ],
        "title": "LaserReadingResponse",
        "type": "object"
      },
      "LoginRequest": {
        "description": "Login request model.",
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "pin": {
            "title": "Pin",
            "type": "string"
          }
        },
        "required": [
          "email",
          "pin"
        ],
        "title": "LoginRequest",
        "type": "object"
      },
      "MessageResponse": {
        "properties": {
          "message": {
            "description": "Operation acknowledgment",
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "MessageResponse",
        "type": "object"
      },
      "ModeResponse": {
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string"
          }
        },
        "required": [
          "mode"
        ],
        "title": "ModeResponse",
        "type": "object"
      },
      "MotorMoveRequest": {
        "properties": {
          "position_mm": {
            "description": "Target position in millimeters",
            "title": "Position Mm",
            "type": "number"
          }
        },
        "required": [
          "position_mm"
        ],
        "title": "MotorMoveRequest",
        "type": "object"
      },
      "MotorOperationResponse": {
        "properties": {
          "motor": {
            "title": "Motor",
            "type": "string"
          },
          "position_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Requested target, when this is a move",
            "title": "Position Mm"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "motor"
        ],
        "title": "MotorOperationResponse",
        "type": "object"
      },
      "MotorProbeResponse": {
        "properties": {
          "busy": {
            "default": false,
            "title": "Busy",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/MotorProbeResult"
            },
            "title": "Results",
            "type": "array"
          }
        },
        "title": "MotorProbeResponse",
        "type": "object"
      },
      "MotorProbeResult": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "motor_name": {
            "title": "Motor Name",
            "type": "string"
          },
          "position_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position Mm"
          },
          "responsive": {
            "title": "Responsive",
            "type": "boolean"
          }
        },
        "required": [
          "motor_name",
          "responsive"
        ],
        "title": "MotorProbeResult",
        "type": "object"
      },
      "MotorsResponse": {
        "properties": {
          "init_components": {
            "items": {
              "$ref": "#/components/schemas/InitComponentResponse"
            },
            "title": "Init Components",
            "type": "array"
          },
          "init_phase": {
            "title": "Init Phase",
            "type": "string"
          },
          "io": {
            "description": "Configured IO motors and their diagnostic identifiers",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Io",
            "type": "array"
          },
          "tool": {
            "description": "Configured tool motors and their diagnostic identifiers",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Tool",
            "type": "array"
          }
        },
        "required": [
          "io",
          "tool",
          "init_phase",
          "init_components"
        ],
        "title": "MotorsResponse",
        "type": "object"
      },
      "MoveCommand": {
        "properties": {
          "command": {
            "const": "move",
            "default": "move",
            "title": "Command",
            "type": "string"
          },
          "coordinate": {
            "$ref": "#/components/schemas/AxisCoordinate"
          }
        },
        "required": [
          "coordinate"
        ],
        "title": "MoveCommand",
        "type": "object"
      },
      "MovePositionRequest": {
        "properties": {
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          },
          "x": {
            "description": "Position or extension in millimeters",
            "title": "X",
            "type": "number"
          },
          "y": {
            "description": "Position or extension in millimeters",
            "title": "Y",
            "type": "number"
          },
          "z_offset": {
            "default": 0.0,
            "title": "Z Offset",
            "type": "number"
          }
        },
        "required": [
          "side",
          "x",
          "y"
        ],
        "title": "MovePositionRequest",
        "type": "object"
      },
      "MoveRequest": {
        "properties": {
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          }
        },
        "required": [
          "side",
          "shelf_idx",
          "cell_idx"
        ],
        "title": "MoveRequest",
        "type": "object"
      },
      "OnboardingStatus": {
        "properties": {
          "needs_onboarding": {
            "title": "Needs Onboarding",
            "type": "boolean"
          }
        },
        "required": [
          "needs_onboarding"
        ],
        "title": "OnboardingStatus",
        "type": "object"
      },
      "PositionResponse": {
        "properties": {
          "slide_extension": {
            "description": "Position or extension in millimeters",
            "title": "Slide Extension",
            "type": "number"
          },
          "warnings": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warnings"
          },
          "x": {
            "description": "Position or extension in millimeters",
            "title": "X",
            "type": "number"
          },
          "y": {
            "description": "Position or extension in millimeters",
            "title": "Y",
            "type": "number"
          },
          "z_offset": {
            "description": "Position or extension in millimeters",
            "title": "Z Offset",
            "type": "number"
          }
        },
        "required": [
          "x",
          "y",
          "z_offset",
          "slide_extension"
        ],
        "title": "PositionResponse",
        "type": "object"
      },
      "PowerCycleResponse": {
        "properties": {
          "axes_needing_home": {
            "description": "Axes that must be re-homed before further motion",
            "items": {
              "type": "string"
            },
            "title": "Axes Needing Home",
            "type": "array"
          },
          "rail": {
            "title": "Rail",
            "type": "string"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "rail",
          "axes_needing_home"
        ],
        "title": "PowerCycleResponse",
        "type": "object"
      },
      "PowerRailStatus": {
        "properties": {
          "axes": {
            "description": "Motors that lose their encoder reference when this rail is cut",
            "items": {
              "type": "string"
            },
            "title": "Axes",
            "type": "array"
          },
          "gripper": {
            "description": "Whether the gripper servo drops with this rail",
            "title": "Gripper",
            "type": "boolean"
          },
          "powered": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current rail state; null when it cannot be read",
            "title": "Powered"
          },
          "rail": {
            "description": "GPIO output identifier of the switched rail",
            "title": "Rail",
            "type": "string"
          },
          "supplies": {
            "description": "Hardware that loses power when this rail is cut",
            "title": "Supplies",
            "type": "string"
          }
        },
        "required": [
          "rail",
          "supplies",
          "axes",
          "gripper",
          "powered"
        ],
        "title": "PowerRailStatus",
        "type": "object"
      },
      "PowerRailsResponse": {
        "properties": {
          "hold_seconds": {
            "description": "How long a cycle cuts the rail before restoring power",
            "title": "Hold Seconds",
            "type": "number"
          },
          "rails": {
            "items": {
              "$ref": "#/components/schemas/PowerRailStatus"
            },
            "title": "Rails",
            "type": "array"
          }
        },
        "required": [
          "hold_seconds",
          "rails"
        ],
        "title": "PowerRailsResponse",
        "type": "object"
      },
      "PrintLabelRequest": {
        "properties": {
          "barcode": {
            "maxLength": 255,
            "minLength": 1,
            "pattern": "^[\\x20-\\x7E]+$",
            "title": "Barcode",
            "type": "string"
          }
        },
        "required": [
          "barcode"
        ],
        "title": "PrintLabelRequest",
        "type": "object"
      },
      "PrintLabelResponse": {
        "properties": {
          "barcode": {
            "title": "Barcode",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "printed": {
            "title": "Printed",
            "type": "boolean"
          }
        },
        "required": [
          "message",
          "barcode",
          "printed"
        ],
        "title": "PrintLabelResponse",
        "type": "object"
      },
      "PrinterFeedConfig": {
        "properties": {
          "feed_dots": {
            "maximum": 128.0,
            "minimum": 0.0,
            "title": "Feed Dots",
            "type": "integer"
          }
        },
        "required": [
          "feed_dots"
        ],
        "title": "PrinterFeedConfig",
        "type": "object"
      },
      "PrinterStatusResponse": {
        "properties": {
          "auto_recoverable_error": {
            "default": false,
            "title": "Auto Recoverable Error",
            "type": "boolean"
          },
          "connected": {
            "title": "Connected",
            "type": "boolean"
          },
          "cover_open": {
            "default": false,
            "title": "Cover Open",
            "type": "boolean"
          },
          "cutter_error": {
            "default": false,
            "title": "Cutter Error",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "healthy": {
            "title": "Healthy",
            "type": "boolean"
          },
          "paper_near_end": {
            "default": false,
            "title": "Paper Near End",
            "type": "boolean"
          },
          "paper_out": {
            "default": false,
            "title": "Paper Out",
            "type": "boolean"
          },
          "recoverable_error": {
            "default": false,
            "title": "Recoverable Error",
            "type": "boolean"
          },
          "simulated": {
            "default": false,
            "title": "Simulated",
            "type": "boolean"
          },
          "unrecoverable_error": {
            "default": false,
            "title": "Unrecoverable Error",
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "connected",
          "healthy"
        ],
        "title": "PrinterStatusResponse",
        "type": "object"
      },
      "PublicUserResponse": {
        "description": "Public user information for lock screen.",
        "properties": {
          "accessLevel": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accesslevel"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "firstName": {
            "title": "Firstname",
            "type": "string"
          },
          "lastName": {
            "title": "Lastname",
            "type": "string"
          },
          "role": {
            "additionalProperties": true,
            "title": "Role",
            "type": "object"
          }
        },
        "required": [
          "email",
          "firstName",
          "lastName",
          "role"
        ],
        "title": "PublicUserResponse",
        "type": "object"
      },
      "RefreshRequest": {
        "description": "Refresh token request.",
        "properties": {
          "refresh_token": {
            "title": "Refresh Token",
            "type": "string"
          }
        },
        "required": [
          "refresh_token"
        ],
        "title": "RefreshRequest",
        "type": "object"
      },
      "ReportErrorRequest": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "ReportErrorRequest",
        "type": "object"
      },
      "ReportErrorResponse": {
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "ReportErrorResponse",
        "type": "object"
      },
      "RestartResponse": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "RestartResponse",
        "type": "object"
      },
      "RetrieveItemCommand": {
        "properties": {
          "barcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Barcode"
          },
          "command": {
            "const": "retrieve_item",
            "default": "retrieve_item",
            "title": "Command",
            "type": "string"
          },
          "location": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current item location. Required by the retrieval endpoint; bin homes cannot be retrieved directly.",
            "examples": [
              {
                "cell_idx": 2,
                "shelf_idx": 0,
                "side": "front_module"
              }
            ],
            "properties": {
              "cell_idx": {
                "description": "Zero-based cell index",
                "type": "integer"
              },
              "shelf_idx": {
                "description": "Zero-based shelf index",
                "type": "integer"
              },
              "side": {
                "enum": [
                  "front_module",
                  "back_module"
                ],
                "type": "string"
              }
            },
            "title": "Location"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Idempotency ID retained for seven days. Reuse only with the same payload.",
            "examples": [
              "store-001"
            ],
            "title": "Request Id"
          }
        },
        "title": "RetrieveItemCommand",
        "type": "object"
      },
      "RobotEventLogEntry": {
        "properties": {
          "command_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Command Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "seq": {
            "title": "Seq",
            "type": "integer"
          }
        },
        "required": [
          "seq",
          "created_at",
          "command_id",
          "payload"
        ],
        "title": "RobotEventLogEntry",
        "type": "object"
      },
      "RobotEventLogResponse": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/RobotEventLogEntry"
            },
            "title": "Events",
            "type": "array"
          },
          "latest_seq": {
            "title": "Latest Seq",
            "type": "integer"
          },
          "next_since": {
            "title": "Next Since",
            "type": "integer"
          }
        },
        "required": [
          "events",
          "latest_seq",
          "next_since"
        ],
        "title": "RobotEventLogResponse",
        "type": "object"
      },
      "RoleCreate": {
        "description": "Role creation request.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          }
        },
        "required": [
          "name",
          "permissions"
        ],
        "title": "RoleCreate",
        "type": "object"
      },
      "RoleResponse": {
        "description": "Role response model.",
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "user_count": {
            "title": "User Count",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "permissions",
          "user_count",
          "created_at",
          "updated_at"
        ],
        "title": "RoleResponse",
        "type": "object"
      },
      "RoleUpdate": {
        "description": "Role update request.",
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "permissions": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permissions"
          }
        },
        "title": "RoleUpdate",
        "type": "object"
      },
      "RotateSaveRequest": {
        "properties": {
          "back": {
            "title": "Back",
            "type": "number"
          },
          "front": {
            "title": "Front",
            "type": "number"
          }
        },
        "required": [
          "front",
          "back"
        ],
        "title": "RotateSaveRequest",
        "type": "object"
      },
      "RotationAnglesResponse": {
        "properties": {
          "back": {
            "title": "Back",
            "type": "number"
          },
          "front": {
            "title": "Front",
            "type": "number"
          }
        },
        "required": [
          "front",
          "back"
        ],
        "title": "RotationAnglesResponse",
        "type": "object"
      },
      "SafetyComponentOverrideRequest": {
        "properties": {
          "bypass": {
            "title": "Bypass",
            "type": "boolean"
          },
          "component": {
            "enum": [
              "light_curtain",
              "cabinet_doors",
              "weight_change"
            ],
            "title": "Component",
            "type": "string"
          }
        },
        "required": [
          "component",
          "bypass"
        ],
        "title": "SafetyComponentOverrideRequest",
        "type": "object"
      },
      "SafetyGuardOverrideRequest": {
        "properties": {
          "bypass": {
            "title": "Bypass",
            "type": "boolean"
          }
        },
        "required": [
          "bypass"
        ],
        "title": "SafetyGuardOverrideRequest",
        "type": "object"
      },
      "SafetyStatus": {
        "properties": {
          "active": {
            "default": false,
            "title": "Active",
            "type": "boolean"
          },
          "active_sources": {
            "items": {
              "type": "string"
            },
            "title": "Active Sources",
            "type": "array"
          },
          "awaiting_ack": {
            "default": false,
            "title": "Awaiting Ack",
            "type": "boolean"
          },
          "bypassed": {
            "default": false,
            "title": "Bypassed",
            "type": "boolean"
          },
          "can_acknowledge": {
            "default": false,
            "title": "Can Acknowledge",
            "type": "boolean"
          },
          "component_bypasses": {
            "additionalProperties": {
              "type": "boolean"
            },
            "title": "Component Bypasses",
            "type": "object"
          },
          "interruption_id": {
            "default": 0,
            "title": "Interruption Id",
            "type": "integer"
          },
          "last_changed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Changed At"
          },
          "motion_blocked": {
            "default": false,
            "title": "Motion Blocked",
            "type": "boolean"
          },
          "sources": {
            "additionalProperties": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Sources",
            "type": "object"
          }
        },
        "title": "SafetyStatus",
        "type": "object"
      },
      "SaveRequest": {
        "properties": {
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "dimensions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Dimensions"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cell width, height, and length in millimeters; omit to keep the current dimensions."
          },
          "is_manual": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Manual"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "x": {
            "description": "Position or extension in millimeters",
            "title": "X",
            "type": "number"
          },
          "y": {
            "description": "Position or extension in millimeters",
            "title": "Y",
            "type": "number"
          },
          "z_offset": {
            "description": "Position or extension in millimeters",
            "title": "Z Offset",
            "type": "number"
          }
        },
        "required": [
          "side",
          "shelf_idx",
          "cell_idx",
          "x",
          "y",
          "z_offset"
        ],
        "title": "SaveRequest",
        "type": "object"
      },
      "ScaleCalibrationParameters": {
        "properties": {
          "calibration_weight": {
            "description": "Known calibration weight in grams",
            "title": "Calibration Weight",
            "type": "integer"
          },
          "division": {
            "title": "Division",
            "type": "integer"
          },
          "full_scale": {
            "description": "Scale range in grams",
            "title": "Full Scale",
            "type": "integer"
          },
          "precision": {
            "title": "Precision",
            "type": "integer"
          }
        },
        "required": [
          "full_scale",
          "calibration_weight",
          "precision",
          "division"
        ],
        "title": "ScaleCalibrationParameters",
        "type": "object"
      },
      "ScaleCalibrationParamsRequest": {
        "properties": {
          "calibration_weight": {
            "description": "Known calibration weight in grams",
            "title": "Calibration Weight",
            "type": "integer"
          },
          "division": {
            "default": 1,
            "description": "Division value",
            "minimum": 1.0,
            "title": "Division",
            "type": "integer"
          },
          "full_scale": {
            "description": "Full scale value in grams (e.g., 6000 for 6kg)",
            "title": "Full Scale",
            "type": "integer"
          },
          "precision": {
            "default": 1,
            "description": "Decimal precision (0-3)",
            "maximum": 3.0,
            "minimum": 0.0,
            "title": "Precision",
            "type": "integer"
          }
        },
        "required": [
          "full_scale",
          "calibration_weight"
        ],
        "title": "ScaleCalibrationParamsRequest",
        "type": "object"
      },
      "ScaleCalibrationResult": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScaleCalibrationStatusResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "title": "ScaleCalibrationResult",
        "type": "object"
      },
      "ScaleCalibrationStatusResponse": {
        "properties": {
          "raw": {
            "title": "Raw",
            "type": "integer"
          },
          "weight_ok": {
            "title": "Weight Ok",
            "type": "boolean"
          },
          "zero_ok": {
            "title": "Zero Ok",
            "type": "boolean"
          }
        },
        "required": [
          "zero_ok",
          "weight_ok",
          "raw"
        ],
        "title": "ScaleCalibrationStatusResponse",
        "type": "object"
      },
      "ScaleReadingResponse": {
        "properties": {
          "decimal_position": {
            "title": "Decimal Position",
            "type": "integer"
          },
          "raw_registers": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Raw Registers",
            "type": "object"
          },
          "status": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Status",
            "type": "object"
          },
          "weight_grams": {
            "description": "Live gross scale reading in grams",
            "title": "Weight Grams",
            "type": "number"
          }
        },
        "required": [
          "weight_grams",
          "decimal_position",
          "status",
          "raw_registers"
        ],
        "title": "ScaleReadingResponse",
        "type": "object"
      },
      "ScanBounds": {
        "properties": {
          "x_max": {
            "title": "X Max",
            "type": "number"
          },
          "x_min": {
            "title": "X Min",
            "type": "number"
          },
          "y_max": {
            "title": "Y Max",
            "type": "number"
          },
          "y_min": {
            "title": "Y Min",
            "type": "number"
          }
        },
        "required": [
          "x_min",
          "x_max",
          "y_min",
          "y_max"
        ],
        "title": "ScanBounds",
        "type": "object"
      },
      "ScannerStatusResponse": {
        "properties": {
          "connected": {
            "title": "Connected",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "connected",
          "enabled"
        ],
        "title": "ScannerStatusResponse",
        "type": "object"
      },
      "Shelf": {
        "properties": {
          "cells": {
            "items": {
              "$ref": "#/components/schemas/Cell"
            },
            "title": "Cells",
            "type": "array"
          },
          "divider_width": {
            "default": 8.0,
            "title": "Divider Width",
            "type": "number"
          },
          "shelf_idx": {
            "default": 0,
            "minimum": 0.0,
            "title": "Shelf Idx",
            "type": "integer"
          }
        },
        "required": [
          "cells"
        ],
        "title": "Shelf",
        "type": "object"
      },
      "ShelfStageExtensionResponse": {
        "properties": {
          "back": {
            "title": "Back",
            "type": "number"
          },
          "front": {
            "title": "Front",
            "type": "number"
          }
        },
        "required": [
          "front",
          "back"
        ],
        "title": "ShelfStageExtensionResponse",
        "type": "object"
      },
      "ShelfStageExtensionSaveRequest": {
        "properties": {
          "back": {
            "title": "Back",
            "type": "number"
          },
          "front": {
            "title": "Front",
            "type": "number"
          }
        },
        "required": [
          "front",
          "back"
        ],
        "title": "ShelfStageExtensionSaveRequest",
        "type": "object"
      },
      "SizerBlankDistancesResponse": {
        "properties": {
          "success": {
            "title": "Success",
            "type": "boolean"
          },
          "tof_blank_mm": {
            "items": {
              "type": "number"
            },
            "title": "Tof Blank Mm",
            "type": "array"
          }
        },
        "required": [
          "success",
          "tof_blank_mm"
        ],
        "title": "SizerBlankDistancesResponse",
        "type": "object"
      },
      "SizerBlankFrameResponse": {
        "properties": {
          "blank_frame_path": {
            "title": "Blank Frame Path",
            "type": "string"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "blank_frame_path"
        ],
        "title": "SizerBlankFrameResponse",
        "type": "object"
      },
      "SizerConfigResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/IOBoxSizerConfig"
          },
          "status": {
            "$ref": "#/components/schemas/SizerStatusResponse"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "config",
          "status"
        ],
        "title": "SizerConfigResponse",
        "type": "object"
      },
      "SizerMeasurementResponse": {
        "properties": {
          "measurement": {
            "$ref": "#/components/schemas/IOBoxSizerMeasurement"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "measurement"
        ],
        "title": "SizerMeasurementResponse",
        "type": "object"
      },
      "SizerStatusResponse": {
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "camera": {
            "$ref": "#/components/schemas/IOBoxSizerCameraConfig"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error Type"
          },
          "last_measurement_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Measurement Time"
          },
          "measure_on_store": {
            "title": "Measure On Store",
            "type": "boolean"
          },
          "observer_mode_enabled": {
            "title": "Observer Mode Enabled",
            "type": "boolean"
          },
          "tof_channels": {
            "items": {
              "type": "integer"
            },
            "title": "Tof Channels",
            "type": "array"
          }
        },
        "required": [
          "enabled",
          "available",
          "observer_mode_enabled",
          "measure_on_store",
          "camera",
          "tof_channels",
          "last_error",
          "last_error_type",
          "last_measurement_time"
        ],
        "title": "SizerStatusResponse",
        "type": "object"
      },
      "StageMoveRequest": {
        "properties": {
          "position": {
            "title": "Position",
            "type": "number"
          }
        },
        "required": [
          "position"
        ],
        "title": "StageMoveRequest",
        "type": "object"
      },
      "StageMoveResponse": {
        "properties": {
          "position": {
            "description": "Applied target in millimeters",
            "title": "Position",
            "type": "number"
          },
          "warnings": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warnings"
          }
        },
        "required": [
          "position",
          "warnings"
        ],
        "title": "StageMoveResponse",
        "type": "object"
      },
      "StopCommand": {
        "properties": {
          "command": {
            "const": "stop",
            "default": "stop",
            "title": "Command",
            "type": "string"
          }
        },
        "title": "StopCommand",
        "type": "object"
      },
      "StorageBinDimensionsSettings": {
        "properties": {
          "height": {
            "exclusiveMinimum": 0.0,
            "title": "Height",
            "type": "number"
          },
          "length": {
            "exclusiveMinimum": 0.0,
            "title": "Length",
            "type": "number"
          },
          "width": {
            "exclusiveMinimum": 0.0,
            "title": "Width",
            "type": "number"
          }
        },
        "required": [
          "width",
          "height",
          "length"
        ],
        "title": "StorageBinDimensionsSettings",
        "type": "object"
      },
      "StorageCellResponse": {
        "description": "Response payload for a storage cell.",
        "properties": {
          "capacity": {
            "$ref": "#/components/schemas/DimensionsPayload"
          },
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "shelf_idx",
          "cell_idx",
          "capacity",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "StorageCellResponse",
        "type": "object"
      },
      "StorageCellUpdate": {
        "description": "Request payload for updating a storage cell.",
        "properties": {
          "capacity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/DimensionsPayload"
              },
              {
                "type": "null"
              }
            ],
            "title": "Capacity"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "title": "StorageCellUpdate",
        "type": "object"
      },
      "StorageGrid": {
        "properties": {
          "back_module": {
            "items": {
              "$ref": "#/components/schemas/Shelf"
            },
            "title": "Back Module",
            "type": "array"
          },
          "filename": {
            "default": "",
            "title": "Filename",
            "type": "string"
          },
          "front_module": {
            "items": {
              "$ref": "#/components/schemas/Shelf"
            },
            "title": "Front Module",
            "type": "array"
          }
        },
        "title": "StorageGrid",
        "type": "object"
      },
      "StorageModuleSide": {
        "enum": [
          "front_module",
          "back_module"
        ],
        "title": "StorageModuleSide",
        "type": "string"
      },
      "StoreItemCommand": {
        "properties": {
          "command": {
            "const": "store_item",
            "default": "store_item",
            "title": "Command",
            "type": "string"
          },
          "item": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing inventory barcode, or new item enrollment. Hardware also supports anonymous dimension-based storage; mock requires barcode, name and dimensions. Existing inventory mass/dimensions take precedence.",
            "examples": [
              {
                "barcode": "880000000001"
              },
              {
                "barcode": "880000000002",
                "dimensions": {
                  "height": 10,
                  "length": 10,
                  "width": 10
                },
                "full_net_weight": 500,
                "name": "Opened bottle",
                "net_weight": 250.5,
                "tare_weight": 100
              }
            ],
            "properties": {
              "access_level_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "barcode": {
                "description": "Inventory barcode",
                "type": "string"
              },
              "dimensions": {
                "description": "Positive millimeter dimensions",
                "properties": {
                  "height": {
                    "type": "number"
                  },
                  "length": {
                    "type": "number"
                  },
                  "width": {
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "full_net_weight": {
                "description": "Full contents reference in grams",
                "type": [
                  "number",
                  "null"
                ]
              },
              "metadata": {
                "additionalProperties": true,
                "type": "object"
              },
              "name": {
                "description": "New item display name",
                "type": "string"
              },
              "net_weight": {
                "description": "Contents grams; requires tare and excludes weight",
                "type": [
                  "number",
                  "null"
                ]
              },
              "tare_weight": {
                "description": "Empty-container grams",
                "type": [
                  "number",
                  "null"
                ]
              },
              "weight": {
                "description": "Gross grams; mutually exclusive with net_weight",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "title": "Item"
          },
          "location": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Requested destination cell. Must exist, be available, and fit the item. Storage bin homes are reserved and cannot be requested; demo mode keeps its configured cell mapping.",
            "examples": [
              {
                "cell_idx": 2,
                "shelf_idx": 0,
                "side": "front_module"
              }
            ],
            "properties": {
              "cell_idx": {
                "description": "Zero-based cell index",
                "type": "integer"
              },
              "shelf_idx": {
                "description": "Zero-based shelf index",
                "type": "integer"
              },
              "side": {
                "enum": [
                  "front_module",
                  "back_module"
                ],
                "type": "string"
              }
            },
            "title": "Location"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Idempotency ID retained for seven days. Reuse only with the same payload.",
            "examples": [
              "store-001"
            ],
            "title": "Request Id"
          }
        },
        "title": "StoreItemCommand",
        "type": "object"
      },
      "SuccessResponse": {
        "properties": {
          "message": {
            "default": "success",
            "title": "Message",
            "type": "string"
          }
        },
        "title": "SuccessResponse",
        "type": "object"
      },
      "SystemInfoResponse": {
        "properties": {
          "device_alias": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Alias"
          },
          "device_id": {
            "title": "Device Id",
            "type": "string"
          },
          "lan_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lan Ip"
          },
          "release_branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Branch"
          },
          "release_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Sha"
          }
        },
        "required": [
          "device_id",
          "device_alias",
          "release_sha",
          "release_branch",
          "lan_ip"
        ],
        "title": "SystemInfoResponse",
        "type": "object"
      },
      "TelemetryResponse": {
        "properties": {
          "cycle_count": {
            "title": "Cycle Count",
            "type": "integer"
          },
          "motor_movement_seconds": {
            "title": "Motor Movement Seconds",
            "type": "number"
          }
        },
        "required": [
          "cycle_count",
          "motor_movement_seconds"
        ],
        "title": "TelemetryResponse",
        "type": "object"
      },
      "TestRequest": {
        "properties": {
          "cell_idx": {
            "title": "Cell Idx",
            "type": "integer"
          },
          "shelf_idx": {
            "title": "Shelf Idx",
            "type": "integer"
          },
          "side": {
            "$ref": "#/components/schemas/StorageModuleSide"
          }
        },
        "required": [
          "side",
          "shelf_idx",
          "cell_idx"
        ],
        "title": "TestRequest",
        "type": "object"
      },
      "TofBlankCalibrationRequest": {
        "properties": {
          "samples": {
            "default": 5,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Samples",
            "type": "integer"
          }
        },
        "title": "TofBlankCalibrationRequest",
        "type": "object"
      },
      "TokenResponse": {
        "description": "Token response model.",
        "properties": {
          "access_token": {
            "title": "Access Token",
            "type": "string"
          },
          "expires_in": {
            "description": "Access-token lifetime in seconds from issuance",
            "title": "Expires In",
            "type": "integer"
          },
          "refresh_token": {
            "title": "Refresh Token",
            "type": "string"
          },
          "token_type": {
            "default": "bearer",
            "title": "Token Type",
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "refresh_token",
          "expires_in"
        ],
        "title": "TokenResponse",
        "type": "object"
      },
      "TrayAssign": {
        "description": "Request payload for marking a cell as a multi-item tray home.",
        "properties": {
          "barcode": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Barcode",
            "type": "string"
          },
          "columns": {
            "maximum": 32.0,
            "minimum": 1.0,
            "title": "Columns",
            "type": "integer"
          },
          "rows": {
            "maximum": 32.0,
            "minimum": 1.0,
            "title": "Rows",
            "type": "integer"
          }
        },
        "required": [
          "barcode",
          "rows",
          "columns"
        ],
        "title": "TrayAssign",
        "type": "object"
      },
      "TrayBarcode": {
        "properties": {
          "barcode": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Barcode",
            "type": "string"
          }
        },
        "required": [
          "barcode"
        ],
        "title": "TrayBarcode",
        "type": "object"
      },
      "TrayCrashRecoveryResponse": {
        "properties": {
          "recovered": {
            "items": {
              "$ref": "#/components/schemas/BinWorkflowResponse"
            },
            "title": "Recovered",
            "type": "array"
          },
          "unresolved": {
            "items": {
              "$ref": "#/components/schemas/UnresolvedTrayRecovery"
            },
            "title": "Unresolved",
            "type": "array"
          }
        },
        "required": [
          "recovered",
          "unresolved"
        ],
        "title": "TrayCrashRecoveryResponse",
        "type": "object"
      },
      "TrayLayoutUpdate": {
        "description": "Request payload for redefining a storage bin's compartment grid.",
        "properties": {
          "columns": {
            "maximum": 32.0,
            "minimum": 1.0,
            "title": "Columns",
            "type": "integer"
          },
          "rows": {
            "maximum": 32.0,
            "minimum": 1.0,
            "title": "Rows",
            "type": "integer"
          }
        },
        "required": [
          "rows",
          "columns"
        ],
        "title": "TrayLayoutUpdate",
        "type": "object"
      },
      "UnresolvedTrayRecovery": {
        "properties": {
          "error": {
            "description": "Why the tray stays outside; return it by scanning its barcode",
            "title": "Error",
            "type": "string"
          },
          "workflow": {
            "$ref": "#/components/schemas/BinWorkflowResponse"
          }
        },
        "required": [
          "workflow",
          "error"
        ],
        "title": "UnresolvedTrayRecovery",
        "type": "object"
      },
      "UserCreate": {
        "description": "User creation request.",
        "properties": {
          "access_level_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Level Id"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "first_name": {
            "title": "First Name",
            "type": "string"
          },
          "last_name": {
            "title": "Last Name",
            "type": "string"
          },
          "pin": {
            "title": "Pin",
            "type": "string"
          },
          "role_id": {
            "title": "Role Id",
            "type": "integer"
          }
        },
        "required": [
          "email",
          "first_name",
          "last_name",
          "pin",
          "role_id"
        ],
        "title": "UserCreate",
        "type": "object"
      },
      "UserListResponse": {
        "description": "User list response.",
        "properties": {
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/openshelf_os_server__routers__users__UserResponse"
            },
            "title": "Users",
            "type": "array"
          }
        },
        "required": [
          "users",
          "total",
          "offset",
          "limit"
        ],
        "title": "UserListResponse",
        "type": "object"
      },
      "UserUpdate": {
        "description": "User update request.",
        "properties": {
          "access_level_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Level Id"
          },
          "email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "pin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pin"
          },
          "role_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Id"
          }
        },
        "title": "UserUpdate",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WifiConnectRequest": {
        "properties": {
          "password": {
            "title": "Password",
            "type": "string"
          },
          "ssid": {
            "title": "Ssid",
            "type": "string"
          }
        },
        "required": [
          "ssid",
          "password"
        ],
        "title": "WifiConnectRequest",
        "type": "object"
      },
      "WifiConnectResponse": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "ssid": {
            "title": "Ssid",
            "type": "string"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "ssid",
          "message"
        ],
        "title": "WifiConnectResponse",
        "type": "object"
      },
      "WifiNetwork": {
        "properties": {
          "in_use": {
            "title": "In Use",
            "type": "boolean"
          },
          "security": {
            "title": "Security",
            "type": "string"
          },
          "signal": {
            "title": "Signal",
            "type": "integer"
          },
          "ssid": {
            "title": "Ssid",
            "type": "string"
          }
        },
        "required": [
          "ssid",
          "signal",
          "security",
          "in_use"
        ],
        "title": "WifiNetwork",
        "type": "object"
      },
      "WifiNetworkList": {
        "properties": {
          "networks": {
            "items": {
              "$ref": "#/components/schemas/WifiNetwork"
            },
            "title": "Networks",
            "type": "array"
          }
        },
        "required": [
          "networks"
        ],
        "title": "WifiNetworkList",
        "type": "object"
      },
      "WifiStatus": {
        "properties": {
          "connected": {
            "title": "Connected",
            "type": "boolean"
          },
          "ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip"
          },
          "signal": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signal"
          },
          "ssid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssid"
          }
        },
        "required": [
          "connected"
        ],
        "title": "WifiStatus",
        "type": "object"
      },
      "openshelf_os_server__routers__auth__UserResponse": {
        "description": "User response model.",
        "properties": {
          "access_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Level"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "first_name": {
            "title": "First Name",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_name": {
            "title": "Last Name",
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "role": {
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "first_name",
          "last_name",
          "role",
          "permissions",
          "is_active"
        ],
        "title": "UserResponse",
        "type": "object"
      },
      "openshelf_os_server__routers__users__UserResponse": {
        "description": "User response model.",
        "properties": {
          "access_level_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Level Id"
          },
          "access_level_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Level Name"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "first_name": {
            "title": "First Name",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_name": {
            "title": "Last Name",
            "type": "string"
          },
          "role_id": {
            "title": "Role Id",
            "type": "integer"
          },
          "role_name": {
            "title": "Role Name",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "first_name",
          "last_name",
          "role_id",
          "role_name",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "UserResponse",
        "type": "object"
      }
    },
    "securitySchemes": {
      "UserBearer": {
        "bearerFormat": "JWT or scoped relay service token",
        "description": "User token from JSON login. Selected routes also accept the scoped relay service token in this header.",
        "scheme": "bearer",
        "type": "http"
      },
      "UserQueryToken": {
        "description": "User access token for clients unable to set headers. Service credentials are not accepted here.",
        "in": "query",
        "name": "token",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Local device API for engineers working on inventory, robot control, calibration,\nand diagnostics. All application routes, including engineering and development operations,\nare documented here. Cloud integrators should use the\n[Cloud API](https://api.opshelf.com/docs/cloud/).\n\n## Connect and authenticate\nBase URL: `http://<device-ip>:8000`, using the device\u2019s IP address on your network\n(for example, `http://192.168.1.50:8000`). Append the documented `/api/...` path.\nLog in with JSON email/PIN at\n`POST /api/auth/login/json`, then send `Authorization: Bearer <access_token>`.\nUser tokens can also be passed as `?token=` for streaming/image clients; prefer the\nheader where possible. A header token takes precedence over a query token.\nThe scoped relay service credential is accepted only by the inventory, command,\nstatus/event, and printing routes that declare it; it must be sent in the header.\nDevelopment authentication settings may select an auto-user. Documentation describes\nthe authenticated contract; startup settings do not remove routes from the schema.\n\nRole permissions are checked in addition to authentication. Item access levels can\nfurther restrict retrieval. Public operations have no security requirement in this schema;\nfirst-run operations additionally enforce onboarding state.\n\n## Commands and errors\nInventory edits do not move hardware. Submit a command or bin workflow for physical\nmovement, save its identifier, and observe its terminal result. Acceptance is not completion.\nSome engineering GET operations can start work; read their descriptions before use.\nUse the physical emergency stop for immediate safety-critical stopping.\n\nErrors use `detail`, either text, a structured object (usually `message` and `code`),\nor validation details. Preserve `X-Correlation-ID` when reporting failures; callers can\nsupply this header to correlate requests. A `503` indicates an unavailable dependency,\nnot necessarily a stopped robot. Check state before retrying a mutation.\n\nLengths and coordinates are millimeters unless stated otherwise; masses are grams.\nShelf/cell indices are zero-based. Operating mode is selected at startup, not through this API.\n",
    "title": "Openshelf LB Local API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/access_levels": {
      "get": {
        "description": "List access levels.\n\nReturns the configured access levels used by users and inventory retrieval checks.\nRequires authentication. Assign access-level IDs through the user and item endpoints.",
        "operationId": "list_access_levels_api_access_levels_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AccessLevelResponse"
                  },
                  "title": "Response List Access Levels Api Access Levels Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "List access levels",
        "tags": [
          "access_levels"
        ]
      }
    },
    "/api/audit/logs": {
      "get": {
        "description": "Query request audit records.\n\nRequires `audit:read`. Returns an offset page filtered by inclusive date bounds, user,\nendpoint substring, HTTP method, response status, or exact correlation ID. Use\ncorrelation IDs to relate requests to command activity; audit records are not a\nreplacement for command polling.",
        "operationId": "list_audit_logs_api_audit_logs_get",
        "parameters": [
          {
            "description": "Filter by user ID",
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by user ID",
              "title": "User Id"
            }
          },
          {
            "description": "Start date (ISO format)",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date (ISO format)",
              "title": "Date From"
            }
          },
          {
            "description": "End date (ISO format)",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date (ISO format)",
              "title": "Date To"
            }
          },
          {
            "description": "Filter by API endpoint",
            "in": "query",
            "name": "endpoint",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by API endpoint",
              "title": "Endpoint"
            }
          },
          {
            "description": "Filter by HTTP method",
            "in": "query",
            "name": "method",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by HTTP method",
              "title": "Method"
            }
          },
          {
            "description": "Filter by response status",
            "in": "query",
            "name": "status_code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by response status",
              "title": "Status Code"
            }
          },
          {
            "description": "Filter by exact correlation ID",
            "in": "query",
            "name": "correlation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by exact correlation ID",
              "title": "Correlation Id"
            }
          },
          {
            "description": "Max results",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Max results",
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Pagination offset",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Pagination offset",
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Query request audit records",
        "tags": [
          "audit"
        ]
      }
    },
    "/api/audit/logs/{log_id}": {
      "get": {
        "description": "Read one audit record.\n\nRequires `audit:read`. Returns captured request/response context and related command\nrecords. An absent log ID returns `404`.",
        "operationId": "get_audit_log_api_audit_logs__log_id__get",
        "parameters": [
          {
            "description": "Audit log entry identifier.",
            "in": "path",
            "name": "log_id",
            "required": true,
            "schema": {
              "title": "Log Id",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read one audit record",
        "tags": [
          "audit"
        ]
      }
    },
    "/api/audit/verify": {
      "get": {
        "description": "Verify protected audit records.\n\nRequires `audit:read`. Checks stored linkage, hashes, and HMACs for protected entries in\nthe inclusive sequence range. The `ok` field reports integrity; verification failure is\nreturned in the body rather than as an HTTP error. Unprotected legacy entries are\nexcluded.",
        "operationId": "verify_audit_chain_api_audit_verify_get",
        "parameters": [
          {
            "description": "Start seq_no (inclusive)",
            "in": "query",
            "name": "from_seq",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start seq_no (inclusive)",
              "title": "From Seq"
            }
          },
          {
            "description": "End seq_no (inclusive)",
            "in": "query",
            "name": "to_seq",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End seq_no (inclusive)",
              "title": "To Seq"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditVerifyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Verify protected audit records",
        "tags": [
          "audit"
        ]
      }
    },
    "/api/auth/login/json": {
      "post": {
        "description": "Log in with email and PIN.\n\nExchanges provisioned user credentials for an access token and refresh token. Send JSON,\nnot an OAuth form. Use the access token as `Authorization: Bearer <access_token>`.\n`expires_in` is the configured access-token lifetime in seconds. Invalid credentials\nreturn `401`.",
        "operationId": "login_json_api_auth_login_json_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Log in with email and PIN",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/auth/logout": {
      "post": {
        "description": "Acknowledge user logout.\n\nReturns a logout acknowledgment for the authenticated user. Tokens are not revoked or\nblacklisted by this endpoint; the client must discard its access and refresh tokens.",
        "operationId": "logout_api_auth_logout_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse",
                  "additionalProperties": true,
                  "title": "Response Logout Api Auth Logout Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Acknowledge user logout",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/auth/me": {
      "get": {
        "description": "Read the authenticated user.\n\nReturns the active user, current role permissions, and optional access level. This is\nthe account selected by authentication, including the configured development auto-user\nwhen that fallback is active.",
        "operationId": "get_current_user_info_api_auth_me_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/openshelf_os_server__routers__auth__UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read the authenticated user",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/auth/refresh": {
      "post": {
        "description": "Refresh a user access token.\n\nExchanges a valid refresh token for a new access token using the current user\nrole/access settings. Returns the same refresh token, not a rotated token. Expired\ntokens and inactive or absent users return `401`.",
        "operationId": "refresh_token_api_auth_refresh_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Refresh a user access token",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/auth/users": {
      "get": {
        "description": "List users for login selection.\n\nPublic list of active non-system users for the lock screen. Returns names, email, role\nname, and optional access-level name; no PIN hashes or tokens are returned.",
        "operationId": "get_public_users_api_auth_users_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PublicUserResponse"
                  },
                  "title": "Response Get Public Users Api Auth Users Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List users for login selection",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/cabinet/release": {
      "post": {
        "description": "Control cabinet latch release.\n\nRequires `storage:access`. Sets the physical latch output to `release` or `passive` and\nreturns updated door/latch state. Unconfigured GPIO returns `409`; hardware failures\nreturn `503`. Blocked during automatic laser calibration.",
        "operationId": "control_cabinet_release_api_cabinet_release_post",
        "parameters": [
          {
            "in": "query",
            "name": "action",
            "required": true,
            "schema": {
              "enum": [
                "passive",
                "release"
              ],
              "title": "Action",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CabinetReleaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Control cabinet latch release",
        "tags": [
          "cabinet"
        ]
      }
    },
    "/api/cabinet/status": {
      "get": {
        "description": "Read cabinet doors and latches.\n\nReports cabinet GPIO door/latch state. `configured=false` means this hardware is not\nconfigured, rather than a closed-door guarantee. Requires authentication and an enabled\nrobot.",
        "operationId": "get_cabinet_status_api_cabinet_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CabinetStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read cabinet doors and latches",
        "tags": [
          "cabinet"
        ]
      }
    },
    "/api/calibration/abort": {
      "post": {
        "description": "Abort manual calibration and home the tool.\n\nHomes the tool and refreshes worker status. This recovery action itself moves hardware\nand is not an emergency stop. Automatic laser calibration must be aborted through its\nown endpoint.",
        "operationId": "abort_calibration_api_calibration_abort_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Abort manual calibration and home the tool",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/home_tool_motors": {
      "post": {
        "description": "Home the tool stage and gripper.\n\nHomes the stage and gripper motors, refreshes worker status, and returns remaining\nhoming requirements. This moves hardware and is unavailable during automatic laser\ncalibration.",
        "operationId": "home_tool_motors_api_calibration_home_tool_motors_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalibrationStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Home the tool stage and gripper",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/iobox": {
      "get": {
        "description": "Read IO box pickup calibration.\n\nReturns configured low/high pickup coordinates and tool extensions in millimeters. Does\nnot move hardware.",
        "operationId": "get_iobox_calibration_api_calibration_iobox_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IOBoxPositionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read IO box pickup calibration",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/iobox/door": {
      "get": {
        "description": "Read IO door travel limits.\n\nReturns configured closed/open positions in millimeters. Reading these limits does not\nmove the door.",
        "operationId": "get_iobox_door_position_api_calibration_iobox_door_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IOBoxDoorPositionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read IO door travel limits",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/iobox/door/move": {
      "post": {
        "description": "Test an IO door position.\n\nMoves the physical door to the selected open/closed position using the supplied travel\nvalues. Returns the target position in millimeters. Save separately to persist the\ntested limits.",
        "operationId": "move_iobox_door_api_calibration_iobox_door_move_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOBoxDoorMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoorMoveResponse"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Test an IO door position",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/iobox/door/save": {
      "post": {
        "description": "Save IO door travel limits.\n\nPersists the supplied closed/open positions in the active configuration. Use the move\nendpoint to test physical travel before saving.",
        "operationId": "save_iobox_door_position_api_calibration_iobox_door_save_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOBoxDoorPositionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Save IO door travel limits",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/iobox/jog": {
      "post": {
        "description": "Jog an IO pickup position.\n\nMoves the selected low/high pickup axis by signed `delta` millimeters. Updates in-memory\ncalibration; call the IO save endpoint to persist changes.",
        "operationId": "jog_iobox_axis_api_calibration_iobox_jog_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOBoxJogRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IOBoxPositionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Jog an IO pickup position",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/iobox/move": {
      "post": {
        "description": "Move to an IO pickup position.\n\nOpens the IO door, faces the tool forward, and moves to the configured low or high\npickup point. Updates the in-memory IO calibration state returned by the endpoint.",
        "operationId": "move_to_iobox_position_api_calibration_iobox_move_post",
        "parameters": [
          {
            "in": "query",
            "name": "position",
            "required": true,
            "schema": {
              "enum": [
                "low",
                "high"
              ],
              "title": "Position",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IOBoxPositionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Move to an IO pickup position",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/iobox/save": {
      "post": {
        "description": "Save IO pickup calibration.\n\nPersists pickup coordinates and extensions, then closes/homes the tool and homes the IO\ndoor. This save operation also moves hardware; a homing failure can occur after\nconfiguration has been written.",
        "operationId": "save_iobox_calibration_api_calibration_iobox_save_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOBoxSaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Save IO pickup calibration",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/iobox/test": {
      "post": {
        "description": "Test the IO pickup sequence.\n\nExecutes the configured low-to-high pickup sequence and retracts the tool.\n`with_gripper=true` also operates the gripper. This moves physical hardware using the\ncurrent in-memory calibration.",
        "operationId": "test_iobox_sequence_api_calibration_iobox_test_post",
        "parameters": [
          {
            "in": "query",
            "name": "with_gripper",
            "required": false,
            "schema": {
              "default": false,
              "title": "With Gripper",
              "type": "boolean"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Test the IO pickup sequence",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/jog": {
      "post": {
        "description": "Jog the active calibration position.\n\nMoves the selected axis by signed `delta` millimeters and updates the in-memory\ncalibration position. Move to a cell or position first; otherwise returns `400`. Changes\nare not persisted until saved.",
        "operationId": "jog_axis_api_calibration_jog_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JogRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Jog the active calibration position",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/laser/abort": {
      "post": {
        "description": "Abort automatic laser calibration.\n\nRequests cancellation of the active automatic calibration session and returns its\nsnapshot. A state conflict returns `409`; inspect the snapshot before starting another\noperation.",
        "operationId": "abort_laser_auto_calibration_api_calibration_laser_abort_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaserAutoCalibrationSnapshot"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Abort automatic laser calibration",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/laser/read": {
      "get": {
        "description": "Read laser distance.\n\nReturns the current laser distance in millimeters. Requires an initialized robot; a\nfailed read returns `503`. Does not start an automatic calibration session.",
        "operationId": "read_laser_api_calibration_laser_read_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaserReadingResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read laser distance",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/laser/status": {
      "get": {
        "description": "Read automatic calibration progress.\n\nReturns the current automatic laser-calibration snapshot, including scope and progress.\nDoes not start or abort a session.",
        "operationId": "get_laser_auto_calibration_status_api_calibration_laser_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaserAutoCalibrationSnapshot"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read automatic calibration progress",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/laser/stream": {
      "get": {
        "description": "Start or observe automatic laser calibration.\n\n**This GET can start physical motion.** With the default `subscribe_only=false`, starts\nor joins an automatic calibration session for the supplied scope. Set\n`subscribe_only=true` to observe without starting one. Conflicting scopes or a busy\nrobot return `409`; invalid scope returns `400`.\n\nReturns Server-Sent Events with JSON calibration snapshots. A client disconnect\nunsubscribes that client; use the abort endpoint to stop the session. Do not infer\ncancellation from a closed connection. Optional scope parameters select cells,\nboth sides, or the angle/extension calibration phases. `hold_y_enabled=false` parks\nY on its brake between moves instead of holding it energised for the session. Every run\nframes its offsets from the hand-calibrated bottom-left cell of the sides it covers and\nreturns `400` before moving when one of those cells is missing or not marked manual.",
        "operationId": "stream_laser_auto_calibration_api_calibration_laser_stream_get",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/StorageModuleSide"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Side"
            }
          },
          {
            "description": "Zero-based shelf index.",
            "in": "query",
            "name": "shelf_idx",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Shelf Idx"
            }
          },
          {
            "description": "Zero-based cell index within the shelf.",
            "in": "query",
            "name": "cell_idx",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cell Idx"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "all",
                    "both"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mode"
            }
          },
          {
            "in": "query",
            "name": "include_angle_calibration",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Include Angle Calibration"
            }
          },
          {
            "in": "query",
            "name": "include_extension_calibration",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Include Extension Calibration"
            }
          },
          {
            "in": "query",
            "name": "hold_y_enabled",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Hold Y Enabled"
            }
          },
          {
            "in": "query",
            "name": "subscribe_only",
            "required": false,
            "schema": {
              "default": false,
              "title": "Subscribe Only",
              "type": "boolean"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "description": "Automatic calibration snapshots encoded as JSON in SSE data frames. GET may start motion unless subscribe_only=true.",
                  "type": "string"
                }
              }
            },
            "description": "Automatic calibration snapshots encoded as JSON in SSE data frames. GET may start motion unless subscribe_only=true."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Start or observe automatic laser calibration",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/move": {
      "post": {
        "description": "Move to a cell calibration point.\n\nMoves the tool to the selected side and zero-based shelf/cell calibration point. Returns\nthe current calibration position. A cell without a point returns `400`. Starts the\nposition context used by subsequent jog operations.",
        "operationId": "move_to_cell_api_calibration_move_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Move to a cell calibration point",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/move/position": {
      "post": {
        "description": "Move to a calibration coordinate.\n\nMoves the tool to the supplied coordinate in millimeters and establishes the calibration\nposition context. The response may include warnings for adjusted coordinates. Requires\navailable hardware and exclusive manual-motion access.",
        "operationId": "move_to_position_api_calibration_move_position_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MovePositionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Move to a calibration coordinate",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/rotation": {
      "get": {
        "description": "Read tool orientation positions.\n\nReturns the configured front/back rotation positions used by the tool. Does not rotate\nhardware.",
        "operationId": "get_rotation_angles_api_calibration_rotation_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotationAnglesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read tool orientation positions",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/rotation/rotate": {
      "post": {
        "description": "Test tool rotation.\n\nRotates to the requested angle, clamped to the configured motor limits. Positions the\nstage as needed for rotation and restores its safe X position. Does not persist\nfront/back calibration. Blocked by the rotation clearance guard (e.g. the tool is\nextended) with a 409 that names the unsafe axis; a misconfigured machine returns 400.",
        "operationId": "rotate_to_angle_api_calibration_rotation_rotate_post",
        "parameters": [
          {
            "in": "query",
            "name": "angle",
            "required": true,
            "schema": {
              "title": "Angle",
              "type": "number"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Test tool rotation",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/rotation/save": {
      "post": {
        "description": "Save tool orientation positions.\n\nPersists the front/back rotation values in the active configuration. Test rotation\nseparately before saving.",
        "operationId": "save_rotation_angles_api_calibration_rotation_save_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateSaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Save tool orientation positions",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/save": {
      "post": {
        "description": "Save a cell calibration point.\n\nPersists coordinates, optional status, manual marker, and dimensions for the selected\ncell. Tray homes allow coordinate, manual-marker, status, and dimension updates.\nInvalid status returns `400`.",
        "operationId": "save_calibration_api_calibration_save_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Save a cell calibration point",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/shelf": {
      "get": {
        "description": "Read shelf stage extensions.\n\nReturns configured front/back shelf extension distances in millimeters. Does not move\nthe stage.",
        "operationId": "get_shelf_stage_extension_api_calibration_shelf_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShelfStageExtensionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read shelf stage extensions",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/shelf/save": {
      "post": {
        "description": "Save shelf stage extensions.\n\nPersists front/back extension distances after checking the configured stage limit. Does\nnot execute a test move.",
        "operationId": "save_shelf_stage_extension_api_calibration_shelf_save_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShelfStageExtensionSaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Save shelf stage extensions",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/stage/move": {
      "post": {
        "description": "Test a stage extension.\n\nMoves the stage toward the requested position in millimeters, applying configured\nlimits. Returns the actual target and any warnings. Does not persist shelf extension\nsettings.",
        "operationId": "move_stage_api_calibration_stage_move_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StageMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StageMoveResponse"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Test a stage extension",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/status": {
      "get": {
        "description": "Read calibration readiness.\n\nReports whether homing is required and which axes need it. Does not home or move the\nrobot. Use this before a calibration procedure.",
        "operationId": "get_calibration_status_api_calibration_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalibrationStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read calibration readiness",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/storage": {
      "get": {
        "description": "Read the calibration grid.\n\nReturns the storage grid used by calibration, including per-cell calibration points.\nThis is geometry, not a command result or a live inventory snapshot.",
        "operationId": "get_storage_api_calibration_storage_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageGrid"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read the calibration grid",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/test": {
      "post": {
        "description": "Test a cell pick or place.\n\nRuns the selected cell gripper test on physical hardware. Optional `lift` requests a\nbounded pick/lift/place test. Tray homes are supported; disabled or maintenance cells\nare rejected. This tests\nmotion without saving new calibration coordinates.",
        "operationId": "test_gripper_api_calibration_test_post",
        "parameters": [
          {
            "in": "query",
            "name": "lift",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "maximum": 30.0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lift"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Test a cell pick or place",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/calibration/test/cycle": {
      "post": {
        "description": "Test an IO transfer cycle.\n\nRuns the IO pick/place cycle for the selected calibration cell. Tray homes are supported;\ndisabled or maintenance cells are rejected. This moves the tool through the IO box; use\nonly with the physical setup prepared for the test. Does not save calibration.",
        "operationId": "test_cycle_api_calibration_test_cycle_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Test an IO transfer cycle",
        "tags": [
          "calibration"
        ]
      }
    },
    "/api/camera": {
      "get": {
        "description": "List available cameras.\n\nReturns configured camera IDs and status for selecting a stream. Requires a user token.\nUse a returned ID with the camera streaming endpoint.",
        "operationId": "list_cameras_api_camera_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CamerasResponse",
                  "additionalProperties": true,
                  "title": "Response List Cameras Api Camera Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "List available cameras",
        "tags": [
          "camera"
        ]
      }
    },
    "/api/camera/{camera_id}": {
      "get": {
        "description": "Stream camera frames.\n\nReturns an MJPEG stream (`multipart/x-mixed-replace; boundary=frame`) with JPEG frames.\nStarts the selected stream and releases it on disconnect. Unknown IDs return `404`; no\navailable frames or camera failures return `503`. A user token may be sent through\n`?token=` for image clients.",
        "operationId": "stream_camera_api_camera__camera_id__get",
        "parameters": [
          {
            "description": "Camera identifier returned by camera discovery.",
            "in": "path",
            "name": "camera_id",
            "required": true,
            "schema": {
              "title": "Camera Id",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "multipart/x-mixed-replace; boundary=frame": {
                "schema": {
                  "description": "Multipart JPEG frames; each part has Content-Type: image/jpeg.",
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Multipart JPEG frames; each part has Content-Type: image/jpeg."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Stream camera frames",
        "tags": [
          "camera"
        ]
      }
    },
    "/api/chemicals/search": {
      "get": {
        "description": "Search CAS Common Chemistry.\n\nSearches the configured CAS service by name or identifier. `q` must contain at least two\nnon-whitespace characters; `offset` pages the upstream result set. Requires\nauthentication. Upstream failure returns `503` with `Retry-After: 5`.",
        "operationId": "search_chemicals_api_chemicals_search_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 2,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "description": "Number of records to skip before returning results.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "maximum": 10000,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChemicalSearch"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Search CAS Common Chemistry",
        "tags": [
          "chemicals"
        ]
      }
    },
    "/api/chemicals/{cas_number}": {
      "get": {
        "description": "Read a chemical by CAS number.\n\nLooks up one CAS registry number. Invalid numbers return `422`, absent records `404`,\nand upstream unavailability `503` with `Retry-After: 5`. Requires authentication.",
        "operationId": "chemical_detail_api_chemicals__cas_number__get",
        "parameters": [
          {
            "description": "CAS Registry Number to look up.",
            "in": "path",
            "name": "cas_number",
            "required": true,
            "schema": {
              "title": "Cas Number",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChemicalDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read a chemical by CAS number",
        "tags": [
          "chemicals"
        ]
      }
    },
    "/api/demo/cycle/start": {
      "post": {
        "description": "Start the demonstration cycle.\n\nStarts background motion through the configured demo cell map. Requires an authenticated\nuser and available hardware. Missing cells return `400`; an already running demo or\nconflicting motion returns `409`. Acceptance does not mean the cycle has finished.",
        "operationId": "start_demo_cycle_api_demo_cycle_start_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Start the demonstration cycle",
        "tags": [
          "demo"
        ]
      }
    },
    "/api/demo/cycle/status": {
      "get": {
        "description": "Read demonstration progress.\n\nReports whether the background demo is running, its current cell index, and configured\ncell count. Does not start or stop motion.",
        "operationId": "get_demo_cycle_status_api_demo_cycle_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoCycleStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read demonstration progress",
        "tags": [
          "demo"
        ]
      }
    },
    "/api/demo/cycle/stop": {
      "post": {
        "description": "Request demonstration stop.\n\nRequests the running demo cycle to stop. Returns `409` when no demo is running. Poll\ndemo status for completion; this is not a physical emergency stop.",
        "operationId": "stop_demo_cycle_api_demo_cycle_stop_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Request demonstration stop",
        "tags": [
          "demo"
        ]
      }
    },
    "/api/health": {
      "get": {
        "description": "Check OS and robot initialization.\n\nPublic health check. Reports the operating mode and robot initialization state. Returns\n`503` with a degraded body when initialization has failed, including when the mock\nruntime is unavailable. A healthy process may report a disabled robot; inspect\n`robot_status` and `robot_phase` before requesting motion.",
        "operationId": "health_api_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Operation result"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Robot initialization failed or mock runtime unavailable"
          }
        },
        "summary": "Check OS and robot initialization",
        "tags": [
          "system"
        ]
      }
    },
    "/api/iobox/sizer/calibration/camera-blank": {
      "post": {
        "description": "Capture the empty-box camera reference.\n\nRequires `robot:control`. Captures the camera blank used by sizing and returns its\nstored path. Prepare an empty IO box before calling; this changes calibration data.",
        "operationId": "capture_camera_blank_endpoint_api_iobox_sizer_calibration_camera_blank_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SizerBlankFrameResponse",
                  "additionalProperties": true,
                  "title": "Response Capture Camera Blank Endpoint Api Iobox Sizer Calibration Camera Blank Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Capture the empty-box camera reference",
        "tags": [
          "iobox-sizer"
        ]
      }
    },
    "/api/iobox/sizer/calibration/tof-blank": {
      "post": {
        "description": "Calibrate empty-box distance sensors.\n\nRequires `robot:control`. Samples the empty IO box, persists blank distance values, and\nreloads the sizer configuration. Prepare an empty box first; unavailable sensors return\n`503`.",
        "operationId": "calibrate_tof_blank_endpoint_api_iobox_sizer_calibration_tof_blank_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TofBlankCalibrationRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SizerBlankDistancesResponse",
                  "additionalProperties": true,
                  "title": "Response Calibrate Tof Blank Endpoint Api Iobox Sizer Calibration Tof Blank Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Calibrate empty-box distance sensors",
        "tags": [
          "iobox-sizer"
        ]
      }
    },
    "/api/iobox/sizer/config": {
      "get": {
        "description": "Read IO sizer configuration.\n\nReturns the active IO sizer configuration, including sensor and calibration settings.\nRequires authentication.",
        "operationId": "get_config_endpoint_api_iobox_sizer_config_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IOBoxSizerConfig",
                  "additionalProperties": true,
                  "title": "Response Get Config Endpoint Api Iobox Sizer Config Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read IO sizer configuration",
        "tags": [
          "iobox-sizer"
        ]
      },
      "put": {
        "description": "Replace IO sizer configuration.\n\nRequires `robot:control`. Persists the supplied complete sizer configuration and reloads\nit, returning the new configuration and status. This is a replacement rather than a\npartial patch.",
        "operationId": "update_config_endpoint_api_iobox_sizer_config_put",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOBoxSizerConfig"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SizerConfigResponse",
                  "additionalProperties": true,
                  "title": "Response Update Config Endpoint Api Iobox Sizer Config Put",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Replace IO sizer configuration",
        "tags": [
          "iobox-sizer"
        ]
      }
    },
    "/api/iobox/sizer/frame.jpg": {
      "get": {
        "description": "Read an IO sizer JPEG frame.\n\nCaptures the current sizer camera frame and returns JPEG bytes. Does not return JSON on\nsuccess. Unavailable hardware returns `503`; encoding failure returns `500`.",
        "operationId": "frame_endpoint_api_iobox_sizer_frame_jpg_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "image/jpeg": {
                "schema": {
                  "description": "JPEG camera frame bytes.",
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "JPEG camera frame bytes."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read an IO sizer JPEG frame",
        "tags": [
          "iobox-sizer"
        ]
      }
    },
    "/api/iobox/sizer/measure": {
      "post": {
        "description": "Measure the IO box contents.\n\nCaptures a sizing measurement and returns dimensions and observation details. Does not\nenroll or move an inventory item. Unavailable sensors return `503` with a structured\nerror.",
        "operationId": "measure_endpoint_api_iobox_sizer_measure_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SizerMeasurementResponse",
                  "additionalProperties": true,
                  "title": "Response Measure Endpoint Api Iobox Sizer Measure Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Measure the IO box contents",
        "tags": [
          "iobox-sizer"
        ]
      }
    },
    "/api/iobox/sizer/status": {
      "get": {
        "description": "Read IO sizer status.\n\nReports IO-box sizing availability, configuration state, and latest measurement status.\nDoes not start a measurement. Requires authentication.",
        "operationId": "status_endpoint_api_iobox_sizer_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SizerStatusResponse",
                  "additionalProperties": true,
                  "title": "Response Status Endpoint Api Iobox Sizer Status Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read IO sizer status",
        "tags": [
          "iobox-sizer"
        ]
      }
    },
    "/api/onboarding/admin-user": {
      "post": {
        "description": "Create the first administrator.\n\nPublic only while onboarding is pending. Creates the initial administrator using the\nprovisioned admin role. When the pending installation already holds exactly the\nrequested administrator - the wizard created it and never reached /complete - the\nretry resets that account's PIN instead of failing, so an interrupted setup can be\nfinished. Returns `409` when a different regular user exists and `403` after\nonboarding is complete.",
        "operationId": "create_admin_user_api_onboarding_admin_user_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminUserCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/openshelf_os_server__routers__users__UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "summary": "Create the first administrator",
        "tags": [
          "onboarding"
        ]
      }
    },
    "/api/onboarding/complete": {
      "post": {
        "description": "Complete first-run setup.\n\nRequires `users:write`. Marks onboarding complete, disabling the public first-run\nmutation endpoints. Returns `needs_onboarding=false`.",
        "operationId": "complete_onboarding_api_onboarding_complete_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Complete first-run setup",
        "tags": [
          "onboarding"
        ]
      }
    },
    "/api/onboarding/status": {
      "get": {
        "description": "Read first-run setup state.\n\nPublic endpoint indicating whether onboarding is pending. The check ensures onboarding\nstate exists; it is not a robot health check. A corrupt state file returns `503`.",
        "operationId": "get_onboarding_status_api_onboarding_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "summary": "Read first-run setup state",
        "tags": [
          "onboarding"
        ]
      }
    },
    "/api/onboarding/wifi/connect": {
      "post": {
        "description": "Connect Wi-Fi during first-run setup.\n\nPublic only while onboarding is pending. Activates the supplied connection and persists\nit on success. Changing the device network can disconnect this client; failures roll\nback the pending connection.",
        "operationId": "connect_wifi_api_onboarding_wifi_connect_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WifiConnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiConnectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Connect Wi-Fi during first-run setup",
        "tags": [
          "onboarding"
        ]
      }
    },
    "/api/onboarding/wifi/networks": {
      "get": {
        "description": "Scan Wi-Fi during first-run setup.\n\nPublic only while onboarding is pending. Scans for wireless networks; after setup, use\nthe authenticated Wi-Fi endpoint.",
        "operationId": "list_wifi_networks_api_onboarding_wifi_networks_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiNetworkList"
                }
              }
            },
            "description": "Successful Response"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          }
        },
        "summary": "Scan Wi-Fi during first-run setup",
        "tags": [
          "onboarding"
        ]
      }
    },
    "/api/onboarding/wifi/status": {
      "get": {
        "description": "Read Wi-Fi during first-run setup.\n\nPublic only while onboarding is pending. Returns the active wireless connection state;\nafter setup, use the authenticated Wi-Fi endpoint.",
        "operationId": "get_wifi_status_api_onboarding_wifi_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          }
        },
        "summary": "Read Wi-Fi during first-run setup",
        "tags": [
          "onboarding"
        ]
      }
    },
    "/api/print": {
      "post": {
        "description": "Print a barcode label.\n\nRequires `printer:print` or the relay service credential. Takes the barcode in the\nrequest body, so every customer barcode is printable. The device renders it as a Code\n128 label; mock mode simulates printing without a physical artifact. This operation has\nno idempotency key; a retry may print another label. A printer write failure returns\n`503`.",
        "operationId": "print_label_api_print_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrintLabelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrintLabelResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Print a barcode label",
        "tags": [
          "printer"
        ]
      }
    },
    "/api/print/config": {
      "get": {
        "description": "Read printer feed settings.\n\nReturns configured feed distance in printer dots. Does not print a label.",
        "operationId": "get_printer_config_api_print_config_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrinterFeedConfig"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read printer feed settings",
        "tags": [
          "printer"
        ]
      },
      "put": {
        "description": "Set printer feed distance.\n\nRequires `printer:print`. Persists the feed distance used after printing. This updates\nconfiguration without printing a test label.",
        "operationId": "update_printer_config_api_print_config_put",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrinterFeedConfig"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrinterFeedConfig"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Set printer feed distance",
        "tags": [
          "printer"
        ]
      }
    },
    "/api/print/status": {
      "get": {
        "description": "Read printer diagnostics.\n\nReports connectivity, health, and printer error flags. A disconnected or unhealthy\nprinter can still return HTTP `200`; inspect the body. Mock mode reports\n`simulated=true` and does not contact hardware.",
        "operationId": "get_printer_status_api_print_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrinterStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read printer diagnostics",
        "tags": [
          "printer"
        ]
      }
    },
    "/api/report_error": {
      "post": {
        "description": "Submit an operator error report.\n\nCaptures the supplied message with user, robot, system, and available camera context.\nSends it to Sentry when enabled and initialized for this mode. An `ok` acknowledgment\ndoes not guarantee remote delivery.",
        "operationId": "submit_error_report_api_report_error_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportErrorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportErrorResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Submit an operator error report",
        "tags": [
          "report"
        ]
      }
    },
    "/api/robot/clear_commands": {
      "post": {
        "description": "Clear queued robot commands.\n\nRemoves waiting commands through the worker; requires `robot:control`. An active bin\nworkflow or laser calibration prevents this mutation. Read durable command results to\nreconcile interrupted work.",
        "operationId": "clear_robot_commands_api_robot_clear_commands_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Clear queued robot commands",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/commands": {
      "post": {
        "description": "Queue a robot command.\n\nReturns a durable `command_id` and current state after admission, not after physical\ncompletion. Poll `/api/robot/commands/{command_id}` for the result or subscribe to\n`/api/robot/events` before submitting. The status stream is not a command receipt.\n\nFor store/retrieve commands, reuse the same `request_id` and payload after an uncertain\nsubmission. Identical replays return the existing record; a different payload returns\n`409`. Records and idempotency are retained for seven days. A terminal failure requires\na new ID for a new attempt. Interrupted commands are failed at startup rather than\nreplayed.\n\nCreate inventory first, then submit\n`{\"command\":\"store_item\",\"request_id\":\"store-001\",\"item\":{\"barcode\":\"880000000001\"}}`. New\ncommand-enrolled items require positive complete dimensions; include a name for\ncompatibility with mock mode. Existing items use stored dimensions and mass: update\ninventory before submitting if these must change. Accepted enrollment survives execution\nfailure.\n\nTo choose the destination cell, add a top-level `location`\n(`{\"side\":\"front_module\",\"shelf_idx\":0,\"cell_idx\":0}`). The cell must exist in the\nstorage grid, be available, and fit the item; a live bin home stays reserved and is\nreported unavailable. Omitting `location` keeps automatic allocation, and demo mode\nkeeps its configured cell mapping.\n\nFor retrieval, read the item first and supply its `location` (`side`, zero-based\n`shelf_idx`, `cell_idx`). Bin-managed items require the bin workflow. Clear the IO box\nbefore retrieving. Home when `home_required` is reported. An item reserved by a tray interaction returns\n`409`, as does a store or retrieval whose barcode or cell is already targeted by a\nqueued or running command (`target_in_flight`); a full queue returns `429` with `Retry-After`.\n\nMock mode supports only store/retrieve, with one FIFO worker and simulated completion.\nHardware modes also accept the engineering commands in the schema. A queued stop is not\nan emergency stop; use the physical emergency stop for immediate safety-critical\nstopping.",
        "operationId": "robot_commands_api_robot_commands_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "discriminator": {
                  "mapping": {
                    "home": "#/components/schemas/HomeCommand",
                    "idle": "#/components/schemas/IdleCommand",
                    "initialize": "#/components/schemas/InitializeCommand",
                    "move": "#/components/schemas/MoveCommand",
                    "retrieve_item": "#/components/schemas/RetrieveItemCommand",
                    "stop": "#/components/schemas/StopCommand",
                    "store_item": "#/components/schemas/StoreItemCommand"
                  },
                  "propertyName": "command"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/StopCommand"
                  },
                  {
                    "$ref": "#/components/schemas/InitializeCommand"
                  },
                  {
                    "$ref": "#/components/schemas/IdleCommand"
                  },
                  {
                    "$ref": "#/components/schemas/HomeCommand"
                  },
                  {
                    "$ref": "#/components/schemas/MoveCommand"
                  },
                  {
                    "$ref": "#/components/schemas/RetrieveItemCommand"
                  },
                  {
                    "$ref": "#/components/schemas/StoreItemCommand"
                  }
                ],
                "title": "Command"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Idempotency conflict or command precondition failed"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The active command queue is full",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Queue a robot command",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/commands/{command_id}": {
      "get": {
        "description": "Read a durable command result.\n\nAvailable for mock and hardware command records. `result` is null before a terminal\nresult is persisted and may contain a command-specific success or failure payload\nafterward. Unknown or expired IDs return `404`. For measurement semantics, see the\nstorage group; a successful retrieval does not guarantee a weight reading.",
        "operationId": "get_robot_command_api_robot_commands__command_id__get",
        "parameters": [
          {
            "description": "Command identifier returned when the command was accepted.",
            "in": "path",
            "name": "command_id",
            "required": true,
            "schema": {
              "title": "Command Id",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandLifecycleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Robot command not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read a durable command result",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/door": {
      "post": {
        "description": "Operate the IO box door.\n\nDirectly opens, closes, or homes the IO door using the `action` query parameter. Runs\nunder the manual-motion guard and cannot interrupt an active bin workflow. Hardware\nfailures return `503`.",
        "operationId": "control_door_api_robot_debug_door_post",
        "parameters": [
          {
            "in": "query",
            "name": "action",
            "required": true,
            "schema": {
              "enum": [
                "open",
                "close",
                "home"
              ],
              "title": "Action",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoorOperationResponse",
                  "additionalProperties": true,
                  "title": "Response Control Door Api Robot Debug Door Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Operate the IO box door",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/motors": {
      "get": {
        "description": "List configured motors.\n\nLists motor identifiers and configuration used by the diagnostic routes. Use returned\nidentifiers as `motor_name`; this endpoint does not command motion.",
        "operationId": "get_motors_api_robot_debug_motors_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotorsResponse",
                  "additionalProperties": true,
                  "title": "Response Get Motors Api Robot Debug Motors Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "List configured motors",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/motors/probe": {
      "post": {
        "description": "Probe motor responsiveness.\n\nPerforms diagnostic position reads without commanding movement. Returns `busy=true` and\na reason instead of probing when commands, manual motion, or demo cycling own the robot.\nEach result reports responsiveness independently.",
        "operationId": "probe_motors_api_robot_debug_motors_probe_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotorProbeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Probe motor responsiveness",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/motors/{motor_name}/clear": {
      "post": {
        "description": "Clear a motor alarm.\n\nClears the hardware alarm and matching worker crash state, then refreshes status. This\ndoes not home the motor. Unknown names return `404`; a failed hardware operation returns\n`503`.",
        "operationId": "clear_motor_alarm_api_robot_debug_motors__motor_name__clear_post",
        "parameters": [
          {
            "description": "Motor identifier returned by the motor diagnostics endpoint.",
            "in": "path",
            "name": "motor_name",
            "required": true,
            "schema": {
              "title": "Motor Name",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotorOperationResponse",
                  "additionalProperties": true,
                  "title": "Response Clear Motor Alarm Api Robot Debug Motors  Motor Name  Clear Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Clear a motor alarm",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/motors/{motor_name}/crash": {
      "post": {
        "description": "Inject a motor crash.\n\nEngineering fault-injection endpoint that sets the selected motor's crash state. The\nworker can react as it would to a real crash. Unknown motor names return `404`.",
        "operationId": "simulate_motor_crash_api_robot_debug_motors__motor_name__crash_post",
        "parameters": [
          {
            "description": "Motor identifier returned by the motor diagnostics endpoint.",
            "in": "path",
            "name": "motor_name",
            "required": true,
            "schema": {
              "title": "Motor Name",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotorOperationResponse",
                  "additionalProperties": true,
                  "title": "Response Simulate Motor Crash Api Robot Debug Motors  Motor Name  Crash Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Inject a motor crash",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/motors/{motor_name}/home": {
      "post": {
        "description": "Home one motor.\n\nRuns the selected motor's homing operation with manual-motion guards. This moves\nhardware and may also position the tool for safe rotation. `skip_pre_home_approach=true`\nis restricted to the Y axis in development mode. Unknown names return `404`; motion that\nanother operation already holds returns `409`.",
        "operationId": "home_motor_api_robot_debug_motors__motor_name__home_post",
        "parameters": [
          {
            "description": "Motor identifier returned by the motor diagnostics endpoint.",
            "in": "path",
            "name": "motor_name",
            "required": true,
            "schema": {
              "title": "Motor Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "skip_pre_home_approach",
            "required": false,
            "schema": {
              "default": false,
              "title": "Skip Pre Home Approach",
              "type": "boolean"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotorOperationResponse",
                  "additionalProperties": true,
                  "title": "Response Home Motor Api Robot Debug Motors  Motor Name  Home Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Home one motor",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/motors/{motor_name}/move": {
      "post": {
        "description": "Move one motor to a position.\n\nMoves the selected motor to `position_mm` using the manual-motion guard. Rotation may\nrequire associated stage positioning. Unknown names return `404`; motion that another\noperation already holds returns `409`; hardware failures return `503`.",
        "operationId": "move_motor_api_robot_debug_motors__motor_name__move_post",
        "parameters": [
          {
            "description": "Motor identifier returned by the motor diagnostics endpoint.",
            "in": "path",
            "name": "motor_name",
            "required": true,
            "schema": {
              "title": "Motor Name",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MotorMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotorOperationResponse",
                  "additionalProperties": true,
                  "title": "Response Move Motor Api Robot Debug Motors  Motor Name  Move Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Move one motor to a position",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/power": {
      "get": {
        "description": "Read the four switched power rails.\n\nReports what each rail feeds, the axes that lose their encoder reference when it is\ncut, and the current output state. `powered` is `null` when the rail cannot be read.\nCut power only through the rail cycle operation: driving the output directly drops\nthe drives without reconfiguring or re-homing the axes that lose their reference.",
        "operationId": "get_power_rails_api_robot_debug_power_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PowerRailsResponse",
                  "additionalProperties": true,
                  "title": "Response Get Power Rails Api Robot Debug Power Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Inspect switched power rails",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/power/{rail}/cycle": {
      "post": {
        "description": "Cut a switched rail for a few seconds, then restore it.\n\nDrive parameters that only latch at power-on need this -- any DI/DO function\nchange stays inert until its drive restarts. Returns once power is back; the\nhardware is still booting, so re-home the axes it dropped before moving. An\nactive command or queued work returns `409`; a tray workflow that is idle between\nsteps does not block the cycle.",
        "operationId": "power_cycle_rail_api_robot_debug_power__rail__cycle_post",
        "parameters": [
          {
            "in": "path",
            "name": "rail",
            "required": true,
            "schema": {
              "title": "Rail",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PowerCycleResponse",
                  "additionalProperties": true,
                  "title": "Response Power Cycle Rail Api Robot Debug Power  Rail  Cycle Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Power-cycle a switched rail",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/scale": {
      "get": {
        "description": "Read live scale registers.\n\nReads current scale weight in grams, stability/validity flags, decimal position, and raw\nregisters. This is live telemetry, not a command-correlated result or inventory update.\nMock mode returns a deterministic 350-gram reading. A disabled scale returns `404`;\ncommunication failure returns `503`.",
        "operationId": "get_scale_reading_api_robot_debug_scale_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScaleReadingResponse",
                  "additionalProperties": true,
                  "title": "Response Get Scale Reading Api Robot Debug Scale Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read live scale registers",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/scale/calibration/params": {
      "get": {
        "description": "Read scale calibration parameters.\n\nReads physical scale range, calibration weight, precision, and division settings. These\nsettings belong to the hardware scale, not inventory container-mass fields.",
        "operationId": "get_scale_calibration_params_api_robot_debug_scale_calibration_params_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScaleCalibrationParameters",
                  "additionalProperties": true,
                  "title": "Response Get Scale Calibration Params Api Robot Debug Scale Calibration Params Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read scale calibration parameters",
        "tags": [
          "robot"
        ]
      },
      "post": {
        "description": "Write scale calibration parameters.\n\nWrites the supplied range, known weight, precision, and division to the physical scale.\nInspect `success` in the response. An active bin workflow prevents mutation; this does\nnot update item mass.",
        "operationId": "set_scale_calibration_params_api_robot_debug_scale_calibration_params_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScaleCalibrationParamsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Set Scale Calibration Params Api Robot Debug Scale Calibration Params Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Write scale calibration parameters",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/scale/calibration/status": {
      "get": {
        "description": "Read scale calibration status.\n\nReads the physical scale calibration status through the worker. A disabled scale returns\n`404`; unavailable hardware or a failed read returns `503`.",
        "operationId": "get_scale_calibration_status_api_robot_debug_scale_calibration_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScaleCalibrationStatusResponse",
                  "additionalProperties": true,
                  "title": "Response Get Scale Calibration Status Api Robot Debug Scale Calibration Status Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read scale calibration status",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/scale/calibration/tare": {
      "post": {
        "description": "Tare the physical scale.\n\nSets the scale tare and returns a `success` flag. This changes the scale reading\nbaseline; it does not set an inventory item's `tare_weight`. An active bin workflow\nprevents mutation.",
        "operationId": "scale_tare_api_robot_debug_scale_calibration_tare_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Scale Tare Api Robot Debug Scale Calibration Tare Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Tare the physical scale",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/scale/calibration/weight": {
      "post": {
        "description": "Calibrate with a known weight.\n\nRuns span calibration using the configured known calibration weight. Place the reference\nweight on the scale before calling. An active bin workflow prevents mutation; this does\nnot change inventory mass.",
        "operationId": "calibrate_scale_weight_api_robot_debug_scale_calibration_weight_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScaleCalibrationResult",
                  "additionalProperties": true,
                  "title": "Response Calibrate Scale Weight Api Robot Debug Scale Calibration Weight Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Calibrate with a known weight",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/scale/calibration/zero": {
      "post": {
        "description": "Calibrate the scale zero point.\n\nRuns the hardware zero-calibration operation. Prepare the scale according to the\nengineering calibration procedure before calling. An active bin workflow prevents\nmutation. The response reports the hardware calibration result.",
        "operationId": "calibrate_scale_zero_api_robot_debug_scale_calibration_zero_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScaleCalibrationResult",
                  "additionalProperties": true,
                  "title": "Response Calibrate Scale Zero Api Robot Debug Scale Calibration Zero Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Calibrate the scale zero point",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/scanner/scan": {
      "post": {
        "description": "Inject a barcode scan event.\n\nPublishes a `label_scanned` event as if the scanner had read `barcode`; requires\n`robot:control`. Available in mock mode as well as hardware modes. The event can advance\na waiting bin workflow, so this is not a read-only scanner test.",
        "operationId": "emit_scanner_scan_event_api_robot_debug_scanner_scan_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelScanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Inject a barcode scan event",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/debug/scanner/status": {
      "get": {
        "description": "Read scanner diagnostics.\n\nReports scanner connection and enabled state from the initialized worker. This does not\ntrigger a hardware scan. Requires an authenticated user and an enabled robot.",
        "operationId": "get_scanner_status_api_robot_debug_scanner_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScannerStatusResponse",
                  "additionalProperties": true,
                  "title": "Response Get Scanner Status Api Robot Debug Scanner Status Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read scanner diagnostics",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/events": {
      "get": {
        "description": "Stream robot events and command results.\n\nServer-Sent Events; each event carries an `id:` line with its durable log\n`seq` and a `data:` frame with the event JSON. Events include terminal\ncommand results, scanner events, bin-workflow updates, and\n`inventory_changed` notices after storage API writes (refetch inventory on\nthese); dispatch by `command`, `message`, or `kind`, rather than assuming\nevery frame is a completion.\n\nA fresh subscription starts live at the top of the log and receives no\nearlier events. Reconnect with the `Last-Event-ID` header set to the last\n`id:` you processed and the stream replays every event above that `seq`\nbefore resuming live, so a disconnect loses no events. Explicit replay of\nthe log is available at `/api/robot/events/log?since=<seq>`. An event is\nforwarded only once its log row is committed; inventory changes commit\nbefore the event is forwarded. A terminal result includes `command_id`; use\ndurable command polling to reconcile after long outages. `weight`, when\npresent, is the cycle's gross reading in grams, not container net mass;\nboth store and retrieve cycles supply it when a scale reading is\navailable. A cursor above the log top (e.g. after a database reset or\nfrom another device) is clamped to the top: the stream starts live at\nthe top and the gap is visible in the log. User tokens can be supplied\nthrough the bearer header or `?token=`.",
        "operationId": "stream_events_api_robot_events_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "example": "id: 12\ndata: {\"message\":\"success\",\"command\":\"store_item\",\"command_id\":\"00000000-0000-4000-8000-000000000001\",\"barcode\":\"880000000001\",\"location\":{\"side\":\"front_module\",\"shelf_idx\":0,\"cell_idx\":0},\"weight\":350}\n\n",
                "schema": {
                  "description": "Durable robot events in SSE frames: an `id:` line carries the event's log `seq`, the `data:` frame the event JSON. Command, scanner, safety and workflow events share this stream.",
                  "type": "string"
                }
              }
            },
            "description": "Durable robot events in SSE frames: an `id:` line carries the event's log `seq`, the `data:` frame the event JSON. Command, scanner, safety and workflow events share this stream."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Stream robot events and command results",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/events/log": {
      "get": {
        "description": "Replay the durable robot event log.\n\nReturns events with `seq > since`, oldest first, at most `limit` per page.\n`since=0` reads from the start of the log; after a page, request the next\nwith `since=next_since` until `next_since` reaches `latest_seq` for a\ncomplete catch-up. `next_since` stays `since` for an empty page. This is\nthe reconciliation path for `/api/robot/events` subscribers after a\ndisconnect.",
        "operationId": "get_robot_event_log_api_robot_events_log_get",
        "parameters": [
          {
            "description": "Exclusive lower bound on the event log `seq`; only events with a higher `seq` are returned.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Since",
              "type": "integer"
            }
          },
          {
            "description": "Maximum number of records to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 500,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RobotEventLogResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Replay the durable robot event log",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/gripper": {
      "post": {
        "description": "Grip or release directly.\n\nPerforms an immediate authenticated gripper operation using the `state` query parameter.\nChanges physical hardware. Blocked while laser auto-calibration runs or another operation\nholds the manual-motion guard.",
        "operationId": "control_gripper_api_robot_gripper_post",
        "parameters": [
          {
            "in": "query",
            "name": "state",
            "required": true,
            "schema": {
              "enum": [
                "grip",
                "release"
              ],
              "title": "State",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Grip or release directly",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/safety/acknowledge": {
      "post": {
        "description": "Acknowledge a cleared safety interruption.\n\nAcknowledges the worker safety guard once every interruption source is either\nclear or one an acknowledgement is enough to clear, such as a weight change\nthat leaves the scale reading permanently shifted. Returns `409` with\n`active_sources` while a source that has to clear physically remains active.\nThis does not bypass sensors or home the robot.",
        "operationId": "acknowledge_safety_guard_api_robot_safety_acknowledge_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Acknowledge a cleared safety interruption",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/safety/override": {
      "post": {
        "description": "Set the safety guard bypass.\n\nEngineering control requiring `robot:control`. `bypass=true` disables the worker safety\nguard; false restores it. Returns the resulting safety state. This changes physical\nsafety behavior and must only be used in a controlled engineering procedure.",
        "operationId": "override_safety_guard_api_robot_safety_override_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SafetyGuardOverrideRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafetyStatus",
                  "additionalProperties": true,
                  "title": "Response Override Safety Guard Api Robot Safety Override Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Set the safety guard bypass",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/safety/override/component": {
      "post": {
        "description": "Set a component safety bypass.\n\nEngineering control requiring `robot:control`. Changes bypass for `light_curtain`,\n`cabinet_doors` or `weight_change` and returns the resulting safety state. Restore the\ncomponent after the controlled diagnostic procedure.",
        "operationId": "override_safety_component_api_robot_safety_override_component_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SafetyComponentOverrideRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafetyStatus",
                  "additionalProperties": true,
                  "title": "Response Override Safety Component Api Robot Safety Override Component Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Set a component safety bypass",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/start": {
      "post": {
        "description": "Start the robot worker.\n\nStarts worker processing; requires `robot:control`. This is a worker lifecycle\noperation, not command submission. Returns `409` while laser auto-calibration is active\nand `503` if the robot is unavailable.",
        "operationId": "start_robot_api_robot_start_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Start the robot worker",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/status": {
      "get": {
        "description": "Stream robot status.\n\nServer-Sent Events (`text/event-stream`). Each `data:` value is a JSON status snapshot\nwith top-level `mode`; initialization progress may appear before the worker is ready.\nDatabase item locations are overlaid on storage occupancy. Subscribe for current state\nrather than durable command outcomes.\n\nSupports bearer authentication or the user access token in `?token=` for clients unable\nto set headers. Sends heartbeat comments while connected. Reconnect to obtain current\nstatus; the stream does not provide historical replay. Mock mode uses the same transport\nwith simulated hardware state.",
        "operationId": "stream_sse_api_robot_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "example": "data: {\"mode\":\"mock\",\"running\":true,\"current_command\":null,\"queue_length\":0}\n\n",
                "schema": {
                  "description": "Live JSON status snapshots in SSE data frames. Heartbeat comments are not JSON.",
                  "type": "string"
                }
              }
            },
            "description": "Live JSON status snapshots in SSE data frames. Heartbeat comments are not JSON."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Stream robot status",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/robot/stop": {
      "post": {
        "description": "Shut down the robot worker.\n\nWaits for worker shutdown; requires `robot:control`. This differs from submitting a\nqueued `stop` command and is not a physical emergency stop. Unavailable during laser\nauto-calibration.",
        "operationId": "stop_robot_api_robot_stop_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Required hardware or service is unavailable"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Shut down the robot worker",
        "tags": [
          "robot"
        ]
      }
    },
    "/api/roles": {
      "get": {
        "description": "List roles and user counts.\n\nRequires `roles:read`. Lists permission strings and the number of assigned users for\neach role. Counts include inactive users.",
        "operationId": "list_roles_api_roles_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RoleResponse"
                  },
                  "title": "Response List Roles Api Roles Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "List roles and user counts",
        "tags": [
          "roles"
        ]
      },
      "post": {
        "description": "Create a role.\n\nRequires `roles:read` and `roles:write`. Stores the permission list as supplied.\nDuplicate role names return `400`.",
        "operationId": "create_role_api_roles_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Create a role",
        "tags": [
          "roles"
        ]
      }
    },
    "/api/roles/{role_id}": {
      "delete": {
        "description": "Delete an unused role.\n\nRequires `roles:read` and `roles:delete`. Roles assigned to any user, including inactive\nusers, cannot be deleted and return `400`. An absent role returns `404`.",
        "operationId": "delete_role_api_roles__role_id__delete",
        "parameters": [
          {
            "description": "Role identifier.",
            "in": "path",
            "name": "role_id",
            "required": true,
            "schema": {
              "title": "Role Id",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse",
                  "additionalProperties": true,
                  "title": "Response Delete Role Api Roles  Role Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Delete an unused role",
        "tags": [
          "roles"
        ]
      },
      "get": {
        "description": "Read a role.\n\nRequires `roles:read`. Returns its permissions and assigned-user count. An unknown role\nID returns `404`.",
        "operationId": "get_role_api_roles__role_id__get",
        "parameters": [
          {
            "description": "Role identifier.",
            "in": "path",
            "name": "role_id",
            "required": true,
            "schema": {
              "title": "Role Id",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read a role",
        "tags": [
          "roles"
        ]
      },
      "put": {
        "description": "Update a role.\n\nRequires `roles:read` and `roles:write`. A supplied permission list replaces the\nexisting list. Null or omitted fields are unchanged; duplicate names return `400`.",
        "operationId": "update_role_api_roles__role_id__put",
        "parameters": [
          {
            "description": "Role identifier.",
            "in": "path",
            "name": "role_id",
            "required": true,
            "schema": {
              "title": "Role Id",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Update a role",
        "tags": [
          "roles"
        ]
      }
    },
    "/api/storage/bin-workflows": {
      "post": {
        "description": "Start a bin storage workflow.\n\nChooses storage for the requested item and operation. A `storage_mode=direct` response\nwith `workflow=null` means no tray workflow was started; submit an ordinary command\nseparately. A tray result starts delivery to the IO box. Retrieval\nrequires access to every item in that bin. Clear the IO box first; a tray or item already\nin use, or an unavailable robot worker, returns `409`.",
        "operationId": "create_bin_workflow_api_storage_bin_workflows_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BinWorkflowCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinWorkflowStartResponse",
                  "additionalProperties": true,
                  "title": "Response Create Bin Workflow Api Storage Bin Workflows Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Start a bin storage workflow",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bin-workflows/active": {
      "get": {
        "description": "List unfinished take, place, and return interactions. Outside trays do not reserve the robot; completed interactions are omitted.",
        "operationId": "get_active_bin_workflow_api_storage_bin_workflows_active_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinWorkflowsResponse",
                  "additionalProperties": true,
                  "title": "Response Get Active Bin Workflow Api Storage Bin Workflows Active Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Get Active Bin Workflow",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bin-workflows/interrupted": {
      "get": {
        "description": "List tray motions a crash or emergency stop interrupted whose tray is still marked outside. The crash dialog names these trays and their home cells so the operator can put them back.",
        "operationId": "get_crash_interrupted_bin_workflows_api_storage_bin_workflows_interrupted_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinWorkflowsResponse",
                  "additionalProperties": true,
                  "title": "Response Get Crash Interrupted Bin Workflows Api Storage Bin Workflows Interrupted Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Get Crash Interrupted Bin Workflows",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bin-workflows/interrupted/recover": {
      "post": {
        "description": "Mark trays from interrupted motions as home after the operator confirmed them on their shelves in the crash dialog. An interrupted return records the contents confirmed before it started. Does not move hardware. A tray whose state conflicts with being home stays outside and is listed as unresolved.",
        "operationId": "recover_crash_interrupted_bin_workflows_api_storage_bin_workflows_interrupted_recover_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrayCrashRecoveryResponse",
                  "additionalProperties": true,
                  "title": "Response Recover Crash Interrupted Bin Workflows Api Storage Bin Workflows Interrupted Recover Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Recover Crash Interrupted Bin Workflows",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bin-workflows/returns": {
      "post": {
        "description": "Resolve a tray barcode and open contents selection without moving hardware. All known contents are selected by default, including the checkout target. An already stored tray returns 409.",
        "operationId": "begin_tray_return_api_storage_bin_workflows_returns_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrayBarcode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinWorkflowEnvelope",
                  "additionalProperties": true,
                  "title": "Response Begin Tray Return Api Storage Bin Workflows Returns Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Begin Tray Return",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bin-workflows/{workflow_id}/close": {
      "post": {
        "description": "Finish a take or place instruction and leave its tray outside. Closing a return dialog cancels that return without changing contents or moving hardware. No IO occupancy is required.",
        "operationId": "close_tray_workflow_api_storage_bin_workflows__workflow_id__close_post",
        "parameters": [
          {
            "description": "Identifier of the bin workflow to inspect or operate on.",
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinWorkflowEnvelope",
                  "additionalProperties": true,
                  "title": "Response Close Tray Workflow Api Storage Bin Workflows  Workflow Id  Close Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Close Tray Workflow",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bin-workflows/{workflow_id}/store": {
      "post": {
        "description": "Submit selected known contents and return the tray from the IO bay to its shelf. Requires an occupied IO bay and an available, homed robot. Repeated submission of the same selection does not repeat motion.",
        "operationId": "store_returned_tray_api_storage_bin_workflows__workflow_id__store_post",
        "parameters": [
          {
            "description": "Identifier of the bin workflow to inspect or operate on.",
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BinWorkflowReturn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinWorkflowEnvelope",
                  "additionalProperties": true,
                  "title": "Response Store Returned Tray Api Storage Bin Workflows  Workflow Id  Store Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Store Returned Tray",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bins": {
      "get": {
        "description": "List storage bins.\n\nSynchronizes configured bins into the database, then returns bin state and contents.\nA configured bin barcode already assigned to an item returns `409`.\nAggregate `gross_weight` includes the bin and all its contents; it is exposed only at\nhome and is not an individual item mass.",
        "operationId": "get_bins_api_storage_bins_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinsResponse",
                  "additionalProperties": true,
                  "title": "Response Get Bins Api Storage Bins Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "List storage bins",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bins/tray": {
      "delete": {
        "description": "Remove the storage bin homed at a cell, freeing the cell.\n\nThe tray must be empty and at home with no in-flight workflow; otherwise it is refused.\nThe bin is dropped from the config, the source of truth, and its database row is\ndeactivated on re-sync.",
        "operationId": "unassign_tray_api_storage_bins_tray_delete",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "Zero-based shelf index.",
            "in": "query",
            "name": "shelf_idx",
            "required": true,
            "schema": {
              "title": "Shelf Idx",
              "type": "integer"
            }
          },
          {
            "description": "Zero-based cell index within the shelf.",
            "in": "query",
            "name": "cell_idx",
            "required": true,
            "schema": {
              "title": "Cell Idx",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Unassign Tray Api Storage Bins Tray Delete",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Remove a cell's multi-item tray",
        "tags": [
          "storage"
        ]
      },
      "post": {
        "description": "Create a storage bin homed at a cell, making it a multi-item tray.\n\nThe tray's inner dimensions default to the cell's own dimensions and its\n``max_items`` is derived from ``rows * columns``. The cell must not already be a tray\nhome, and the barcode must be unreserved by another tray or item.",
        "operationId": "assign_tray_api_storage_bins_tray_post",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "Zero-based shelf index.",
            "in": "query",
            "name": "shelf_idx",
            "required": true,
            "schema": {
              "title": "Shelf Idx",
              "type": "integer"
            }
          },
          {
            "description": "Zero-based cell index within the shelf.",
            "in": "query",
            "name": "cell_idx",
            "required": true,
            "schema": {
              "title": "Cell Idx",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrayAssign"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Assign Tray Api Storage Bins Tray Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Mark a cell as a multi-item tray home",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/bins/tray-layout": {
      "put": {
        "description": "Redefine the rows/columns compartment grid of the tray homed at a cell.\n\nWrites the tray's ``compartment_layout`` (and its derived ``max_items``) into the\nconfig, which is the source of truth, then re-syncs the database. The tray must be\nempty, at home, and have no in-flight workflow; otherwise the change is refused.",
        "operationId": "update_tray_layout_api_storage_bins_tray_layout_put",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "Zero-based shelf index.",
            "in": "query",
            "name": "shelf_idx",
            "required": true,
            "schema": {
              "title": "Shelf Idx",
              "type": "integer"
            }
          },
          {
            "description": "Zero-based cell index within the shelf.",
            "in": "query",
            "name": "cell_idx",
            "required": true,
            "schema": {
              "title": "Cell Idx",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrayLayoutUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Update Tray Layout Api Storage Bins Tray Layout Put",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Update a storage bin's compartment layout",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/grid": {
      "get": {
        "description": "Read the robot storage grid.\n\nReturns the robot storage-grid structure and calibration data. This is separate from\nitem-location database records; use the status stream for database-overlaid occupancy.",
        "operationId": "get_storage_grid_api_storage_grid_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageGrid",
                  "additionalProperties": true,
                  "title": "Response Get Storage Grid Api Storage Grid Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read the robot storage grid",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/grid/cell": {
      "delete": {
        "description": "Delete a cell from the robot grid.\n\nDeletes one side/shelf/cell from the persisted grid, without moving hardware. Reconcile\nitem occupancy separately before changing storage geometry.",
        "operationId": "delete_cell_api_storage_grid_cell_delete",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "Zero-based shelf index.",
            "in": "query",
            "name": "shelf_idx",
            "required": true,
            "schema": {
              "title": "Shelf Idx",
              "type": "integer"
            }
          },
          {
            "description": "Zero-based cell index within the shelf.",
            "in": "query",
            "name": "cell_idx",
            "required": true,
            "schema": {
              "title": "Cell Idx",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Delete Cell Api Storage Grid Cell Delete",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Delete a cell from the robot grid",
        "tags": [
          "storage"
        ]
      },
      "post": {
        "description": "Add a cell to the robot grid.\n\nAdds one cell at the next free index to the selected shelf, cloning geometry from\nexisting cells where available, without moving hardware.",
        "operationId": "add_grid_cell_api_storage_grid_cell_post",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "Zero-based shelf index.",
            "in": "query",
            "name": "shelf_idx",
            "required": true,
            "schema": {
              "title": "Shelf Idx",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Add Grid Cell Api Storage Grid Cell Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Add a cell to the robot grid",
        "tags": [
          "storage"
        ]
      },
      "put": {
        "description": "Update calibration point, status, and/or dimensions for one robot-grid cell.\n\nOmitted fields keep the cell's current values, so a partial payload updates only what\nit carries. x, y, and z_offset are applied together and create the cell's calibration\npoint when it has none.",
        "operationId": "update_grid_cell_api_storage_grid_cell_put",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "Zero-based shelf index.",
            "in": "query",
            "name": "shelf_idx",
            "required": true,
            "schema": {
              "title": "Shelf Idx",
              "type": "integer"
            }
          },
          {
            "description": "Zero-based cell index within the shelf.",
            "in": "query",
            "name": "cell_idx",
            "required": true,
            "schema": {
              "title": "Cell Idx",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GridCellUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Update Grid Cell Api Storage Grid Cell Put",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Update a cell in the robot grid",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/grid/cells": {
      "put": {
        "description": "Atomically apply updates to multiple robot-grid cells.\n\nEvery cell is resolved and every payload validated before anything is mutated, and the\ngrid is saved once at the end. If any cell is missing or any payload is invalid, the\nwhole request fails and nothing is changed.",
        "operationId": "update_grid_cells_api_storage_grid_cells_put",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GridCellsBatchUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Update Grid Cells Api Storage Grid Cells Put",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Update multiple cells in the robot grid (atomic)",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/grid/shelf": {
      "delete": {
        "description": "Delete a shelf from the robot grid.\n\nDeletes the selected side/shelf and its cells from the persisted grid, without\nretrieving physical contents. This engineering operation changes storage geometry, not\nitem inventory.",
        "operationId": "delete_shelf_api_storage_grid_shelf_delete",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "Zero-based shelf index.",
            "in": "query",
            "name": "shelf_idx",
            "required": true,
            "schema": {
              "title": "Shelf Idx",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Delete Shelf Api Storage Grid Shelf Delete",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Delete a shelf from the robot grid",
        "tags": [
          "storage"
        ]
      },
      "post": {
        "description": "Add a shelf to the robot grid.\n\nAdds one shelf at the next free index with a single cell, cloning geometry from the\nside's existing shelves where available, without moving hardware.",
        "operationId": "add_grid_shelf_api_storage_grid_shelf_post",
        "parameters": [
          {
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StorageModuleSide"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanSuccess",
                  "additionalProperties": true,
                  "title": "Response Add Grid Shelf Api Storage Grid Shelf Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Add a shelf to the robot grid",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/items": {
      "get": {
        "description": "List inventory records.\n\nReturns an offset page, total count, and matching `X-Total-Count`, `X-Limit`, and\n`X-Skip` headers. Records include access-based `can_retrieve`, current mass, and direct\nor bin-derived locations. A bin home location is not directly retrievable: use the bin\nworkflow when `bin` is non-null.",
        "operationId": "get_items_api_storage_items_get",
        "parameters": [
          {
            "description": "Number of records to skip before returning results.",
            "in": "query",
            "name": "skip",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Skip",
              "type": "integer"
            }
          },
          {
            "description": "Maximum number of records to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryPage",
                  "additionalProperties": true,
                  "title": "Response Get Items Api Storage Items Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "List inventory records",
        "tags": [
          "storage"
        ]
      },
      "post": {
        "description": "Create or update an inventory record.\n\nCreates a record or updates the existing barcode. This does not move the item or assign\nphysical occupancy. New records require valid dimensions; values are millimeters and\nmasses are grams. Both `metadata` and `item_metadata` inputs are accepted; responses use\n`metadata`.\n\nTo enroll an opened container, supply `tare_weight`, `net_weight`, and optionally\n`full_net_weight`; gross becomes tare plus net. Do not supply both `weight` and\n`net_weight`, even if one is null. See the storage group for mass persistence rules.\nPrefer `POST /api/storage/items/update` for partial edits to existing records. Reserved bin\nbarcodes and forbidden\nchanges to bin-managed items return `409`. A tray interaction holding the item does not\nblock the edit; conflicting state is rejected when that interaction completes.",
        "operationId": "create_item_api_storage_items_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemWithLocations"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Create or update an inventory record",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/items/delete": {
      "post": {
        "description": "Delete an inventory record.\n\nTakes the barcode in the request body. Deletes the item and its database location\nrecords; it does not physically retrieve it. Bin membership and retained workflow\nhistory block deletion. Use this low-level endpoint only after reconciling physical\noccupancy. A missing record returns `404`.",
        "operationId": "delete_item_api_storage_items_delete_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BarcodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Delete Item Api Storage Items Delete Post",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Delete an inventory record",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/items/locations/add": {
      "post": {
        "description": "Assign an inventory location.\n\nTakes the barcode and the zero-based side/shelf/cell of the location in the request body.\nAdds database occupancy for an item without moving hardware. Occupied cells and\nincompatible bin state are\nrejected. Tray homes are usable while their tray is away; the tray's return then reports\nthe occupied home instead. The status stream overlays these database locations on the\ngrid.",
        "operationId": "add_item_location_api_storage_items_locations_add_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemLocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemWithLocations"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Assign an inventory location",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/items/locations/remove": {
      "post": {
        "description": "Remove an inventory location.\n\nTakes the barcode and the zero-based side/shelf/cell of the location in the request body.\nThis does not move hardware or remove the storage-grid cell. Use only when physical\noccupancy has already been reconciled.",
        "operationId": "remove_item_location_api_storage_items_locations_remove_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemLocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemWithLocations"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Remove an inventory location",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/items/lookup": {
      "post": {
        "description": "Read an item and its storage state.\n\nThe barcode travels in the request body, so every customer barcode is addressable.\nReturns the inventory record, computed retrieval access, locations, and optional bin\nmembership. Read this before moving an item. `net_weight` is derived from known gross\nand tare; it is null when gross is below tare or either value is missing. A missing\nrecord returns `404`.",
        "operationId": "lookup_item_api_storage_items_lookup_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BarcodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemWithLocations"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read an item and its storage state",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/items/update": {
      "post": {
        "description": "Update selected inventory fields.\n\nTakes the barcode and the fields to change in the request body. Omitted mass fields\nretain their values. `net_weight=null` clears gross and derived net; `tare_weight=null`\nor `full_net_weight=null` clears that reference. Legacy `weight=null` does not clear\ngross. Supplying both `weight` and `net_weight` returns `422`.\nSetting net requires a known tare, either stored or supplied.\n\nChanging tare alone preserves gross and recomputes net. Metadata replaces the object\nwhen provided. Bin-managed dimensions/access changes require retrieval first. Returns\n`404` for an absent barcode. These edits do not move\nhardware.",
        "operationId": "update_item_api_storage_items_update_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemWithLocations"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operation conflicts with current state"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request validation failed"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Update selected inventory fields",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/locations": {
      "get": {
        "description": "List storage cell records.\n\nReturns database cell records, optionally filtered by zero-based shelf and cell index.\nThese records are separate from the robot storage-grid file and item-location occupancy.",
        "operationId": "get_storage_cells_api_storage_locations_get",
        "parameters": [
          {
            "description": "Filter by shelf index",
            "in": "query",
            "name": "shelf_idx",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by shelf index",
              "title": "Shelf Idx"
            }
          },
          {
            "description": "Filter by cell index",
            "in": "query",
            "name": "cell_idx",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by cell index",
              "title": "Cell Idx"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/StorageCellResponse"
                  },
                  "title": "Response Get Storage Cells Api Storage Locations Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "List storage cell records",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/locations/{shelf_idx}/{cell_idx}": {
      "put": {
        "description": "Update a storage cell record.\n\nUpdates database status or capacity for the selected cell. Capacity accepts a dimension\nobject or a width\u00d7height\u00d7length string using `x` separators. Valid states are available,\noccupied, maintenance, and disabled. This does not move hardware or rewrite the robot\ngrid.",
        "operationId": "update_storage_cell_api_storage_locations__shelf_idx___cell_idx__put",
        "parameters": [
          {
            "description": "Zero-based shelf index.",
            "in": "path",
            "name": "shelf_idx",
            "required": true,
            "schema": {
              "title": "Shelf Idx",
              "type": "integer"
            }
          },
          {
            "description": "Zero-based cell index within the shelf.",
            "in": "path",
            "name": "cell_idx",
            "required": true,
            "schema": {
              "title": "Cell Idx",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageCellUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageCellResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Update a storage cell record",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/system/home-on-init": {
      "get": {
        "description": "Read startup homing policy.\n\nRequires `robot:control`. Returns whether initialization is configured to home the\nrobot; does not move hardware.",
        "operationId": "get_home_on_init_api_system_home_on_init_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HomeOnInitResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read startup homing policy",
        "tags": [
          "system"
        ]
      },
      "put": {
        "description": "Set startup homing policy.\n\nRequires `robot:control`. Persists whether robot initialization should home hardware.\nDoes not home the robot immediately.",
        "operationId": "set_home_on_init_api_system_home_on_init_put",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HomeOnInitUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HomeOnInitResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Set startup homing policy",
        "tags": [
          "system"
        ]
      }
    },
    "/api/system/info": {
      "get": {
        "description": "Read device identity, alias, release, and network address.\n\nPublic device discovery information. `device_alias` is the operator-assigned alias\nstaged by provisioning, or null when the device has none. `release_sha` and\n`release_branch` identify the release the device is running, staged by the\non-device sync scripts, or null when unknown. `lan_ip` is the IPv4 address of\n`wlan0`, or null when that interface cannot be read. This endpoint does not\nestablish robot readiness.",
        "operationId": "system_info_api_system_info_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemInfoResponse",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": "Response System Info Api System Info Get",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          }
        },
        "summary": "Read device identity and network address",
        "tags": [
          "system"
        ]
      }
    },
    "/api/system/mode": {
      "get": {
        "description": "Read the operating mode.\n\nReturns the current production, development, demo, or mock mode. Mode is selected at\nprocess startup; the API has no mode-changing endpoint. Use the repository startup\ntooling to change it.",
        "operationId": "get_mode_api_system_mode_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read the operating mode",
        "tags": [
          "system"
        ]
      }
    },
    "/api/system/restart": {
      "post": {
        "description": "Request an API restart.\n\nSchedules a process exit so the container supervisor can restart the service. The\nresponse is sent before the restart; active connections can then close. Does not change\nthe operating mode. Reconnect and check health before resuming work.",
        "operationId": "restart_api_api_system_restart_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestartResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Request an API restart",
        "tags": [
          "system"
        ]
      }
    },
    "/api/telemetry": {
      "get": {
        "description": "Read cumulative device telemetry.\n\nPublic counters for robot cycles and motor movement time in seconds. Does not start\nhardware sampling or reset counters.",
        "operationId": "get_telemetry_api_telemetry_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Read cumulative device telemetry",
        "tags": [
          "telemetry"
        ]
      }
    },
    "/api/users": {
      "get": {
        "description": "List managed users.\n\nReturns an offset page of non-system users with optional active-state and role filters.\nRequires `users:read`; the total reflects the same filters.",
        "operationId": "list_users_api_users_get",
        "parameters": [
          {
            "description": "Number of records to skip before returning results.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "Maximum number of records to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "is_active",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Active"
            }
          },
          {
            "description": "Role identifier.",
            "in": "query",
            "name": "role_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Role Id"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "List managed users",
        "tags": [
          "users"
        ]
      },
      "post": {
        "description": "Create a user.\n\nRequires both `users:read` and `users:write`. PINs contain exactly four digits and are\nstored hashed. Email must be unique; role and optional access level must exist. Invalid\nreferences or duplicate email return `400`.",
        "operationId": "create_user_api_users_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/openshelf_os_server__routers__users__UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Create a user",
        "tags": [
          "users"
        ]
      }
    },
    "/api/users/{user_id}": {
      "delete": {
        "description": "Deactivate a user.\n\nRequires both `users:read` and `users:delete`. Soft-deletes a non-system account by\nsetting `is_active=false`; it does not erase the user or audit history. Deactivating\nyour own account returns `400`.",
        "operationId": "delete_user_api_users__user_id__delete",
        "parameters": [
          {
            "description": "User identifier.",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse",
                  "additionalProperties": true,
                  "title": "Response Delete User Api Users  User Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Operation result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Deactivate a user",
        "tags": [
          "users"
        ]
      },
      "get": {
        "description": "Read a managed user.\n\nRequires `users:read`. Returns role/access-level details for a non-system user. Absent\nand system users return `404`.",
        "operationId": "get_user_api_users__user_id__get",
        "parameters": [
          {
            "description": "User identifier.",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/openshelf_os_server__routers__users__UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read a managed user",
        "tags": [
          "users"
        ]
      },
      "put": {
        "description": "Update a managed user.\n\nRequires both `users:read` and `users:write`. Supplied non-null values update the\naccount; PIN replacement is hashed. Null or omitted values are not a general\nfield-clearing mechanism. System users are excluded.",
        "operationId": "update_user_api_users__user_id__put",
        "parameters": [
          {
            "description": "User identifier.",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "integer"
            }
          },
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/openshelf_os_server__routers__users__UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Resource or configured hardware not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Update a managed user",
        "tags": [
          "users"
        ]
      }
    },
    "/api/wifi/connect": {
      "post": {
        "description": "Connect and persist Wi-Fi.\n\nRequires `robot:control`. Creates a pending NetworkManager connection, activates it, and\nwrites boot Wi-Fi configuration on success. Failure rolls back the pending connection.\nChanging networks may disconnect the requesting client.",
        "operationId": "connect_wifi_api_wifi_connect_post",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WifiConnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiConnectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid operation or device configuration"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Permission or operating-state restriction"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid or failed dependency response"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Connect and persist Wi-Fi",
        "tags": [
          "wifi"
        ]
      }
    },
    "/api/wifi/networks": {
      "get": {
        "description": "Scan available Wi-Fi networks.\n\nScans using NetworkManager and returns visible SSIDs, signal, security, and\nactive-network markers. Requires authentication; this can take longer than a cached\nstatus read.",
        "operationId": "list_wifi_networks_api_wifi_networks_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiNetworkList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid or failed dependency response"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Scan available Wi-Fi networks",
        "tags": [
          "wifi"
        ]
      }
    },
    "/api/wifi/status": {
      "get": {
        "description": "Read Wi-Fi connection state.\n\nReturns the active wireless SSID, signal, and IP when available. Requires\nauthentication. A disconnected state is represented in the body.",
        "operationId": "get_wifi_status_api_wifi_status_get",
        "parameters": [
          {
            "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User access token for streaming/image clients. A bearer header takes precedence. Relay service credentials are header-only.",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required or token invalid"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal failure; retain the correlation ID for diagnosis"
          }
        },
        "security": [
          {
            "UserBearer": []
          },
          {
            "UserQueryToken": []
          }
        ],
        "summary": "Read Wi-Fi connection state",
        "tags": [
          "wifi"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "User login, token refresh, and session identity. Logout does not revoke tokens.",
      "name": "auth"
    },
    {
      "description": "Device identity, operating mode, startup policy, and process restart.",
      "name": "system"
    },
    {
      "description": "Command lifecycle, status/events, and low-level hardware diagnostics. Engineering operations can move hardware or change safety behavior.",
      "name": "robot"
    },
    {
      "description": "Inventory, occupancy, bin workflows, and robot grid geometry are distinct.\nItem CRUD changes database records; commands move physical items. Database locations\nsupply occupancy for the robot status stream. Bin home locations require bin workflows,\nnot direct retrieval commands.\n",
      "name": "storage"
    },
    {
      "description": "Barcode labels and printer diagnostics. Mock printing produces no physical label.",
      "name": "printer"
    },
    {
      "description": "Authenticated CAS Common Chemistry search and detail lookup.",
      "name": "chemicals"
    },
    {
      "description": "Physical cabinet doors and latch outputs.",
      "name": "cabinet"
    },
    {
      "description": "Camera discovery and live MJPEG streams.",
      "name": "camera"
    },
    {
      "description": "IO-box sizing, observations, and empty-box calibration.",
      "name": "iobox-sizer"
    },
    {
      "description": "Engineering calibration. Coordinates are millimeters unless stated otherwise. Motion requires available hardware and exclusive access; saves may persist configuration and move hardware. These routes are documented in every operating mode, not guaranteed available in every mode.",
      "name": "calibration"
    },
    {
      "description": "Authenticated demonstration-cycle control. Requires configured cells and robot hardware.",
      "name": "demo"
    },
    {
      "description": "NetworkManager wireless configuration on the device.",
      "name": "wifi"
    },
    {
      "description": "Initial network and administrator setup. Public mutations are restricted by first-run state.",
      "name": "onboarding"
    },
    {
      "description": "User administration. All routes require users:read; writes/deletes require their additional permission.",
      "name": "users"
    },
    {
      "description": "Role administration. All routes require roles:read; writes/deletes require their additional permission.",
      "name": "roles"
    },
    {
      "description": "Access levels used to decide item retrieval permissions.",
      "name": "access_levels"
    },
    {
      "description": "Request audit history and integrity verification. Requires audit:read.",
      "name": "audit"
    },
    {
      "description": "Operator-submitted diagnostics with runtime context.",
      "name": "report"
    },
    {
      "description": "Cumulative device counters.",
      "name": "telemetry"
    }
  ]
}
